[dna-issues] [JBoss JIRA] Created: (DNA-463) Federation connector incorrectly expects identification properties on all source nodes

Randall Hauch (JIRA) jira-events at lists.jboss.org
Wed Jun 17 12:16:56 EDT 2009


Federation connector incorrectly expects identification properties on all source nodes
--------------------------------------------------------------------------------------

                 Key: DNA-463
                 URL: https://jira.jboss.org/jira/browse/DNA-463
             Project: DNA
          Issue Type: Bug
    Affects Versions: 0.5
            Reporter: Randall Hauch
            Assignee: Randall Hauch
            Priority: Blocker
             Fix For: 0.6


The JoinProcessor always expects identification properties on all nodes coming from sources.  Since some connectors do not have identification properties, this causes a NullPointerException when accumulating the identification properties:

java.lang.NullPointerException
	at org.jboss.dna.graph.connector.federation.JoinRequestProcessor.process(JoinRequestProcessor.java:272)
	at org.jboss.dna.graph.request.processor.RequestProcessor.process(RequestProcessor.java:235)
	at org.jboss.dna.graph.connector.federation.JoinRequestProcessor.process(JoinRequestProcessor.java:164)
	at org.jboss.dna.graph.connector.federation.FederatedRepositoryConnection.execute(FederatedRepositoryConnection.java:220)
	at org.jboss.dna.graph.connector.RepositoryConnectionPool$ConnectionWrapper.execute(RepositoryConnectionPool.java:991)
	at org.jboss.dna.graph.Graph.execute(Graph.java:243)
	at org.jboss.dna.graph.Graph$5.process(Graph.java:186)
	at org.jboss.dna.graph.request.RequestBuilder.readNode(RequestBuilder.java:139)
	at org.jboss.dna.graph.Graph.getNodeAt(Graph.java:1843)
	at org.jboss.dna.graph.Graph.getNodeAt(Graph.java:1853)

The problem is this snippet:

        // Accumulate the identification properties ...
        for (Property propertyInSource : readFromSource.getActualLocationOfNode().getIdProperties()) {
            ...
        }

since the JavaDoc for getIdProperties() says that it should return null if there are no properties.  This code should be wrapped with a check to see if the Location has identification properties.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the dna-issues mailing list