jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dave Brosius (JIRA)" <j...@apache.org>
Subject [jira] Created: (JCR-1495) [PATCH] NamespaceAdder.addNamespace has suspect logic (jcr-commons/spi-commons)
Date Fri, 21 Mar 2008 02:17:25 GMT
[PATCH] NamespaceAdder.addNamespace has suspect logic (jcr-commons/spi-commons)
-------------------------------------------------------------------------------

                 Key: JCR-1495
                 URL: https://issues.apache.org/jira/browse/JCR-1495
             Project: Jackrabbit
          Issue Type: Bug
          Components: jackrabbit-spi-commons
    Affects Versions: core 1.4.1
            Reporter: Dave Brosius
            Priority: Minor
             Fix For: core 1.4.2
         Attachments: suspect_namespaceadder.patch

Here's the method

public void addNamespaces(NamespaceMapping nsm)
            throws NamespaceException, 
UnsupportedRepositoryOperationException, RepositoryException {
        Map m = nsm.getPrefixToURIMapping();
        for (Iterator i = m.values().iterator(); i.hasNext();) {
            Map.Entry e = (Map.Entry) i.next();
            String prefix = (String) e.getKey();
            String uri = (String) e.getKey();
            registry.registerNamespace(prefix, uri);
        }
    }


should be the entrySet iterator, and uri should come from the value, patch fixes this.
Occurs in both spi-commons and jcr-commons (duplicate code)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message