(nifi) branch main updated: NIFI-12994 Fix potential NPE when requesting Flow Analysis Results for a Process Group

2024-04-02 Thread pvillard
This is an automated email from the ASF dual-hosted git repository.

pvillard pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git


The following commit(s) were added to refs/heads/main by this push:
 new 3a29d72a7c NIFI-12994 Fix potential NPE when requesting Flow Analysis 
Results for a Process Group
3a29d72a7c is described below

commit 3a29d72a7c351a46a8a0550b50a392d97447d05b
Author: tpalfy 
AuthorDate: Tue Apr 2 18:28:48 2024 +0200

NIFI-12994 Fix potential NPE when requesting Flow Analysis Results for a 
Process Group

Signed-off-by: Pierre Villard 

This closes #8595.
---
 .../java/org/apache/nifi/validation/StandardRuleViolationsManager.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/validation/StandardRuleViolationsManager.java
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/validation/StandardRuleViolationsManager.java
index 5e232dcc1a..ff1a424081 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/validation/StandardRuleViolationsManager.java
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/validation/StandardRuleViolationsManager.java
@@ -155,7 +155,7 @@ public class StandardRuleViolationsManager implements 
RuleViolationsManager {
 public Collection getRuleViolationsForGroup(String groupId) 
{
 Set groupViolations = 
subjectIdToRuleViolation.values().stream()
 .map(Map::values).flatMap(Collection::stream)
-.filter(violation -> violation.getGroupId().equals(groupId))
+.filter(violation -> groupId.equals(violation.getGroupId()))
 .collect(Collectors.toSet());
 
 return groupViolations;



(nifi) branch main updated: NIFI-5894 set a default last modified time when no last modified time is provided instead of NPE

2024-04-02 Thread joewitt
This is an automated email from the ASF dual-hosted git repository.

joewitt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git


The following commit(s) were added to refs/heads/main by this push:
 new 0bd3635ff9 NIFI-5894 set a default last modified time when no last 
modified time is provided instead of NPE
0bd3635ff9 is described below

commit 0bd3635ff9cd3c1c700fe551cb66aa366f1c9186
Author: Eric 
AuthorDate: Wed Dec 19 14:11:38 2018 -0500

NIFI-5894 set a default last modified time when no last modified time is 
provided instead of NPE

This closes #3229.

Signed-off-by: Joseph Witt 
---
 .../java/org/apache/nifi/processors/standard/util/FTPTransfer.java| 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/util/FTPTransfer.java
 
b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/util/FTPTransfer.java
index 057f66c8a5..e9cb364df4 100644
--- 
a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/util/FTPTransfer.java
+++ 
b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/util/FTPTransfer.java
@@ -313,12 +313,14 @@ public class FTPTransfer implements FileTransfer {
 perms.append(file.hasPermission(FTPFile.WORLD_ACCESS, 
FTPFile.WRITE_PERMISSION) ? "w" : "-");
 perms.append(file.hasPermission(FTPFile.WORLD_ACCESS, 
FTPFile.EXECUTE_PERMISSION) ? "x" : "-");
 
+final long lastModifiedTime  = (file.getTimestamp() != null) ? 
file.getTimestamp().getTimeInMillis() : 0L;
+
 FileInfo.Builder builder = new FileInfo.Builder()
 .filename(file.getName())
 .fullPathFileName(newFullForwardPath)
 .directory(file.isDirectory())
 .size(file.getSize())
-.lastModifiedTime(file.getTimestamp().getTimeInMillis())
+.lastModifiedTime(lastModifiedTime)
 .permissions(perms.toString())
 .owner(file.getUser())
 .group(file.getGroup());



(nifi) branch support/nifi-1.x updated: NIFI-12987 fix unit test after change to make controller service type searchable

2024-04-02 Thread pvillard
This is an automated email from the ASF dual-hosted git repository.

pvillard pushed a commit to branch support/nifi-1.x
in repository https://gitbox.apache.org/repos/asf/nifi.git


The following commit(s) were added to refs/heads/support/nifi-1.x by this push:
 new 23dc121e97 NIFI-12987 fix unit test after change to make controller 
service type searchable
23dc121e97 is described below

commit 23dc121e97d038b2a717a225f278a9d02d769260
Author: Mike Moser 
AuthorDate: Tue Apr 2 14:48:24 2024 +

NIFI-12987 fix unit test after change to make controller service type 
searchable

Signed-off-by: Pierre Villard 

This closes #8594.
---
 .../nifi/web/controller/ControllerSearchServiceRegressionTest.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/test/java/org/apache/nifi/web/controller/ControllerSearchServiceRegressionTest.java
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/test/java/org/apache/nifi/web/controller/ControllerSearchServiceRegressionTest.java
index e006185f7e..abf3240e82 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/test/java/org/apache/nifi/web/controller/ControllerSearchServiceRegressionTest.java
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/test/java/org/apache/nifi/web/controller/ControllerSearchServiceRegressionTest.java
@@ -519,7 +519,7 @@ public class ControllerSearchServiceRegressionTest extends 
AbstractControllerSea
 .withControllerServiceNode(getControllerServiceNode(id, name, 
"foo comment", rawProperties, AUTHORIZED));
 
 // when - search for name
-whenExecuteSearch("controllerserv");
+whenExecuteSearch("servicename");
 
 // then
 thenResultConsists()



(nifi) branch support/nifi-1.x updated: NIFI-12987 allow controller service type to be searchable

2024-04-02 Thread pvillard
This is an automated email from the ASF dual-hosted git repository.

pvillard pushed a commit to branch support/nifi-1.x
in repository https://gitbox.apache.org/repos/asf/nifi.git


The following commit(s) were added to refs/heads/support/nifi-1.x by this push:
 new e070753f39 NIFI-12987 allow controller service type to be searchable
e070753f39 is described below

commit e070753f39429ee5db176ced519f3827265d77c6
Author: Mike Moser 
AuthorDate: Mon Apr 1 18:09:16 2024 +

NIFI-12987 allow controller service type to be searchable

Signed-off-by: Pierre Villard 

This closes #8593.
---
 .../ControllerServiceNodeMatcher.java  |  3 ++
 .../ControllerServiceNodeMatcherTest.java  | 43 +-
 2 files changed, 45 insertions(+), 1 deletion(-)

diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/search/attributematchers/ControllerServiceNodeMatcher.java
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/search/attributematchers/ControllerServiceNodeMatcher.java
index ab20d14aba..7b5111330f 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/search/attributematchers/ControllerServiceNodeMatcher.java
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/search/attributematchers/ControllerServiceNodeMatcher.java
@@ -28,6 +28,7 @@ public class ControllerServiceNodeMatcher implements 
AttributeMatcher matches) {
@@ -37,5 +38,7 @@ public class ControllerServiceNodeMatcher implements 
AttributeMatcher validate(ValidationContext 
context) {
+return null;
+}
+
+@Override
+public PropertyDescriptor getPropertyDescriptor(String name) {
+return null;
+}
+
+@Override
+public void onPropertyModified(PropertyDescriptor descriptor, String 
oldValue, String newValue) {
+}
+
+@Override
+public List getPropertyDescriptors() {
+return null;
+}
+
+@Override
+public String getIdentifier() {
+return null;
+}
+
+@Override
+public void initialize(ControllerServiceInitializationContext context) 
{
+}
 }
 }
\ No newline at end of file



(nifi) branch main updated: NIFI-12987 allow controller service type to be searchable

2024-04-02 Thread pvillard
This is an automated email from the ASF dual-hosted git repository.

pvillard pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git


The following commit(s) were added to refs/heads/main by this push:
 new b574a7e41a NIFI-12987 allow controller service type to be searchable
b574a7e41a is described below

commit b574a7e41a90617e8befaee560be9d9f35afcfac
Author: Mike Moser 
AuthorDate: Mon Apr 1 18:09:16 2024 +

NIFI-12987 allow controller service type to be searchable

Signed-off-by: Pierre Villard 

This closes #8593.
---
 .../ControllerServiceNodeMatcher.java  |  3 ++
 .../ControllerServiceNodeMatcherTest.java  | 43 +-
 2 files changed, 45 insertions(+), 1 deletion(-)

diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/search/attributematchers/ControllerServiceNodeMatcher.java
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/search/attributematchers/ControllerServiceNodeMatcher.java
index ab20d14aba..7b5111330f 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/search/attributematchers/ControllerServiceNodeMatcher.java
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/search/attributematchers/ControllerServiceNodeMatcher.java
@@ -28,6 +28,7 @@ public class ControllerServiceNodeMatcher implements 
AttributeMatcher matches) {
@@ -37,5 +38,7 @@ public class ControllerServiceNodeMatcher implements 
AttributeMatcher validate(ValidationContext 
context) {
+return null;
+}
+
+@Override
+public PropertyDescriptor getPropertyDescriptor(String name) {
+return null;
+}
+
+@Override
+public void onPropertyModified(PropertyDescriptor descriptor, String 
oldValue, String newValue) {
+}
+
+@Override
+public List getPropertyDescriptors() {
+return null;
+}
+
+@Override
+public String getIdentifier() {
+return null;
+}
+
+@Override
+public void initialize(ControllerServiceInitializationContext context) 
{
+}
 }
 }
\ No newline at end of file