From da914bcfb4599ebf746ea477c691ed99c4842ed0 Mon Sep 17 00:00:00 2001 From: Chris Beams Date: Fri, 6 May 2011 19:07:41 +0000 Subject: [PATCH] Introduce Ordered#NOT_ORDERED To provide a reasonable default value for annotations that expose int-returning #order attributes. git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4263 50f2f4bb-b051-0410-bef5-90022cba6387 --- .../src/main/java/org/springframework/core/Ordered.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/org.springframework.core/src/main/java/org/springframework/core/Ordered.java b/org.springframework.core/src/main/java/org/springframework/core/Ordered.java index 86e8dca364f..730766f7ccb 100644 --- a/org.springframework.core/src/main/java/org/springframework/core/Ordered.java +++ b/org.springframework.core/src/main/java/org/springframework/core/Ordered.java @@ -47,6 +47,14 @@ public interface Ordered { */ int LOWEST_PRECEDENCE = Integer.MAX_VALUE; + /** + * A reserved integer value indicating that a component should + * be treated as unordered. Users should avoid this using this + * reserved value ({@value}) when ordering their own components. + * Useful when populating annotation, where null cannot be specified + * as a default for integer attributes. + */ + int NOT_ORDERED = (Integer.MIN_VALUE +1) / 2; // -1073741823 /** * Return the order value of this object, with a