Repository: nifi
Updated Branches:
  refs/heads/master c3b4872b5 -> 15d1e1bbf


NIFI-2405 corrected string equality checks

This closes #723.


Project: http://git-wip-us.apache.org/repos/asf/nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/15d1e1bb
Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/15d1e1bb
Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/15d1e1bb

Branch: refs/heads/master
Commit: 15d1e1bbf83fb8d5259d24997b7c0c56aa8e636e
Parents: c3b4872
Author: joewitt <[email protected]>
Authored: Tue Jul 26 11:44:11 2016 -0400
Committer: Pierre Villard <[email protected]>
Committed: Tue Jul 26 23:04:38 2016 +0200

----------------------------------------------------------------------
 .../java/org/apache/nifi/web/dao/impl/StandardSnippetDAO.java    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/nifi/blob/15d1e1bb/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardSnippetDAO.java
----------------------------------------------------------------------
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardSnippetDAO.java
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardSnippetDAO.java
index aa21cac..caa36d7 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardSnippetDAO.java
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardSnippetDAO.java
@@ -194,7 +194,7 @@ public class StandardSnippetDAO implements SnippetDAO {
         final Snippet snippet = locateSnippet(snippetDTO.getId());
 
         // if the group is changing move it
-        if (snippetDTO.getParentGroupId() != null && 
snippet.getParentGroupId() != snippetDTO.getParentGroupId()) {
+        if (snippetDTO.getParentGroupId() != null && 
!snippet.getParentGroupId().equals(snippetDTO.getParentGroupId())) {
             // get the current process group
             final ProcessGroup processGroup = 
flowController.getGroup(snippet.getParentGroupId());
             if (processGroup == null) {
@@ -217,7 +217,7 @@ public class StandardSnippetDAO implements SnippetDAO {
         final StandardSnippet snippet = locateSnippet(snippetDTO.getId());
 
         // if the group is changing move it
-        if (snippetDTO.getParentGroupId() != null && 
snippet.getParentGroupId() != snippetDTO.getParentGroupId()) {
+        if (snippetDTO.getParentGroupId() != null && 
!snippet.getParentGroupId().equals(snippetDTO.getParentGroupId())) {
             final ProcessGroup currentProcessGroup = 
flowController.getGroup(snippet.getParentGroupId());
             if (currentProcessGroup == null) {
                 throw new IllegalArgumentException("The current process group 
could not be found.");

Reply via email to