jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cko...@apache.org
Subject svn commit: r1436327 - /jackrabbit/trunk/jackrabbit-jca/src/main/java/org/apache/jackrabbit/jca/JCAConnectionRequestInfo.java
Date Mon, 21 Jan 2013 13:01:35 GMT
Author: ckoell
Date: Mon Jan 21 13:01:34 2013
New Revision: 1436327

URL: http://svn.apache.org/viewvc?rev=1436327&view=rev
Log:
minor change ... generics and better toString ..

Modified:
    jackrabbit/trunk/jackrabbit-jca/src/main/java/org/apache/jackrabbit/jca/JCAConnectionRequestInfo.java

Modified: jackrabbit/trunk/jackrabbit-jca/src/main/java/org/apache/jackrabbit/jca/JCAConnectionRequestInfo.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jca/src/main/java/org/apache/jackrabbit/jca/JCAConnectionRequestInfo.java?rev=1436327&r1=1436326&r2=1436327&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jca/src/main/java/org/apache/jackrabbit/jca/JCAConnectionRequestInfo.java
(original)
+++ jackrabbit/trunk/jackrabbit-jca/src/main/java/org/apache/jackrabbit/jca/JCAConnectionRequestInfo.java
Mon Jan 21 13:01:34 2013
@@ -152,16 +152,16 @@ public final class JCAConnectionRequestI
             return false;
         }
 
-        Map m1 = getAttributeMap(o1);
-        Map m2 = getAttributeMap(o2);
+        Map<String, Object> m1 = getAttributeMap(o1);
+        Map<String, Object> m2 = getAttributeMap(o2);
         return m1.equals(m2);
     }
 
     /**
      * Return the credentials attributes.
      */
-    private Map getAttributeMap(SimpleCredentials creds) {
-        HashMap map = new HashMap();
+    private Map<String, Object> getAttributeMap(SimpleCredentials creds) {
+        HashMap<String, Object> map = new HashMap<String, Object>();
         String[] keys = creds.getAttributeNames();
 
         for (int i = 0; i < keys.length; i++) {
@@ -189,7 +189,7 @@ public final class JCAConnectionRequestI
     private int computeSimpleCredsHashCode(SimpleCredentials c) {
         String userID = c.getUserID();
         char[] password = c.getPassword();
-        Map m = getAttributeMap(c);
+        Map<String, Object> m = getAttributeMap(c);
         final int prime = 31;
         int result = 1;
         result = prime * result + ((userID == null) ? 0 : userID.hashCode());
@@ -199,4 +199,9 @@ public final class JCAConnectionRequestI
         result = prime * result + ((m == null) ? 0 : m.hashCode());
         return result;
     }
+    
+    @Override
+    public String toString() {
+        return "workspace (" + workspace + ") creds (" + creds + ")";
+    }
 }



Mime
View raw message