diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-standard-prioritizers/src/main/java/org/apache/nifi/prioritizer/PriorityAttributePrioritizer.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-standard-prioritizers/src/main/java/org/apache/nifi/prioritizer/PriorityAttributePrioritizer.java index 3d27930553..fdd963e65b 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-standard-prioritizers/src/main/java/org/apache/nifi/prioritizer/PriorityAttributePrioritizer.java +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-standard-prioritizers/src/main/java/org/apache/nifi/prioritizer/PriorityAttributePrioritizer.java @@ -49,7 +49,7 @@ public class PriorityAttributePrioritizer implements FlowFilePrioritizer { String o1Priority = o1.getAttribute(CoreAttributes.PRIORITY.key()); String o2Priority = o2.getAttribute(CoreAttributes.PRIORITY.key()); if (o1Priority == null && o2Priority == null) { - return -1; // this is not 0 to match FirstInFirstOut + return 0; } else if (o2Priority == null) { return -1; } else if (o1Priority == null) { diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-standard-prioritizers/src/test/java/org/apache/nifi/prioritizer/PriorityAttributePrioritizerTest.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-standard-prioritizers/src/test/java/org/apache/nifi/prioritizer/PriorityAttributePrioritizerTest.java index 709855102b..d6ed2dc98c 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-standard-prioritizers/src/test/java/org/apache/nifi/prioritizer/PriorityAttributePrioritizerTest.java +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-standard-prioritizers/src/test/java/org/apache/nifi/prioritizer/PriorityAttributePrioritizerTest.java @@ -83,7 +83,7 @@ public class PriorityAttributePrioritizerTest { assertEquals(-1, prioritizer.compare(ffNoPriority, null)); assertEquals(1, prioritizer.compare(null, ffNoPriority)); - assertEquals(-1, prioritizer.compare(ffNoPriority, ffNoPriority)); + assertEquals(0, prioritizer.compare(ffNoPriority, ffNoPriority)); assertEquals(-1, prioritizer.compare(ffPri1, ffNoPriority)); assertEquals(1, prioritizer.compare(ffNoPriority, ffPri1));