[
https://issues.apache.org/jira/browse/JENA-1789?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andy Seaborne resolved JENA-1789.
---------------------------------
Fix Version/s: Jena 3.14.0
Resolution: Fixed
> IsoMatcher can return "true" for non-isomorphic patterns.
> ---------------------------------------------------------
>
> Key: JENA-1789
> URL: https://issues.apache.org/jira/browse/JENA-1789
> Project: Apache Jena
> Issue Type: Bug
> Affects Versions: Jena 3.13.1
> Reporter: Andy Seaborne
> Assignee: Andy Seaborne
> Priority: Major
> Fix For: Jena 3.14.0
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> This should be false but it returns true:
> {noformat}
> public static void main(String[] args) {
> Graph graph1 = SSE.parseGraph("(graph (?A :p1 ?B) (?B :p2 ?A))");
> Graph graph2 = SSE.parseGraph("(graph (?A :p1 ?B) (?A :p2 ?B))");
> IsoMatcher match = new IsoMatcher(tuplesTriples(graph1.find()),
> tuplesTriples(graph2.find()),
> new
> BNodeIsoWithVar(NodeUtils.sameValue));
> boolean b = match.match();
> System.out.println();
> System.out.println("IsoMatcher: "+b);
> }
> {noformat}
> BNodeIsoWithVar has the lines:
> {noformat}
> if ( n1.isVariable() && n2.isVariable() )
> return mapping.makeIsomorphic(n1, n2) ;
> {noformat}
> added.
> The bnode for variables case also fails.
> {noformat}
> graph1 = SSE.parseGraph("(graph (<_:a> :p1 <_:b>) (<_:b> :p2
> <_:a>))");
> graph2 = SSE.parseGraph("(graph (<_:a> :p1 <_:b>) (<_:a> :p2
> <_:b>))");
> {noformat}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)