You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Dave Brosius (JIRA)" <ji...@apache.org> on 2008/03/21 03:17:25 UTC
[jira] Created: (JCR-1495) [PATCH] NamespaceAdder.addNamespace has
suspect logic (jcr-commons/spi-commons)
[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.
[jira] Resolved: (JCR-1495) NamespaceAdder.addNamespace throws
ClassCastException
Posted by "Tobias Bocanegra (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-1495?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tobias Bocanegra resolved JCR-1495.
-----------------------------------
Resolution: Fixed
Committed revision 639543.
> 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.
[jira] Updated: (JCR-1495) [PATCH] NamespaceAdder.addNamespace has
suspect logic (jcr-commons/spi-commons)
Posted by "Dave Brosius (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-1495?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dave Brosius updated JCR-1495:
------------------------------
Attachment: suspect_namespaceadder.patch
> [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.
[jira] Assigned: (JCR-1495) [PATCH] NamespaceAdder.addNamespace has
suspect logic (jcr-commons/spi-commons)
Posted by "Tobias Bocanegra (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-1495?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tobias Bocanegra reassigned JCR-1495:
-------------------------------------
Assignee: Tobias Bocanegra
> [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
> Assignee: Tobias Bocanegra
> 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.
[jira] Updated: (JCR-1495) NamespaceAdder.addNamespace throws
ClassCastException
Posted by "Tobias Bocanegra (JIRA)" <ji...@apache.org>.
[ 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.