jlowenz / hypergraphdb

Automatically exported from code.google.com/p/hypergraphdb
0 stars 0 forks source link

OrderedLinkCondition throws NPE in hashCode() #91

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
l1 = hg.make(HGHandle.class, database)
    .compile(
        and(
            eq("L1"),
            orderedLink(
                var("aNode", HGHandle.class),
                var("bNode", HGHandle.class)
            )
        )
    );

What is the expected output? What do you see instead?

Exception in thread "main" java.lang.NullPointerException
    at org.hypergraphdb.query.OrderedLinkCondition.hashCode(OrderedLinkCondition.java:143)
    at java.util.HashMap.put(HashMap.java:389)
    at java.util.HashSet.add(HashSet.java:217)
    at org.hypergraphdb.query.cond2qry.ExpressionBasedQuery.toDNF(ExpressionBasedQuery.java:113)
    at org.hypergraphdb.query.cond2qry.ExpressionBasedQuery.compileProcess(ExpressionBasedQuery.java:756)
    at org.hypergraphdb.query.cond2qry.ExpressionBasedQuery.access$0(ExpressionBasedQuery.java:747)
    at org.hypergraphdb.query.cond2qry.ExpressionBasedQuery$2.call(ExpressionBasedQuery.java:742)
    at org.hypergraphdb.query.cond2qry.ExpressionBasedQuery$2.call(ExpressionBasedQuery.java:1)
    at org.hypergraphdb.transaction.HGTransactionManager.transact(HGTransactionManager.java:396)
    at org.hypergraphdb.transaction.HGTransactionManager.ensureTransaction(HGTransactionManager.java:323)
    at org.hypergraphdb.query.cond2qry.ExpressionBasedQuery.compile(ExpressionBasedQuery.java:739)
    at myPackage.HyperGraphRegularPathQuery.<init>(HyperGraphRegularPathQuery.java:67)

What version of the product are you using? On what operating system?
hgdb:1.2

Original issue reported on code.google.com by google-a...@gehrels.info on 17 Dec 2012 at 4:29

GoogleCodeExporter commented 9 years ago
Fix committed to SVN.

Original comment by borislav...@gmail.com on 15 Jan 2013 at 6:06