tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kkoli...@apache.org
Subject svn commit: r1178684 - in /tomcat/trunk/java/org/apache/catalina: ha/session/SerializablePrincipal.java realm/GenericPrincipal.java
Date Tue, 04 Oct 2011 05:07:54 GMT
Author: kkolinko
Date: Tue Oct  4 05:07:52 2011
New Revision: 1178684

URL: http://svn.apache.org/viewvc?rev=1178684&view=rev
Log:
Do not sort lists that have only one element

Modified:
    tomcat/trunk/java/org/apache/catalina/ha/session/SerializablePrincipal.java
    tomcat/trunk/java/org/apache/catalina/realm/GenericPrincipal.java

Modified: tomcat/trunk/java/org/apache/catalina/ha/session/SerializablePrincipal.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ha/session/SerializablePrincipal.java?rev=1178684&r1=1178683&r2=1178684&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/ha/session/SerializablePrincipal.java (original)
+++ tomcat/trunk/java/org/apache/catalina/ha/session/SerializablePrincipal.java Tue Oct  4
05:07:52 2011
@@ -108,7 +108,7 @@ public class SerializablePrincipal  impl
         if (roles != null) {
             this.roles = new String[roles.size()];
             this.roles = roles.toArray(this.roles);
-            if (this.roles.length > 0)
+            if (this.roles.length > 1)
                 Arrays.sort(this.roles);
         }
         if (userPrincipal instanceof Serializable) {

Modified: tomcat/trunk/java/org/apache/catalina/realm/GenericPrincipal.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/realm/GenericPrincipal.java?rev=1178684&r1=1178683&r2=1178684&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/realm/GenericPrincipal.java (original)
+++ tomcat/trunk/java/org/apache/catalina/realm/GenericPrincipal.java Tue Oct  4 05:07:52
2011
@@ -127,7 +127,7 @@ public class GenericPrincipal implements
         if (roles != null) {
             this.roles = new String[roles.size()];
             this.roles = roles.toArray(this.roles);
-            if (this.roles.length > 0)
+            if (this.roles.length > 1)
                 Arrays.sort(this.roles);
         }
         this.loginContext = loginContext;



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message