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 aa21cac510..caa36d74ea 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.");