You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by mc...@apache.org on 2008/04/17 10:49:44 UTC

svn commit: r649008 - /incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/impl/DirectedGraph.java

Author: mcombellack
Date: Thu Apr 17 01:49:40 2008
New Revision: 649008

URL: http://svn.apache.org/viewvc?rev=649008&view=rev
Log:
TUSCANY-2069 - Fixed a NPE build break by the recent change of paths from HashMap to ConcurrentHashMap. The problem is that HashMap supports null keys and values whereas ConcurrentHashMap does not. I've added a null check in the code to make sure that null values are not added to the ConcurrentHashMap

Modified:
    incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/impl/DirectedGraph.java

Modified: incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/impl/DirectedGraph.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/impl/DirectedGraph.java?rev=649008&r1=649007&r2=649008&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/impl/DirectedGraph.java (original)
+++ incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/impl/DirectedGraph.java Thu Apr 17 01:49:40 2008
@@ -316,7 +316,9 @@
             nextNode = extractMin(otherNodes);
             if (nextNode.vertex == target) {
                 path = getPath(nextNode);
-                paths.put(pair, path); // Cache it
+                if (path != null) {
+                    paths.put(pair, path); // Cache it
+                }
                 return path;
             }
             nodesOnPath.add(nextNode);



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org