[jboss-cvs] JBossAS SVN: r74342 - trunk/connector/src/main/org/jboss/resource/connectionmanager.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Jun 10 04:49:25 EDT 2008


Author: jesper.pedersen
Date: 2008-06-10 04:49:25 -0400 (Tue, 10 Jun 2008)
New Revision: 74342

Modified:
   trunk/connector/src/main/org/jboss/resource/connectionmanager/JBossManagedConnectionPool.java
Log:
[JBAS-1082] Use cached value if possible

Modified: trunk/connector/src/main/org/jboss/resource/connectionmanager/JBossManagedConnectionPool.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/connectionmanager/JBossManagedConnectionPool.java	2008-06-10 08:32:52 UTC (rev 74341)
+++ trunk/connector/src/main/org/jboss/resource/connectionmanager/JBossManagedConnectionPool.java	2008-06-10 08:49:25 UTC (rev 74342)
@@ -1337,26 +1337,20 @@
       {
          Object value = null;
          if( other == null )
-            value = new Integer(subject.hashCode());
+            value = Integer.valueOf(subject.hashCode());
          else
-            value = new Boolean(subject.equals(other));
+            value = Boolean.valueOf(subject.equals(other));
          return value;
       }
       static int hashCode(Subject subject)
       {
          SubjectActions action = new SubjectActions(subject, null);
-         Integer hash = (Integer) AccessController.doPrivileged(action);
-         return hash.intValue();
+         return ((Integer) AccessController.doPrivileged(action)).intValue();
       }
       static boolean equals(Subject subject, Subject other)
       {
          SubjectActions action = new SubjectActions(subject, other);
-         Boolean equals = (Boolean) AccessController.doPrivileged(action);
-         return equals.booleanValue();
+         return ((Boolean) AccessController.doPrivileged(action)).booleanValue();
       }
    }
-
-  
-
- 
 }




More information about the jboss-cvs-commits mailing list