commonsrdf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject incubator-commonsrdf git commit: BlankNodeImpl salt using System.identityHashCode instead of .toString()
Date Thu, 09 Apr 2015 22:29:46 GMT
Repository: incubator-commonsrdf
Updated Branches:
  refs/heads/master 17de34f3d -> edefcef4d


BlankNodeImpl salt using System.identityHashCode instead of .toString()

still not unique across JVMs (or even across GC-ed objects) - but then
the only way currently to call this is through SimpleRDFTermFactory.

Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/edefcef4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/edefcef4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/edefcef4

Branch: refs/heads/master
Commit: edefcef4d8787362c3c3565d3421244cd4d8bd3a
Parents: 17de34f
Author: Stian Soiland-Reyes <stain@apache.org>
Authored: Thu Apr 9 22:58:53 2015 +0100
Committer: Stian Soiland-Reyes <stain@apache.org>
Committed: Thu Apr 9 22:58:53 2015 +0100

----------------------------------------------------------------------
 .../src/main/java/org/apache/commons/rdf/simple/BlankNodeImpl.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/edefcef4/simple/src/main/java/org/apache/commons/rdf/simple/BlankNodeImpl.java
----------------------------------------------------------------------
diff --git a/simple/src/main/java/org/apache/commons/rdf/simple/BlankNodeImpl.java b/simple/src/main/java/org/apache/commons/rdf/simple/BlankNodeImpl.java
index fb3a871..cacfc5a 100644
--- a/simple/src/main/java/org/apache/commons/rdf/simple/BlankNodeImpl.java
+++ b/simple/src/main/java/org/apache/commons/rdf/simple/BlankNodeImpl.java
@@ -43,7 +43,7 @@ final class BlankNodeImpl implements BlankNode {
         if (Objects.requireNonNull(id).isEmpty()) {
             throw new IllegalArgumentException("Invalid blank node id: " + id);
         }
-        String uuidInput = uuidSalt.toString() + ":" + id;
+        String uuidInput = System.identityHashCode(uuidSalt) + ":" + id;
         // Both the scope and the id are used to create the UUID, ensuring that
         // a caller can reliably create the same bnode if necessary by sending
         // in the same scope.


Mime
View raw message