jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbros...@apache.org
Subject svn commit: r1180307 - /jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/JcrUtils.java
Date Sat, 08 Oct 2011 03:56:05 GMT
Author: dbrosius
Date: Sat Oct  8 03:56:05 2011
New Revision: 1180307

URL: http://svn.apache.org/viewvc?rev=1180307&view=rev
Log:
don't allocate map unless it's needed

Modified:
    jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/JcrUtils.java

Modified: jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/JcrUtils.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/JcrUtils.java?rev=1180307&r1=1180306&r2=1180307&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/JcrUtils.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/JcrUtils.java
Sat Oct  8 03:56:05 2011
@@ -140,12 +140,12 @@ public class JcrUtils {
         if (parameters != null
                 && parameters.containsKey(JcrUtils.REPOSITORY_URI)) {
             String uri = parameters.get(JcrUtils.REPOSITORY_URI);
-            Map<String, String> copy = new HashMap<String, String>(parameters);
             try {
                 URI u = new URI(uri);
                 String query = u.getRawQuery();
                 if (query != null) {
-                    for (String entry : query.split("&")) {
+                   Map<String, String> copy = new HashMap<String, String>(parameters);
+                   for (String entry : query.split("&")) {
                         int i = entry.indexOf('=');
                         if (i != -1) {
                             copy.put(



Mime
View raw message