jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r1505168 - /jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/core/DatasetImpl.java
Date Sat, 20 Jul 2013 16:40:26 GMT
Author: andy
Date: Sat Jul 20 16:40:25 2013
New Revision: 1505168

URL: http://svn.apache.org/r1505168
Log:
Protect against being pass a null for the default model.

Modified:
    jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/core/DatasetImpl.java

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/core/DatasetImpl.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/core/DatasetImpl.java?rev=1505168&r1=1505167&r2=1505168&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/core/DatasetImpl.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/core/DatasetImpl.java Sat Jul
20 16:40:25 2013
@@ -210,6 +210,8 @@ public class DatasetImpl implements Data
     @Override
     public void setDefaultModel(Model model)
     { 
+        if ( model == null )
+            model = ModelFactory.createDefaultModel() ;
         // Assumes single writer.
         removeFromCache(dsg.getDefaultGraph()) ;
         addToCache(model) ;



Mime
View raw message