Uploaded image for project: 'Apache Jena'
  1. Apache Jena
  2. JENA-1786

DatasetGraphMonitor exposes unwrapped graphs

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • Jena 3.14.0
    • None
    • None

    Description

      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:

         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) ; 
          }
      

      Attachments

        Issue Links

          Activity

            People

              andy Andy Seaborne
              strangepleasures Pavel Mikhailovskii
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 40m
                  40m