chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fguilla...@apache.org
Subject svn commit: r921325 - /incubator/chemistry/trunk/chemistry/chemistry-shell/src/main/java/org/apache/chemistry/shell/app/ChemistryRootContext.java
Date Wed, 10 Mar 2010 12:10:24 GMT
Author: fguillaume
Date: Wed Mar 10 12:10:24 2010
New Revision: 921325

URL: http://svn.apache.org/viewvc?rev=921325&view=rev
Log:
Fix repository lookup for repositories where name != id

Modified:
    incubator/chemistry/trunk/chemistry/chemistry-shell/src/main/java/org/apache/chemistry/shell/app/ChemistryRootContext.java

Modified: incubator/chemistry/trunk/chemistry/chemistry-shell/src/main/java/org/apache/chemistry/shell/app/ChemistryRootContext.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-shell/src/main/java/org/apache/chemistry/shell/app/ChemistryRootContext.java?rev=921325&r1=921324&r2=921325&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-shell/src/main/java/org/apache/chemistry/shell/app/ChemistryRootContext.java
(original)
+++ incubator/chemistry/trunk/chemistry/chemistry-shell/src/main/java/org/apache/chemistry/shell/app/ChemistryRootContext.java
Wed Mar 10 12:10:24 2010
@@ -64,7 +64,14 @@ public class ChemistryRootContext extend
                     "Not connected: cannot browse repository");
             return null;
         }
-        Repository repo = RepositoryManager.getInstance().getRepository(name);
+        // lookup repository by name
+        Repository repo = null;
+        for (RepositoryEntry re : RepositoryManager.getInstance().getRepositories()) {
+            if (re.getName().equals(name)) {
+                repo = RepositoryManager.getInstance().getRepository(re.getId());
+                break;
+            }
+        }
         if (repo == null) {
             return null;
         }



Mime
View raw message