jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tri...@apache.org
Subject svn commit: r639543 - in /jackrabbit/trunk: jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/util/name/NamespaceAdder.java jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/namespace/NamespaceAdder.java
Date Fri, 21 Mar 2008 04:44:08 GMT
Author: tripod
Date: Thu Mar 20 21:44:03 2008
New Revision: 639543

URL: http://svn.apache.org/viewvc?rev=639543&view=rev
Log:
JCR-1495 NamespaceAdder.addNamespace throws ClassCastException

Modified:
    jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/util/name/NamespaceAdder.java
    jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/namespace/NamespaceAdder.java

Modified: jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/util/name/NamespaceAdder.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/util/name/NamespaceAdder.java?rev=639543&r1=639542&r2=639543&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/util/name/NamespaceAdder.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/util/name/NamespaceAdder.java
Thu Mar 20 21:44:03 2008
@@ -39,10 +39,10 @@
     public void addNamespaces(NamespaceMapping nsm)
             throws NamespaceException, UnsupportedRepositoryOperationException, RepositoryException
{
         Map m = nsm.getPrefixToURIMapping();
-        for (Iterator i = m.values().iterator(); i.hasNext();) {
+        for (Iterator i = m.entrySet().iterator(); i.hasNext();) {
             Map.Entry e = (Map.Entry) i.next();
             String prefix = (String) e.getKey();
-            String uri = (String) e.getKey();
+            String uri = (String) e.getValue();
             registry.registerNamespace(prefix, uri);
         }
     }

Modified: jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/namespace/NamespaceAdder.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/namespace/NamespaceAdder.java?rev=639543&r1=639542&r2=639543&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/namespace/NamespaceAdder.java
(original)
+++ jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/namespace/NamespaceAdder.java
Thu Mar 20 21:44:03 2008
@@ -34,10 +34,10 @@
     public void addNamespaces(NamespaceMapping nsm)
             throws NamespaceException, UnsupportedRepositoryOperationException, RepositoryException
{
         Map m = nsm.getPrefixToURIMapping();
-        for (Iterator i = m.values().iterator(); i.hasNext();) {
+        for (Iterator i = m.entrySet().iterator(); i.hasNext();) {
             Map.Entry e = (Map.Entry) i.next();
             String prefix = (String) e.getKey();
-            String uri = (String) e.getKey();
+            String uri = (String) e.getValue();
             registry.registerNamespace(prefix, uri);
         }
     }



Mime
View raw message