You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "Pavel Mikhailovskii (Jira)" <ji...@apache.org> on 2019/11/28 09:42:00 UTC
[jira] [Commented] (JENA-1786) DatasetGraphMonitor exposes
unwrapped graphs
[ https://issues.apache.org/jira/browse/JENA-1786?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16984277#comment-16984277 ]
Pavel Mikhailovskii commented on JENA-1786:
-------------------------------------------
It's actually a more generic problem and should probably be fixed in DatasetGraphWrapper.
> DatasetGraphMonitor exposes unwrapped graphs
> --------------------------------------------
>
> Key: JENA-1786
> URL: https://issues.apache.org/jira/browse/JENA-1786
> Project: Apache Jena
> Issue Type: Bug
> Reporter: Pavel Mikhailovskii
> Priority: Major
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Both DatasetGraphMonitor.getDefaultGraph and DatasetGraphMonitor.getGraph expose unwrapped graphs from the underlying DatasetGraph. Any changes made to those graphs skip DatasetGraphMonitor's change monitoring.
> To reproduce:
> {code:java}
> public class TestDatasetMonitor extends BaseTest {
> ...
> @Test public void countChanges_05() {
> DatasetGraph dsgBase = DatasetGraphFactory.create() ;
> DatasetChangesCounter dsgChanges = new DatasetChangesCounter() ;
> DatasetGraph dsg = new DatasetGraphMonitor(dsgBase, dsgChanges) ;
> check(dsgChanges, 0, 0, 0, 0) ;
> Graph g = dsg.getDefaultGraph();
> g.add(quad1.asTriple()) ;
> g.delete(quad1.asTriple()) ;
> g.add(quad1.asTriple()) ;
> g.delete(quad1.asTriple()) ;
> check(dsgChanges, 2, 2, 0, 0) ;
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)