You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Tobias Bocanegra (JIRA)" <ji...@apache.org> on 2008/03/21 05:41:25 UTC
[jira] Updated: (JCR-1495) NamespaceAdder.addNamespace throws
ClassCastException
[ https://issues.apache.org/jira/browse/JCR-1495?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tobias Bocanegra updated JCR-1495:
----------------------------------
Component/s: jackrabbit-jcr-commons
Fix Version/s: (was: core 1.4.2)
1.5
Summary: NamespaceAdder.addNamespace throws ClassCastException (was: [PATCH] NamespaceAdder.addNamespace has suspect logic (jcr-commons/spi-commons))
> NamespaceAdder.addNamespace throws ClassCastException
> -----------------------------------------------------
>
> Key: JCR-1495
> URL: https://issues.apache.org/jira/browse/JCR-1495
> Project: Jackrabbit
> Issue Type: Bug
> Components: jackrabbit-jcr-commons, jackrabbit-spi-commons
> Affects Versions: core 1.4.1
> Reporter: Dave Brosius
> Assignee: Tobias Bocanegra
> Priority: Minor
> Fix For: 1.5
>
> 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.