This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.models.impl-1.0.0
in repository 
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-models-impl.git

commit fe08a9634f1636a823ce50bf40377d0ecb10ec87
Author: Justin Edelson <[email protected]>
AuthorDate: Fri Jan 31 04:29:40 2014 +0000

    avoid the use of Integer.compare()
    
    git-svn-id: 
https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/models/impl@1563056
 13f79535-47bb-0310-9956-ffa450edef68
---
 src/main/java/org/apache/sling/models/impl/ModelAdapterFactory.java | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git 
a/src/main/java/org/apache/sling/models/impl/ModelAdapterFactory.java 
b/src/main/java/org/apache/sling/models/impl/ModelAdapterFactory.java
index 7d29234..caf88a6 100644
--- a/src/main/java/org/apache/sling/models/impl/ModelAdapterFactory.java
+++ b/src/main/java/org/apache/sling/models/impl/ModelAdapterFactory.java
@@ -82,7 +82,11 @@ public class ModelAdapterFactory implements AdapterFactory, 
Runnable {
 
         @Override
         public int compare(Constructor<?> o1, Constructor<?> o2) {
-            return Integer.compare(o2.getParameterTypes().length, 
o1.getParameterTypes().length);
+            return compare(o2.getParameterTypes().length, 
o1.getParameterTypes().length);
+        }
+
+        public int compare(int x, int y) {
+            return (x < y) ? -1 : ((x == y) ? 0 : 1);
         }
 
     }

-- 
To stop receiving notification emails like this one, please contact
"[email protected]" <[email protected]>.

Reply via email to