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

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


    [ https://jira.jboss.org/jira/browse/DNA-463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12472566#action_12472566 ] 

Randall Hauch commented on DNA-463:
-----------------------------------

Corrected the for loop that is aggregating the identifier properties on source node locations.  If the location does not even have identifier properties, then this aggregation process is not even performed.

Also added toString() implementations for ProjectedNode and FederatedRequest.

> 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
>          Components: Connectors, Federation
>    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