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 2012/08/28 13:44:04 UTC
svn commit: r1378087 -
/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/http/QueryEngineHTTP.java
Author: andy
Date: Tue Aug 28 11:44:04 2012
New Revision: 1378087
URL: http://svn.apache.org/viewvc?rev=1378087&view=rev
Log:
Mark closed executions as "finished".
Close stream after model.read (execConstruct, execDescribe).
Modified:
jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/http/QueryEngineHTTP.java
Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/http/QueryEngineHTTP.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/http/QueryEngineHTTP.java?rev=1378087&r1=1378086&r2=1378087&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/http/QueryEngineHTTP.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/engine/http/QueryEngineHTTP.java Tue Aug 28 11:44:04 2012
@@ -278,9 +278,10 @@ public class QueryEngineHTTP implements
//Try to select language appropriately here based on the model content type
Lang lang = WebContent.contentTypeToLang(actualContentType);
- if (!lang.isTriples()) throw new QueryException("Endpoint returned Content Type: " + actualContentType + " which is not a valid RDF Graph syntax");
- model.read(in, null, lang.getName()) ;
-
+ if (!lang.isTriples())
+ throw new QueryException("Endpoint returned Content Type: " + actualContentType + " which is not a valid RDF Graph syntax");
+ model.read(in, null, lang.getName()) ;
+ this.close() ;
return model ;
}
@@ -459,7 +460,7 @@ public class QueryEngineHTTP implements
@Override
public void close() {
- finished = false ;
+ finished = true ;
if (retainedConnection != null) {
try { retainedConnection.close(); }
catch (java.io.IOException e) { log.warn("Failed to close connection", e); }