You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2013/02/17 12:46:13 UTC

svn commit: r1447007 - /jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/store/GraphTDBBase.java

Author: andy
Date: Sun Feb 17 11:46:13 2013
New Revision: 1447007

URL: http://svn.apache.org/r1447007
Log:
Jena-395.  .remove(s?,p?,o?) -- If there are listeners use the general removal code so notifications of triples deleted happen.

Modified:
    jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/store/GraphTDBBase.java

Modified: jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/store/GraphTDBBase.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/store/GraphTDBBase.java?rev=1447007&r1=1447006&r2=1447007&view=diff
==============================================================================
--- jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/store/GraphTDBBase.java (original)
+++ jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/store/GraphTDBBase.java Sun Feb 17 11:46:13 2013
@@ -227,8 +227,16 @@ public abstract class GraphTDBBase exten
     @Override
     public void remove( Node s, Node p, Node o )
     {
+        if ( getEventManager().listening() )
+        {
+            // Have to do it the hard way so that triple events happen.
+            super.remove(s, p, o) ;
+            return ;
+        }
+        
         removeWorker(this, s, p, o) ;
-        getEventManager().notifyEvent(this, GraphEvents.remove(s, p, o) ) ;
+        // We know no one is listening ...
+        //getEventManager().notifyEvent(this, GraphEvents.remove(s, p, o) ) ;
     }