Repository: apache/jena
Pull request #213 (2017-02-01 11:01:22)

JENA-1285: One token type for strings
Having 4 separate string token types means that all four cases have to be considered, yet the more common case is that a string has been seen. Only sometimes does the exact form of the string matter.

This PR changes Jena to have one token type for STRING and separately record the string type seen for when it is needed.



Patch:
diff --git a/apache-jena-libs/pom.xml b/apache-jena-libs/pom.xml
index b4d9d7bf8d..9b3a6dd4c1 100644
--- a/apache-jena-libs/pom.xml
+++ b/apache-jena-libs/pom.xml
@@ -15,12 +15,12 @@
   <artifactId>apache-jena-libs</artifactId>
   <packaging>pom</packaging>
   <name>Apache Jena - Libraries POM</name>
-  <version>3.3.0-SNAPSHOT</version>
+  <version>3.2.0-SNAPSHOT</version>
 
   <parent>
     <groupId>org.apache.jena</groupId>
     <artifactId>jena-parent</artifactId>
-    <version>19-SNAPSHOT</version>
+    <version>18-SNAPSHOT</version>
     <relativePath>../jena-parent</relativePath>
   </parent>
 
@@ -43,13 +43,13 @@
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-tdb</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
     </dependency>
 
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-rdfconnection</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
     </dependency>
 
   </dependencies>
diff --git a/apache-jena-osgi/jena-osgi-features/pom.xml b/apache-jena-osgi/jena-osgi-features/pom.xml
index 1962e0b70f..5e678ece5f 100644
--- a/apache-jena-osgi/jena-osgi-features/pom.xml
+++ b/apache-jena-osgi/jena-osgi-features/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.apache.jena</groupId>
     <artifactId>apache-jena-osgi</artifactId>
-    <version>3.3.0-SNAPSHOT</version>
+    <version>3.2.0-SNAPSHOT</version>
   </parent>
   <artifactId>jena-osgi-features</artifactId>  
   <packaging>bundle</packaging>
diff --git a/apache-jena-osgi/jena-osgi-features/src/main/resources/features.xml b/apache-jena-osgi/jena-osgi-features/src/main/resources/features.xml
index f36694d6ee..f32bf4313b 100644
--- a/apache-jena-osgi/jena-osgi-features/src/main/resources/features.xml
+++ b/apache-jena-osgi/jena-osgi-features/src/main/resources/features.xml
@@ -18,25 +18,24 @@
 
 <features xmlns="http://karaf.apache.org/xmlns/features/v1.0.0">
   
-	<feature name="jena" version="${project.version}">
-		<bundle>mvn:org.apache.jena/jena-osgi/${project.version}</bundle>
-		<feature version="${project.version}">jena_osgi_dependencies</feature>
+	<feature name="jena" version="3">
+		<bundle>mvn:org.apache.jena/jena-osgi/3.1.0-SNAPSHOT</bundle>
+		<feature version="3">jena_osgi_dependencies</feature>
 		<!-- This is normally exposed by Apache Karaf via root classloader -->
 		<!--<feature version="2.11.0">xerces</feature>-->
 	</feature>
 
-	<feature name="jena_osgi_dependencies" version="${project.version}">
-		<bundle>mvn:com.github.andrewoma.dexx/collection/${ver.dexxcollection}</bundle>
-		<bundle>mvn:com.github.jsonld-java/jsonld-java/${ver.jsonldjava}</bundle>
-		<bundle>mvn:com.fasterxml.jackson.core/jackson-core/${ver.jackson}</bundle>
-		<bundle>mvn:com.fasterxml.jackson.core/jackson-databind/${ver.jackson}</bundle>
-		<bundle>mvn:com.fasterxml.jackson.core/jackson-annotations/${ver.jackson}</bundle>
-		<bundle>mvn:org.apache.httpcomponents/httpcore-osgi/${ver.httpcore-osgi}</bundle>
-		<bundle>mvn:org.apache.httpcomponents/httpclient-osgi/${ver.httpclient-osgi}</bundle>
-		<bundle>mvn:org.apache.commons/commons-csv/${ver.commonscsv}</bundle>
-		<bundle>mvn:org.apache.commons/commons-lang3/${ver.commonslang3}</bundle>
-		<bundle>mvn:commons-io/commons-io/${ver.commonsio}</bundle>
-		<bundle>mvn:org.apache.thrift/libthrift/${ver.libthrift}</bundle>	
+	<feature name="jena_osgi_dependencies" version="3">
+		<bundle>mvn:com.github.andrewoma.dexx/collection/0.6</bundle>
+		<bundle>mvn:com.github.jsonld-java/jsonld-java/0.8.2</bundle>
+		<bundle>mvn:com.fasterxml.jackson.core/jackson-core/2.7.3</bundle>
+		<bundle>mvn:com.fasterxml.jackson.core/jackson-databind/2.7.3</bundle>
+		<bundle>mvn:com.fasterxml.jackson.core/jackson-annotations/2.7.3</bundle>
+		<bundle>mvn:org.apache.httpcomponents/httpcore-osgi/4.4.4</bundle>
+		<bundle>mvn:org.apache.httpcomponents/httpclient-osgi/4.5.2</bundle>
+		<bundle>mvn:org.apache.commons/commons-csv/1.2</bundle>
+		<bundle>mvn:org.apache.commons/commons-lang3/3.4</bundle>
+		<bundle>mvn:org.apache.thrift/libthrift/0.9.3</bundle>	
 	</feature>
 
 	<feature name="xerces" version="2.11.0">
diff --git a/apache-jena-osgi/jena-osgi/pom.xml b/apache-jena-osgi/jena-osgi/pom.xml
index 44f9b9553e..a9d84708e9 100644
--- a/apache-jena-osgi/jena-osgi/pom.xml
+++ b/apache-jena-osgi/jena-osgi/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.apache.jena</groupId>
     <artifactId>apache-jena-osgi</artifactId>
-    <version>3.3.0-SNAPSHOT</version>
+    <version>3.2.0-SNAPSHOT</version>
   </parent>
   <artifactId>jena-osgi</artifactId>  
   <packaging>bundle</packaging>
@@ -76,7 +76,7 @@
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-arq</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
       <scope>provided</scope>
       <exclusions>
         <!-- These are all embedded within httpclient-osgi -->
@@ -106,7 +106,7 @@
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-core</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
       <scope>provided</scope>
     </dependency>
    <!-- xerces is needed - but this is marked as optional as some
@@ -126,14 +126,14 @@
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-shaded-guava</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
       <scope>provided</scope>
     </dependency>
     
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-tdb</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
       <scope>provided</scope>
     </dependency>
     <!--
@@ -146,7 +146,7 @@
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-iri</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
       <scope>provided</scope>
     </dependency>
 
diff --git a/apache-jena-osgi/pom.xml b/apache-jena-osgi/pom.xml
index 0e5c8d87ad..2e42084d02 100644
--- a/apache-jena-osgi/pom.xml
+++ b/apache-jena-osgi/pom.xml
@@ -21,13 +21,13 @@
   <parent>
     <groupId>org.apache.jena</groupId>
     <artifactId>jena-parent</artifactId>
-    <version>19-SNAPSHOT</version>
+    <version>18-SNAPSHOT</version>
     <relativePath>../jena-parent</relativePath>
   </parent> 
 
   <name>Apache Jena - OSGi</name>
   <artifactId>apache-jena-osgi</artifactId>
-  <version>3.3.0-SNAPSHOT</version>
+  <version>3.2.0-SNAPSHOT</version>
 
   <description>Apache Jena OSGi distribution and test</description>
   <packaging>pom</packaging>
diff --git a/apache-jena/pom.xml b/apache-jena/pom.xml
index c79ed5efb4..11aad0be83 100644
--- a/apache-jena/pom.xml
+++ b/apache-jena/pom.xml
@@ -29,7 +29,7 @@
   <packaging>pom</packaging>
   <name>Apache Jena - Distribution</name>
   <url>http://jena.apache.org/</url>
-  <version>3.3.0-SNAPSHOT</version>
+  <version>3.2.0-SNAPSHOT</version>
   <description>
     Apache Jena is a API and toolkit for working with semantic web technologies such as RDF and SPARQL using Java.  This artifact represents the source and binary distribution packages generated for releases.
   </description>
@@ -37,7 +37,7 @@
   <parent>
     <groupId>org.apache.jena</groupId>
     <artifactId>jena-parent</artifactId>
-    <version>19-SNAPSHOT</version>
+    <version>18-SNAPSHOT</version>
     <relativePath>../jena-parent</relativePath>
   </parent>
 
@@ -60,13 +60,13 @@
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-arq</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
     </dependency>
 
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-arq</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
       <classifier>sources</classifier>
       <optional>true</optional>
     </dependency>
@@ -74,7 +74,7 @@
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-arq</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
       <classifier>javadoc</classifier>
       <optional>true</optional>
     </dependency>
@@ -82,13 +82,13 @@
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-core</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
     </dependency>
 
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-core</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
       <classifier>sources</classifier>
       <optional>true</optional>
     </dependency>
@@ -96,7 +96,7 @@
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-core</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
       <classifier>javadoc</classifier>
       <optional>true</optional>
     </dependency>
@@ -104,13 +104,13 @@
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-tdb</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
     </dependency>
 
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-tdb</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
       <classifier>sources</classifier>
       <optional>true</optional>
     </dependency>
@@ -118,7 +118,7 @@
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-tdb</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
       <classifier>javadoc</classifier>
       <optional>true</optional>
     </dependency>
@@ -126,13 +126,13 @@
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-rdfconnection</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
     </dependency>
 
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-rdfconnection</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
       <classifier>sources</classifier>
       <optional>true</optional>
     </dependency>
@@ -140,7 +140,7 @@
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-rdfconnection</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
       <classifier>javadoc</classifier>
       <optional>true</optional>
     </dependency>
@@ -148,13 +148,13 @@
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-cmds</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
     </dependency>
 
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-cmds</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
       <classifier>sources</classifier>
       <optional>true</optional>
     </dependency>
@@ -162,7 +162,7 @@
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-cmds</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
       <classifier>javadoc</classifier>
       <optional>true</optional>
     </dependency>
diff --git a/jena-arq/pom.xml b/jena-arq/pom.xml
index ab810fc56a..b65215a7a6 100644
--- a/jena-arq/pom.xml
+++ b/jena-arq/pom.xml
@@ -21,12 +21,12 @@
   <artifactId>jena-arq</artifactId>
   <packaging>jar</packaging>
   <name>Apache Jena - ARQ (SPARQL 1.1 Query Engine)</name>
-  <version>3.3.0-SNAPSHOT</version>
+  <version>3.2.0-SNAPSHOT</version>
 
   <parent>
     <groupId>org.apache.jena</groupId>
     <artifactId>jena-parent</artifactId>
-    <version>19-SNAPSHOT</version>
+    <version>18-SNAPSHOT</version>
     <relativePath>../jena-parent</relativePath>
   </parent>
 
@@ -54,14 +54,14 @@
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-core</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
     </dependency>
 
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-core</artifactId>
       <classifier>tests</classifier>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
       <scope>test</scope>
     </dependency>
 
@@ -69,14 +69,14 @@
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-base</artifactId>
       <classifier>tests</classifier>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
       <scope>test</scope>
     </dependency>
 
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-shaded-guava</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
     </dependency>
     
     <dependency>
diff --git a/jena-arq/src/main/java/org/apache/jena/atlas/json/io/parser/JSONP.java b/jena-arq/src/main/java/org/apache/jena/atlas/json/io/parser/JSONP.java
index 701accfad5..f9d81face7 100644
--- a/jena-arq/src/main/java/org/apache/jena/atlas/json/io/parser/JSONP.java
+++ b/jena-arq/src/main/java/org/apache/jena/atlas/json/io/parser/JSONP.java
@@ -65,7 +65,7 @@ public class JSONP extends JSONParserBase
         for(;;)
         {
             handler.startPair(currLine, currCol) ;
-            if ( ! lookingAt(KEYWORD) && ! lookingAtString() )
+            if ( ! lookingAt(KEYWORD) && ! lookingAtKeyString() )
                 exception("Not a key for a JSON object: "+peekToken()) ;
             String key = peekToken().getImage() ;
             nextToken() ;
@@ -102,11 +102,8 @@ public class JSONP extends JSONParserBase
             case DECIMAL:   { handler.valueDecimal(peekToken().getImage(), currLine, currCol) ; nextToken() ; return ; }
             case DOUBLE:    { handler.valueDouble(peekToken().getImage(), currLine, currCol) ; nextToken() ; return ; }
 
-            // String - liberal
-            case STRING1:
-            case STRING2:
-            case LONG_STRING1:
-            case LONG_STRING2:
+            // String - liberal - includes single quotes and triple quoted forms if the tokenizer supports them. 
+            case STRING:
             {
                 handler.valueString(peekToken().getImage(), currLine, currCol) ;
                 nextToken() ; 
diff --git a/jena-arq/src/main/java/org/apache/jena/atlas/json/io/parser/JSONParserBase.java b/jena-arq/src/main/java/org/apache/jena/atlas/json/io/parser/JSONParserBase.java
index 6d5ade1376..c46a8b122b 100644
--- a/jena-arq/src/main/java/org/apache/jena/atlas/json/io/parser/JSONParserBase.java
+++ b/jena-arq/src/main/java/org/apache/jena/atlas/json/io/parser/JSONParserBase.java
@@ -68,16 +68,12 @@ class JSONParserBase
         return t.hasType(tokenType) ;
     }
     
-    final protected boolean lookingAtString()
+    final protected boolean lookingAtKeyString()
     {
         Token t = peekTokens.peek() ;
         if ( t == null  )
             return false ;
-        if ( t.hasType(TokenType.STRING1) ) return true ;
-        if ( t.hasType(TokenType.STRING2) ) return true ;
-        if ( t.hasType(TokenType.LONG_STRING1) ) return true ;
-        if ( t.hasType(TokenType.LONG_STRING2) ) return true ;
-        return false ;
+        return t.hasType(TokenType.STRING) && ! t.isLongString();
     }
     
     final protected boolean lookingAtNumber()
diff --git a/jena-arq/src/main/java/org/apache/jena/atlas/json/io/parser/TokenizerJSON.java b/jena-arq/src/main/java/org/apache/jena/atlas/json/io/parser/TokenizerJSON.java
index 9c98cc6f4f..6b1f66e1a3 100644
--- a/jena-arq/src/main/java/org/apache/jena/atlas/json/io/parser/TokenizerJSON.java
+++ b/jena-arq/src/main/java/org/apache/jena/atlas/json/io/parser/TokenizerJSON.java
@@ -18,7 +18,26 @@
 
 package org.apache.jena.atlas.json.io.parser;
 
-import static org.apache.jena.atlas.lib.Chars.* ;
+import static org.apache.jena.atlas.lib.Chars.CH_COLON;
+import static org.apache.jena.atlas.lib.Chars.CH_COMMA;
+import static org.apache.jena.atlas.lib.Chars.CH_DOT;
+import static org.apache.jena.atlas.lib.Chars.CH_GT;
+import static org.apache.jena.atlas.lib.Chars.CH_HASH;
+import static org.apache.jena.atlas.lib.Chars.CH_LBRACE;
+import static org.apache.jena.atlas.lib.Chars.CH_LBRACKET;
+import static org.apache.jena.atlas.lib.Chars.CH_LPAREN;
+import static org.apache.jena.atlas.lib.Chars.CH_LT;
+import static org.apache.jena.atlas.lib.Chars.CH_MINUS;
+import static org.apache.jena.atlas.lib.Chars.CH_PLUS;
+import static org.apache.jena.atlas.lib.Chars.CH_QUOTE1;
+import static org.apache.jena.atlas.lib.Chars.CH_QUOTE2;
+import static org.apache.jena.atlas.lib.Chars.CH_RBRACE;
+import static org.apache.jena.atlas.lib.Chars.CH_RBRACKET;
+import static org.apache.jena.atlas.lib.Chars.CH_RPAREN;
+import static org.apache.jena.atlas.lib.Chars.CH_SEMICOLON;
+import static org.apache.jena.atlas.lib.Chars.CR;
+import static org.apache.jena.atlas.lib.Chars.EOF;
+import static org.apache.jena.atlas.lib.Chars.NL;
 
 import java.io.IOException ;
 import java.util.NoSuchElementException ;
@@ -26,6 +45,7 @@ import java.util.NoSuchElementException ;
 import org.apache.jena.atlas.io.IO ;
 import org.apache.jena.atlas.io.PeekReader ;
 import org.apache.jena.atlas.json.JsonParseException ;
+import org.apache.jena.riot.tokens.StringType;
 import org.apache.jena.riot.tokens.Token ;
 import org.apache.jena.riot.tokens.TokenType ;
 import org.apache.jena.riot.tokens.Tokenizer ;
@@ -102,6 +122,7 @@ public class TokenizerJSON implements Tokenizer
         // ---- String
         // Support both "" and '' strings (only "" is legal JSON)
         if ( ch == CH_QUOTE1 || ch == CH_QUOTE2 ) {
+            token.setType(TokenType.STRING);
             reader.readChar() ;
             int ch2 = reader.peekChar() ;
             if ( ch2 == ch ) {
@@ -112,24 +133,19 @@ public class TokenizerJSON implements Tokenizer
                     // """-strings/'''-strings
                     reader.readChar() ;
                     token.setImage(readLong(ch, false)) ;
-                    TokenType tt = (ch == CH_QUOTE1) ? TokenType.LONG_STRING1 : TokenType.LONG_STRING2 ;
-                    token.setType(tt) ;
+                    StringType st = (ch == CH_QUOTE1) ? StringType.LONG_STRING1 : StringType.LONG_STRING2 ;
+                    token.setStringType(st) ;
                     return token ;
                 }
                 // Two quotes then a non-quote.
                 // Must be '' or ""
-
-                // No need to pushback characters as we know the lexical form is
-                // the empty string.
-                // if ( ch2 != EOF ) reader.pushbackChar(ch2) ;
-                // if ( ch1 != EOF ) reader.pushbackChar(ch1) ; // Must be '' or
-                // ""
                 token.setImage("") ;
             } else
                 // Single quote character.
                 token.setImage(allBetween(ch, ch, true, false)) ;
             // Single quoted string.
-            token.setType((ch == CH_QUOTE1) ? TokenType.STRING1 : TokenType.STRING2) ;
+            StringType st = (ch == CH_QUOTE1) ? StringType.STRING1 : StringType.STRING2 ;
+            token.setStringType(st) ;
             return token ;
         }
 
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/lang/LangNTuple.java b/jena-arq/src/main/java/org/apache/jena/riot/lang/LangNTuple.java
index aed16d380a..40768fb87b 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/lang/LangNTuple.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/lang/LangNTuple.java
@@ -18,13 +18,12 @@
 
 package org.apache.jena.riot.lang;
 
-import static org.apache.jena.riot.tokens.TokenType.STRING2 ;
-
 import java.util.Iterator ;
 
 import org.apache.jena.graph.Node ;
 import org.apache.jena.riot.system.ParserProfile ;
 import org.apache.jena.riot.system.StreamRDF ;
+import org.apache.jena.riot.tokens.StringType;
 import org.apache.jena.riot.tokens.Token ;
 import org.apache.jena.riot.tokens.TokenType ;
 import org.apache.jena.riot.tokens.Tokenizer ;
@@ -100,25 +99,26 @@ public abstract class LangNTuple<X> extends LangBase implements Iterator<X>
         switch (token.getType()) {
             case IRI:
             case BNODE:
-            case STRING2:
-                return ;
-            case LITERAL_DT:
-                if ( profile.isStrictMode() && ! token.getSubToken1().hasType(STRING2) )
-                    exception(token, "Illegal single quoted string: %s", token) ;
+                return;
+            case STRING:
+                checkString(token);
                 return ;
             case LITERAL_LANG:
-                if ( profile.isStrictMode() && ! token.getSubToken1().hasType(STRING2) )
-                    exception(token, "Illegal single quoted string: %s", token) ;
+            case LITERAL_DT:
+                checkString(token.getSubToken1());
                 return ;
-            case STRING1:
-                if ( profile.isStrictMode() )
-                    exception(token, "Illegal single quoted string: %s", token) ;
-                break ;
             default:
                 exception(token, "Illegal object: %s", token) ;
         }
     }
-
+    
+    private void checkString(Token token) {
+        if ( token.isLongString() )
+            exception(token, "Triple quoted string not permitted: %s", token) ;
+        if ( profile.isStrictMode() && ! token.hasStringType(StringType.STRING2) )
+            exception(token, "Not a \"\"-quoted string: %s", token); 
+    }
+    
     /** SkipOnBadTerm - do not output tuples with bad RDF terms */ 
     public boolean  getSkipOnBadTerm()                      { return skipOnBadTerm ; }
     /** SkipOnBadTerm - do not output tuples with bad RDF terms */ 
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/lang/LangRDFJSON.java b/jena-arq/src/main/java/org/apache/jena/riot/lang/LangRDFJSON.java
index d495e0711f..cdf0cdc0b3 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/lang/LangRDFJSON.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/lang/LangRDFJSON.java
@@ -441,13 +441,13 @@ public class LangRDFJSON extends LangBase
 
     private boolean isPropertyName()
 	{
-		return lookingAt(TokenType.STRING1) || lookingAt(TokenType.STRING2);
+		return lookingAt(TokenType.STRING);
 	}
 
     private Token checkValidForObjectProperty()
     {
     	Token t = null;
-    	if (lookingAt(TokenType.STRING1) || lookingAt(TokenType.STRING2))
+    	if (lookingAt(TokenType.STRING) )
     		t = nextToken();
     	else
     		exception(peekToken(), "JSON Values given for properties for an Object must be Strings") ;
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/system/ParserProfileBase.java b/jena-arq/src/main/java/org/apache/jena/riot/system/ParserProfileBase.java
index 8ed68e3f01..e855494fc5 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/system/ParserProfileBase.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/system/ParserProfileBase.java
@@ -201,10 +201,6 @@ public class ParserProfileBase implements ParserProfile {
                 return pp.createLangLiteral(str, token.getImage2(), line, col) ;
 
             case STRING :
-            case STRING1 :
-            case STRING2 :
-            case LONG_STRING1 :
-            case LONG_STRING2 :
                 return pp.createStringLiteral(str, line, col) ;
             default : {
                 Node x = pp.createNodeFromToken(currentGraph, token, line, col) ;
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/tokens/StringType.java b/jena-arq/src/main/java/org/apache/jena/riot/tokens/StringType.java
new file mode 100644
index 0000000000..c43eb798fd
--- /dev/null
+++ b/jena-arq/src/main/java/org/apache/jena/riot/tokens/StringType.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.jena.riot.tokens;
+
+/** The seen form of a {@link TokenType#STRING} */
+public enum StringType {
+    /** A string delimited by 1 single-quote character : {@code 'abc'} */
+    STRING1,
+    /** A string delimited by 1 double-quote character : {@code 'abc'} */
+    STRING2,
+    /** A string delimited by 3 single-quote characters : {@code '''abc'''} */
+    LONG_STRING1,
+    /** A string delimited by 3 double-quote characters : {@code """abc"""} */
+    LONG_STRING2
+}
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/tokens/Token.java b/jena-arq/src/main/java/org/apache/jena/riot/tokens/Token.java
index 27810e2cad..084584cf79 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/tokens/Token.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/tokens/Token.java
@@ -60,6 +60,7 @@ public final class Token
     
     private Token subToken1 = null ;            // A related token (used for datatype literals and language tags)
     private Token subToken2 = null ;            // A related token (used for datatype literals and language tags)
+    private StringType stringType = null ;
     
     public int cntrlCode = 0 ;
     private long column ;
@@ -70,14 +71,25 @@ public final class Token
     public static final String ImageTrue    = "true" ;
     public static final String ImageFalse   = "false" ;
     
-    public final TokenType getType()    { return tokenType ; }
-    public final String getImage()      { return tokenImage ; }
+    public final TokenType getType()        { return tokenType ; }
+    public final String getImage()          { return tokenImage ; }
     //public final String getImage1()  { return tokenImage1 ; }
     
-    public final String getImage2()     { return tokenImage2 ; }
-    public final int getCntrlCode()     { return cntrlCode ; }
-    public final Token getSubToken1()   { return subToken1 ; }
-    public final Token getSubToken2()   { return subToken2 ; }
+    public final String getImage2()         { return tokenImage2 ; }
+    public final int getCntrlCode()         { return cntrlCode ; }
+    public final Token getSubToken1()       { return subToken1 ; }
+    public final Token getSubToken2()       { return subToken2 ; }
+    public final StringType getStringType() { return stringType ; }
+    public final boolean hasStringType(StringType st)   { return this.stringType == st ;}
+    public final boolean isLongString() {
+        switch(stringType) {
+            case LONG_STRING1:
+            case LONG_STRING2:
+                return true;
+                default:
+                    return false;
+        }        
+    }
     
     public final Token setType(TokenType tokenType)     { this.tokenType = tokenType ; return this ; }
     public final Token setImage(String tokenImage)      { this.tokenImage = tokenImage ; return this ; }
@@ -90,6 +102,8 @@ public final class Token
     public final Token setSubToken1(Token subToken)     { this.subToken1 = subToken ; return this ; }
     public final Token setSubToken2(Token subToken)     { this.subToken2 = subToken ; return this ; }
     
+    public final Token setStringType(StringType st)     { this.stringType = st ; return this ; }
+    
     static Token create(String s)
     {
         PeekReader pr = PeekReader.readString(s) ;
@@ -176,8 +190,6 @@ public final class Token
         switch (tokenType)
         {
             case STRING: 
-            case STRING1: case STRING2: 
-            case LONG_STRING1: case LONG_STRING2:
                 return getImage() ;
             default:
                 return null ;
@@ -277,24 +289,11 @@ public final class Token
         return sb.toString() ;
     }
     
-    public boolean isEOF() { return tokenType == TokenType.EOF ; }
+    public boolean isEOF()      { return tokenType == TokenType.EOF ; }
     
-    public boolean isWord() { return tokenType == TokenType.KEYWORD ; }
+    public boolean isWord()     { return tokenType == TokenType.KEYWORD ; }
 
-    public boolean isString()
-    {
-        switch(tokenType)
-        {
-            case STRING:
-            case STRING1:
-            case STRING2:
-            case LONG_STRING1:
-            case LONG_STRING2:
-                return true ;
-            default:
-                return false ;
-        }
-    }
+    public boolean isString()   { return tokenType == TokenType.STRING ; }
 
     public boolean isNumber()
     {
@@ -322,10 +321,6 @@ public final class Token
             case LITERAL_DT:
             case LITERAL_LANG:
             case STRING:
-            case STRING1:
-            case STRING2:
-            case LONG_STRING1:
-            case LONG_STRING2:
                 return true ;
             case KEYWORD:
                 if ( tokenImage.equals(ImageANY) )
@@ -346,9 +341,16 @@ public final class Token
             case PREFIXED_NAME :
             case LITERAL_DT:
             case LITERAL_LANG:
-            case STRING1:
-            case STRING2:
-                return true ;
+                return true;
+            case STRING : {
+                switch (stringType) {
+                    case STRING1 :
+                    case STRING2 :
+                        return true;
+                    default :
+                        return false;
+                }
+            }
             default:
                 return false ;
         }
@@ -361,10 +363,6 @@ public final class Token
             case LITERAL_DT:
             case LITERAL_LANG:
             case STRING:
-            case STRING1:
-            case STRING2:
-            case LONG_STRING1:
-            case LONG_STRING2:
                 return true ;
             default:
                 return false ;
@@ -439,10 +437,6 @@ public final class Token
             }
             case LITERAL_LANG : return NodeFactory.createLiteral(tokenImage, tokenImage2)  ;
             case STRING:
-            case STRING1:
-            case STRING2:
-            case LONG_STRING1:
-            case LONG_STRING2:
                 return NodeFactory.createLiteral(tokenImage) ;
             case VAR:
                 return Var.alloc(tokenImage) ;
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/tokens/TokenType.java b/jena-arq/src/main/java/org/apache/jena/riot/tokens/TokenType.java
index 95b3e7a6b7..2a42497618 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/tokens/TokenType.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/tokens/TokenType.java
@@ -19,11 +19,11 @@
 package org.apache.jena.riot.tokens ;
 
 public enum TokenType {
+    
     NODE, IRI, PREFIXED_NAME, BNODE,
     // BOOLEAN,
-    // One kind of string?
-    STRING, // Token created programmatically and superclass of ...
-    STRING1, STRING2, LONG_STRING1, LONG_STRING2,
+    // One kind of string - the seen form is record 
+    STRING, 
 
     LITERAL_LANG, LITERAL_DT, INTEGER, DECIMAL, DOUBLE,
 
@@ -44,5 +44,5 @@ public enum TokenType {
     // = == + - * / \
     EQUALS, EQUIVALENT, PLUS, MINUS, STAR, SLASH, RSLASH,
     // Whitespace, any comment, (one line comment, multiline comment)
-    NL, WS, COMMENT, COMMENT1, COMMENT2, EOF
+    NL, WS, COMMENT, COMMENT1, COMMENT2, EOF;
 }
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/tokens/TokenizerText.java b/jena-arq/src/main/java/org/apache/jena/riot/tokens/TokenizerText.java
index a13e5dfef1..a56119ed4d 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/tokens/TokenizerText.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/tokens/TokenizerText.java
@@ -217,16 +217,20 @@ public final class TokenizerText implements Tokenizer
 
         // ---- Literal
         if ( ch == CH_QUOTE1 || ch == CH_QUOTE2 ) {
+            // The token type is STRING.
+            // We incorporate this into a token for LITERAL_LANG or LITERAL_DT.  
+            token.setType(TokenType.STRING) ;
+            
             reader.readChar() ;
             int ch2 = reader.peekChar() ;
             if ( ch2 == ch ) {
                 reader.readChar() ; // Read potential second quote.
                 int ch3 = reader.peekChar() ;
                 if ( ch3 == ch ) {
-                    reader.readChar() ;
+                    reader.readChar() ;     // Read potential third quote.
                     token.setImage(readLongString(ch, false)) ;
-                    TokenType tt = (ch == CH_QUOTE1) ? TokenType.LONG_STRING1 : TokenType.LONG_STRING2 ;
-                    token.setType(tt) ;
+                    StringType st = (ch == CH_QUOTE1) ? StringType.LONG_STRING1 : StringType.LONG_STRING2 ;
+                    token.setStringType(st) ;
                 } else {
                     // Two quotes then a non-quote.
                     // Must be '' or ""
@@ -236,16 +240,18 @@ public final class TokenizerText implements Tokenizer
                     // if ( ch1 != EOF ) reader.pushbackChar(ch1) ; // Must be
                     // '' or ""
                     token.setImage("") ;
-                    token.setType((ch == CH_QUOTE1) ? TokenType.STRING1 : TokenType.STRING2) ;
+                    StringType st = (ch == CH_QUOTE1) ? StringType.STRING1 : StringType.STRING2 ;
+                    token.setStringType(st) ;
                 }
             } else {
-                // Single quote character.
+                // One quote character.
                 token.setImage(readString(ch, ch)) ;
-                // Single quoted string.
-                token.setType((ch == CH_QUOTE1) ? TokenType.STRING1 : TokenType.STRING2) ;
+                // Record exactly what form of STRING was seen.
+                StringType st = (ch == CH_QUOTE1) ? StringType.STRING1 : StringType.STRING2 ;
+                token.setStringType(st) ;
             }
 
-            // Whte space after lexical part of a literal.
+            // White space after lexical part of a literal.
             skip() ;
             
             // Literal. Is it @ or ^^
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/resultset/JSONInputIterator.java b/jena-arq/src/main/java/org/apache/jena/sparql/resultset/JSONInputIterator.java
index 26575afe77..c8f89f1a61 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/resultset/JSONInputIterator.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/resultset/JSONInputIterator.java
@@ -202,7 +202,7 @@ public class JSONInputIterator extends QueryIteratorBase {
             nextToken();
             vars.clear();
             do {
-                if ( lookingAt(TokenType.STRING1) || lookingAt(TokenType.STRING2) ) {
+                if ( lookingAt(TokenType.STRING) ) {
                     Token t = nextToken();
                     String var = t.getImage();
                     vars.add(var);
@@ -227,7 +227,7 @@ public class JSONInputIterator extends QueryIteratorBase {
                     // End of links
                     nextToken();
                     return;
-                } else if ( lookingAt(TokenType.STRING1) || lookingAt(TokenType.STRING2) ) {
+                } else if ( lookingAt(TokenType.STRING) ) {
                     // Ignore link and continue
                     nextToken();
                 } else {
@@ -491,7 +491,7 @@ public class JSONInputIterator extends QueryIteratorBase {
     }
 
     private String parseNodeInfo(String name) {
-        if ( lookingAt(TokenType.STRING1) || lookingAt(TokenType.STRING2) ) {
+        if ( lookingAt(TokenType.STRING) ) {
             Token t = nextToken();
             String value = t.getImage();
             checkComma(TokenType.RBRACE);
@@ -527,12 +527,12 @@ public class JSONInputIterator extends QueryIteratorBase {
     // JSON Parsing Helpers taken from LangRDFJSON
 
     private boolean isPropertyName() {
-        return lookingAt(TokenType.STRING1) || lookingAt(TokenType.STRING2);
+        return lookingAt(TokenType.STRING);
     }
 
     private Token checkValidForStringProperty(String property) {
         Token t = null;
-        if ( lookingAt(TokenType.STRING1) || lookingAt(TokenType.STRING2) ) {
+        if ( lookingAt(TokenType.STRING) ) {
             t = nextToken();
         } else {
             exception(peekToken(), "JSON Values given for property " + property + " must be Strings");
diff --git a/jena-base/pom.xml b/jena-base/pom.xml
index b8a68f8d08..013ba69022 100644
--- a/jena-base/pom.xml
+++ b/jena-base/pom.xml
@@ -22,11 +22,11 @@
   <parent>
     <groupId>org.apache.jena</groupId>
     <artifactId>jena-parent</artifactId>
-    <version>19-SNAPSHOT</version>
+    <version>18-SNAPSHOT</version>
     <relativePath>../jena-parent</relativePath>
   </parent>
   <artifactId>jena-base</artifactId>
-  <version>3.3.0-SNAPSHOT</version>
+  <version>3.2.0-SNAPSHOT</version>
   <name>Apache Jena - Base Common Environment</name>
   <description>
     This module contains non-RDF library code and the common system runtime.
@@ -37,7 +37,7 @@
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-shaded-guava</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
     </dependency>
 
     <dependency>
diff --git a/jena-cmds/pom.xml b/jena-cmds/pom.xml
index 2a2b9c194e..cdeacecf85 100644
--- a/jena-cmds/pom.xml
+++ b/jena-cmds/pom.xml
@@ -21,13 +21,13 @@
   <parent>
     <groupId>org.apache.jena</groupId>
     <artifactId>jena-parent</artifactId>
-    <version>19-SNAPSHOT</version>
+    <version>18-SNAPSHOT</version>
     <relativePath>../jena-parent</relativePath>
   </parent> 
 
   <name>Apache Jena - Command line tools</name>
   <artifactId>jena-cmds</artifactId>
-  <version>3.3.0-SNAPSHOT</version>
+  <version>3.2.0-SNAPSHOT</version>
 
   <description>Command line tools</description>
 
@@ -67,7 +67,7 @@
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>apache-jena-libs</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
       <type>pom</type>
     </dependency>
 
@@ -92,7 +92,7 @@
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-arq</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
       <classifier>tests</classifier>
       <scope>test</scope>
     </dependency>
@@ -100,7 +100,7 @@
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-core</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
       <classifier>tests</classifier>
       <scope>test</scope>
     </dependency>
@@ -108,7 +108,7 @@
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-base</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
       <classifier>tests</classifier>
       <scope>test</scope>
     </dependency>
diff --git a/jena-core/pom.xml b/jena-core/pom.xml
index f281669a69..e0a0c19ee0 100644
--- a/jena-core/pom.xml
+++ b/jena-core/pom.xml
@@ -22,12 +22,12 @@
   <artifactId>jena-core</artifactId>
   <packaging>jar</packaging>
   <name>Apache Jena - Core</name>
-  <version>3.3.0-SNAPSHOT</version>
+  <version>3.2.0-SNAPSHOT</version>
 
   <parent>
     <groupId>org.apache.jena</groupId>
     <artifactId>jena-parent</artifactId>
-    <version>19-SNAPSHOT</version>
+    <version>18-SNAPSHOT</version>
     <relativePath>../jena-parent</relativePath>
   </parent>
 
@@ -54,7 +54,7 @@
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-iri</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
     </dependency>
 
     <dependency>
@@ -88,13 +88,13 @@
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-base</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
     </dependency>
 
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-base</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
       <classifier>tests</classifier>
       <scope>test</scope>
     </dependency>
diff --git a/jena-core/src/main/java/org/apache/jena/graph/GraphUtil.java b/jena-core/src/main/java/org/apache/jena/graph/GraphUtil.java
index 149e9327aa..ef6dc081d8 100644
--- a/jena-core/src/main/java/org/apache/jena/graph/GraphUtil.java
+++ b/jena-core/src/main/java/org/apache/jena/graph/GraphUtil.java
@@ -18,9 +18,11 @@
 
 package org.apache.jena.graph;
 
+import java.util.ArrayList;
 import java.util.Iterator ;
 import java.util.List ;
 import java.util.Set ;
+
 import org.apache.jena.graph.impl.GraphWithPerform ;
 import org.apache.jena.util.IteratorCollection ;
 import org.apache.jena.util.iterator.ExtendedIterator ;
@@ -115,38 +117,26 @@ public class GraphUtil
     }
         
     public static void add(Graph graph, List<Triple> triples) {
+        addIteratorWorkerDirect(graph, triples.iterator());
         if ( OldStyle && graph instanceof GraphWithPerform )
-        {
-            GraphWithPerform g = (GraphWithPerform)graph ;
-            for (Triple t : triples)
-                g.performAdd(t) ;
             graph.getEventManager().notifyAddList(graph, triples) ;
-        } else
-        {
-            for (Triple t : triples)
-                graph.add(t) ;
-        }
     }
         
     public static void add(Graph graph, Iterator<Triple> it) {
-        // Materialize to avoid ConcurrentModificationException.
-        List<Triple> s = IteratorCollection.iteratorToList(it) ;
-        if ( OldStyle && graph instanceof GraphWithPerform )
-        {
-            GraphWithPerform g = (GraphWithPerform)graph ;
-            for (Triple t : s)
-                g.performAdd(t) ;
+        if ( OldStyle && graph instanceof GraphWithPerform ) {
+            // Materialize for the notify.
+            List<Triple> s = IteratorCollection.iteratorToList(it) ;
+            addIteratorWorkerDirect(graph, s.iterator());
             graph.getEventManager().notifyAddIterator(graph, s) ;
         } 
-        else
-        {
-            for (Triple t : s)
-                graph.add(t) ;
-        }
+        else 
+            addIteratorWorker(graph, it);
     }
     
     /** Add triples into the destination (arg 1) from the source (arg 2)*/
     public static void addInto(Graph dstGraph, Graph srcGraph ) {
+        if ( dstGraph == srcGraph )
+            return ;
         dstGraph.getPrefixMapping().setNsPrefixes(srcGraph.getPrefixMapping()) ;
         addIteratorWorker(dstGraph, GraphUtil.findAll( srcGraph ));  
         dstGraph.getEventManager().notifyAddGraph( dstGraph, srcGraph );
@@ -154,16 +144,17 @@ public class GraphUtil
     
     private static void addIteratorWorker( Graph graph, Iterator<Triple> it ) { 
         List<Triple> s = IteratorCollection.iteratorToList( it );
-        if ( OldStyle && graph instanceof GraphWithPerform )
-        {
-            GraphWithPerform g = (GraphWithPerform)graph ;
-            for (Triple t : s )
-                g.performAdd(t) ;
-        }
-        else
-        {
-            for (Triple t : s )
-                graph.add(t) ;
+        addIteratorWorkerDirect(graph, s.iterator());
+    }
+    
+    private static void addIteratorWorkerDirect( Graph graph, Iterator<Triple> it ) {
+        if ( OldStyle && graph instanceof GraphWithPerform ) {
+            GraphWithPerform g = (GraphWithPerform)graph;
+            while (it.hasNext())
+                g.performAdd(it.next());
+        } else {
+            while (it.hasNext())
+                graph.add(it.next());
         }
     }
 
@@ -180,48 +171,70 @@ public class GraphUtil
     }
     
     public static void delete(Graph graph, List<Triple> triples)
- {
-        if ( OldStyle && graph instanceof GraphWithPerform ) {
-            GraphWithPerform g = (GraphWithPerform)graph ;
-            for ( Triple t : triples )
-                g.performDelete(t) ;
+    {
+        deleteIteratorWorkerDirect(graph, triples.iterator());
+        if ( OldStyle && graph instanceof GraphWithPerform )
             graph.getEventManager().notifyDeleteList(graph, triples) ;
-        } else {
-            for ( Triple t : triples )
-                graph.delete(t) ;
-        }
     }
     
     public static void delete(Graph graph, Iterator<Triple> it)
     {
-        // Materialize to avoid ConcurrentModificationException.
-        List<Triple> s = IteratorCollection.iteratorToList(it) ;
         if ( OldStyle && graph instanceof GraphWithPerform ) {
-            GraphWithPerform g = (GraphWithPerform)graph ;
-            for ( Triple t : s )
-                g.performDelete(t) ;
+            // Materialize for the notify.
+            List<Triple> s = IteratorCollection.iteratorToList(it) ;
+            deleteIteratorWorkerDirect(graph, s.iterator());
             graph.getEventManager().notifyDeleteIterator(graph, s) ;
-        } else {
-            for ( Triple t : s )
-                graph.delete(t) ;
-        }
+        } else
+            deleteIteratorWorker(graph, it);
     }
     
-    /** Delete triples the destination (arg 1) as given in the source (arg 2) */
+    /** Delete triples in the destination (arg 1) as given in the source (arg 2) */
     public static void deleteFrom(Graph dstGraph, Graph srcGraph) {
-        deleteIteratorWorker(dstGraph, GraphUtil.findAll(srcGraph)) ;
+        if ( dstGraph == srcGraph ) {
+            dstGraph.clear();
+            return;
+        }
+        if ( dstGraph.size() > srcGraph.size() ) {
+            // Loop on srcGraph
+            deleteIteratorWorker(dstGraph, GraphUtil.findAll(srcGraph)) ;
+            dstGraph.getEventManager().notifyDeleteGraph(dstGraph, srcGraph) ;
+            return;
+        }
+        // dstGraph smaller.
+        List<Triple> toBeDeleted = new ArrayList<>();
+        // Loop on dstGraph
+        Iterator<Triple> iter = dstGraph.find(null, null, null);
+        for( ; iter.hasNext() ; ) {
+           Triple t = iter.next();
+           if ( srcGraph.contains(t) )
+               toBeDeleted.add(t);
+        }
         dstGraph.getEventManager().notifyDeleteGraph(dstGraph, srcGraph) ;
+        deleteIteratorWorkerDirect(dstGraph, toBeDeleted.iterator());
     }
 
+    /**
+     * Delete the triples supplied by an iterator. This function is "concurrent
+     * modification" safe - it internally takes a copy of the iterator.
+     */
     private static void deleteIteratorWorker(Graph graph, Iterator<Triple> it) {
         List<Triple> s = IteratorCollection.iteratorToList(it) ;
+        deleteIteratorWorkerDirect(graph, s.iterator());
+    }
+
+    /**
+     * Delete the triples supplied by an iterator. This function is not "concurrent
+     * modification" safe; it assumes it can use the iterator while deleting from the
+     * graph.
+     */
+    private static void deleteIteratorWorkerDirect(Graph graph, Iterator<Triple> it) {
         if ( OldStyle && graph instanceof GraphWithPerform ) {
             GraphWithPerform g = (GraphWithPerform)graph ;
-            for ( Triple t : s )
-                g.performDelete(t) ;
+            while(it.hasNext())
+                g.performDelete(it.next()) ;
         } else {
-            for ( Triple t : s )
-                graph.delete(t) ;
+            while(it.hasNext())
+                graph.delete(it.next());
         }
     }
 
diff --git a/jena-csv/pom.xml b/jena-csv/pom.xml
index 51e24294b8..697c369d5c 100644
--- a/jena-csv/pom.xml
+++ b/jena-csv/pom.xml
@@ -21,12 +21,12 @@
   <artifactId>jena-csv</artifactId>
   <packaging>jar</packaging>
   <name>Apache Jena - Data Tables for RDF and SPARQL</name>
-  <version>3.3.0-SNAPSHOT</version>
+  <version>3.2.0-SNAPSHOT</version>
 
   <parent>
     <groupId>org.apache.jena</groupId>
     <artifactId>jena-parent</artifactId>
-    <version>19-SNAPSHOT</version>
+    <version>18-SNAPSHOT</version>
     <relativePath>../jena-parent</relativePath>
   </parent>
   
@@ -55,21 +55,21 @@
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>apache-jena-libs</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
       <type>pom</type>
     </dependency>
 
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-cmds</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
     </dependency>
     
     <!-- Testing support -->
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-base</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
       <classifier>tests</classifier>
       <scope>test</scope>
     </dependency>
diff --git a/jena-elephas/jena-elephas-common/pom.xml b/jena-elephas/jena-elephas-common/pom.xml
index 0b0b3444de..5c6306d978 100644
--- a/jena-elephas/jena-elephas-common/pom.xml
+++ b/jena-elephas/jena-elephas-common/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.apache.jena</groupId>
     <artifactId>jena-elephas</artifactId>
-    <version>3.3.0-SNAPSHOT</version>
+    <version>3.2.0-SNAPSHOT</version>
   </parent>
   <artifactId>jena-elephas-common</artifactId>
   <name>Apache Jena - Elephas - Common API</name>
diff --git a/jena-elephas/jena-elephas-io/pom.xml b/jena-elephas/jena-elephas-io/pom.xml
index 68f48298a0..34efdcf94c 100644
--- a/jena-elephas/jena-elephas-io/pom.xml
+++ b/jena-elephas/jena-elephas-io/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.apache.jena</groupId>
     <artifactId>jena-elephas</artifactId>
-    <version>3.3.0-SNAPSHOT</version>
+    <version>3.2.0-SNAPSHOT</version>
      <relativePath>../</relativePath>
   </parent>
   <artifactId>jena-elephas-io</artifactId>
diff --git a/jena-elephas/jena-elephas-mapreduce/pom.xml b/jena-elephas/jena-elephas-mapreduce/pom.xml
index 6eb32efff6..f167347e9c 100644
--- a/jena-elephas/jena-elephas-mapreduce/pom.xml
+++ b/jena-elephas/jena-elephas-mapreduce/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.apache.jena</groupId>
     <artifactId>jena-elephas</artifactId>
-    <version>3.3.0-SNAPSHOT</version>
+    <version>3.2.0-SNAPSHOT</version>
   </parent>
   <artifactId>jena-elephas-mapreduce</artifactId>
   <name>Apache Jena - Elephas - Map/Reduce</name>
diff --git a/jena-elephas/jena-elephas-stats/pom.xml b/jena-elephas/jena-elephas-stats/pom.xml
index fa5b92045e..e090e67962 100644
--- a/jena-elephas/jena-elephas-stats/pom.xml
+++ b/jena-elephas/jena-elephas-stats/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.apache.jena</groupId>
     <artifactId>jena-elephas</artifactId>
-    <version>3.3.0-SNAPSHOT</version>
+    <version>3.2.0-SNAPSHOT</version>
   </parent>
   <artifactId>jena-elephas-stats</artifactId>
   <name>Apache Jena - Elephas - Statistics Demo App</name>
diff --git a/jena-elephas/pom.xml b/jena-elephas/pom.xml
index 0046fc2c82..0605241237 100644
--- a/jena-elephas/pom.xml
+++ b/jena-elephas/pom.xml
@@ -17,13 +17,13 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <modelVersion>4.0.0</modelVersion>
   <artifactId>jena-elephas</artifactId>
-  <version>3.3.0-SNAPSHOT</version>
+  <version>3.2.0-SNAPSHOT</version>
   <packaging>pom</packaging>
 
   <parent>
     <groupId>org.apache.jena</groupId>
     <artifactId>jena-parent</artifactId>
-    <version>19-SNAPSHOT</version>
+    <version>18-SNAPSHOT</version>
     <relativePath>../jena-parent</relativePath>
   </parent>
 
@@ -93,7 +93,7 @@
       <dependency>
         <groupId>org.apache.jena</groupId>
         <artifactId>jena-arq</artifactId>
-	<version>3.3.0-SNAPSHOT</version>
+	<version>3.2.0-SNAPSHOT</version>
       </dependency>
 
       <!-- Test Dependencies -->
diff --git a/jena-extras/jena-querybuilder/pom.xml b/jena-extras/jena-querybuilder/pom.xml
index 0a48112f05..86b783373c 100644
--- a/jena-extras/jena-querybuilder/pom.xml
+++ b/jena-extras/jena-querybuilder/pom.xml
@@ -26,7 +26,7 @@
     <groupId>org.apache.jena</groupId>
     <artifactId>jena-extras</artifactId>
     <relativePath>..</relativePath>
-    <version>3.3.0-SNAPSHOT</version>
+    <version>3.2.0-SNAPSHOT</version>
   </parent>
 
   <dependencies>
diff --git a/jena-extras/pom.xml b/jena-extras/pom.xml
index f334f31ecc..96c16bd8aa 100644
--- a/jena-extras/pom.xml
+++ b/jena-extras/pom.xml
@@ -18,7 +18,7 @@ limitations under the License.
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <modelVersion>4.0.0</modelVersion>
   <artifactId>jena-extras</artifactId>
-  <version>3.3.0-SNAPSHOT</version>
+  <version>3.2.0-SNAPSHOT</version>
   <packaging>pom</packaging>
   <name>Apache Jena - Extras</name>
   <description>Extra packages for Jena development.
@@ -29,7 +29,7 @@ limitations under the License.
   <parent>
     <groupId>org.apache.jena</groupId>
     <artifactId>jena-parent</artifactId>
-    <version>19-SNAPSHOT</version>
+    <version>18-SNAPSHOT</version>
     <relativePath>../jena-parent</relativePath>
   </parent>
 
@@ -120,7 +120,7 @@ limitations under the License.
       <dependency>
         <groupId>org.apache.jena</groupId>
         <artifactId>apache-jena-libs</artifactId>
-        <version>3.3.0-SNAPSHOT</version>
+        <version>3.2.0-SNAPSHOT</version>
         <type>pom</type>
       </dependency>
       <dependency>
diff --git a/jena-fuseki1/pom.xml b/jena-fuseki1/pom.xml
index b298393286..cec01bcf50 100644
--- a/jena-fuseki1/pom.xml
+++ b/jena-fuseki1/pom.xml
@@ -21,14 +21,14 @@
   <artifactId>jena-fuseki1</artifactId>
   <packaging>jar</packaging>
   <name>Apache Jena - Fuseki1</name>
-  <version>1.6.0-SNAPSHOT</version>
+  <version>1.5.0-SNAPSHOT</version>
   <description>Fuseki is a SPARQL 1.1 Server</description>
   <url>http://jena.apache.org/</url>
 
   <parent>
     <groupId>org.apache.jena</groupId>
     <artifactId>jena-parent</artifactId>
-    <version>19-SNAPSHOT</version>
+    <version>18-SNAPSHOT</version>
     <relativePath>../jena-parent</relativePath>
   </parent> 
 
@@ -77,13 +77,13 @@
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-arq</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
     </dependency>
 
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-arq</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
       <classifier>tests</classifier>
       <scope>test</scope>
     </dependency>
@@ -91,7 +91,7 @@
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-core</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
       <classifier>tests</classifier>
       <scope>test</scope>
     </dependency>
@@ -99,7 +99,7 @@
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-base</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
       <classifier>tests</classifier>
       <scope>test</scope>
     </dependency>
@@ -107,13 +107,13 @@
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-tdb</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
     </dependency>
 
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-text</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
       <exclusions>
         <!-- 
              Get this via commons-fileupload and also via jena-text/sol4j
@@ -130,7 +130,7 @@
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-spatial</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
     </dependency>
 
     <dependency>
diff --git a/jena-fuseki2/apache-jena-fuseki/pom.xml b/jena-fuseki2/apache-jena-fuseki/pom.xml
index 2ec18a8f33..cba3a96b89 100644
--- a/jena-fuseki2/apache-jena-fuseki/pom.xml
+++ b/jena-fuseki2/apache-jena-fuseki/pom.xml
@@ -21,13 +21,13 @@
 
   <name>Apache Jena - Fuseki Binary Distribution</name>
   <artifactId>apache-jena-fuseki</artifactId>
-  <version>2.6.0-SNAPSHOT</version>
+  <version>2.5.0-SNAPSHOT</version>
   <packaging>pom</packaging>
 
   <parent>
     <groupId>org.apache.jena</groupId>
     <artifactId>jena-fuseki</artifactId>
-    <version>2.6.0-SNAPSHOT</version>
+    <version>2.5.0-SNAPSHOT</version>
     <relativePath>..</relativePath>
   </parent> 
   
diff --git a/jena-fuseki2/jena-fuseki-core/pom.xml b/jena-fuseki2/jena-fuseki-core/pom.xml
index 91940815cb..9cb556271d 100644
--- a/jena-fuseki2/jena-fuseki-core/pom.xml
+++ b/jena-fuseki2/jena-fuseki-core/pom.xml
@@ -21,7 +21,7 @@
   <parent>
     <groupId>org.apache.jena</groupId>
     <artifactId>jena-fuseki</artifactId>
-    <version>2.6.0-SNAPSHOT</version>
+    <version>2.5.0-SNAPSHOT</version>
     <relativePath>../</relativePath>
   </parent>
 
@@ -45,14 +45,14 @@
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>apache-jena-libs</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
       <type>pom</type>
     </dependency>
 
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-cmds</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
       <type>pom</type>
     </dependency>
 
@@ -98,7 +98,7 @@
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-text</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
       <exclusions>
         <!--
           Get this via commons-fileupload and also via jena-text/sol4j
@@ -113,7 +113,7 @@
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-spatial</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
     </dependency>
 
     <!-- Apache Shiro -->
@@ -149,7 +149,7 @@
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-arq</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
       <classifier>tests</classifier>
       <scope>test</scope>
     </dependency>
@@ -157,7 +157,7 @@
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-base</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
       <classifier>tests</classifier>
       <scope>test</scope>
     </dependency>
diff --git a/jena-fuseki2/jena-fuseki-embedded/pom.xml b/jena-fuseki2/jena-fuseki-embedded/pom.xml
index d07b32c337..d757af613b 100644
--- a/jena-fuseki2/jena-fuseki-embedded/pom.xml
+++ b/jena-fuseki2/jena-fuseki-embedded/pom.xml
@@ -25,7 +25,7 @@
   <parent>
     <groupId>org.apache.jena</groupId>
     <artifactId>jena-fuseki</artifactId>
-    <version>2.6.0-SNAPSHOT</version>
+    <version>2.5.0-SNAPSHOT</version>
   </parent> 
 
   <packaging>jar</packaging>
@@ -34,7 +34,7 @@
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-fuseki-core</artifactId>
-      <version>2.6.0-SNAPSHOT</version>
+      <version>2.5.0-SNAPSHOT</version>
       <!-- No specific logging - leave to the application -->
       <exclusions>
         <!-- Parts of Jena not needed but picked up via jena-fuseki-core.
diff --git a/jena-fuseki2/jena-fuseki-server/pom.xml b/jena-fuseki2/jena-fuseki-server/pom.xml
index bad77e10cb..5b709869d1 100644
--- a/jena-fuseki2/jena-fuseki-server/pom.xml
+++ b/jena-fuseki2/jena-fuseki-server/pom.xml
@@ -25,7 +25,7 @@
   <parent>
     <groupId>org.apache.jena</groupId>
     <artifactId>jena-fuseki</artifactId>
-    <version>2.6.0-SNAPSHOT</version>
+    <version>2.5.0-SNAPSHOT</version>
     <relativePath>../</relativePath>
   </parent> 
 
@@ -58,7 +58,7 @@
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-cmds</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
     </dependency>
 
   </dependencies>
diff --git a/jena-fuseki2/jena-fuseki-war/pom.xml b/jena-fuseki2/jena-fuseki-war/pom.xml
index d4b77c8b06..f7906438a3 100644
--- a/jena-fuseki2/jena-fuseki-war/pom.xml
+++ b/jena-fuseki2/jena-fuseki-war/pom.xml
@@ -25,7 +25,7 @@
   <parent>
     <groupId>org.apache.jena</groupId>
     <artifactId>jena-fuseki</artifactId>
-    <version>2.6.0-SNAPSHOT</version>
+    <version>2.5.0-SNAPSHOT</version>
     <relativePath>..</relativePath>
   </parent> 
 
diff --git a/jena-fuseki2/pom.xml b/jena-fuseki2/pom.xml
index 5c487a662a..49a68a926b 100644
--- a/jena-fuseki2/pom.xml
+++ b/jena-fuseki2/pom.xml
@@ -21,13 +21,13 @@
   <parent>
     <groupId>org.apache.jena</groupId>
     <artifactId>jena-parent</artifactId>
-    <version>19-SNAPSHOT</version>
+    <version>18-SNAPSHOT</version>
     <relativePath>../jena-parent</relativePath>
   </parent> 
 
   <name>Apache Jena - Fuseki - A SPARQL 1.1 Server</name>
   <artifactId>jena-fuseki</artifactId>
-  <version>2.6.0-SNAPSHOT</version>
+  <version>2.5.0-SNAPSHOT</version>
 
   <description>Fuseki is a SPARQL 1.1 Server which provides the SPARQL query, 
   SPARQL update and SPARQL graph store protocols.
diff --git a/jena-iri/pom.xml b/jena-iri/pom.xml
index 6fc6388642..d1952cf8e4 100644
--- a/jena-iri/pom.xml
+++ b/jena-iri/pom.xml
@@ -23,11 +23,11 @@
   <artifactId>jena-iri</artifactId>
   <packaging>jar</packaging>
   <name>Apache Jena - IRI</name>
-  <version>3.3.0-SNAPSHOT</version>
+  <version>3.2.0-SNAPSHOT</version>
     <parent>
     <groupId>org.apache.jena</groupId>
     <artifactId>jena-parent</artifactId>
-    <version>19-SNAPSHOT</version>
+    <version>18-SNAPSHOT</version>
     <relativePath>../jena-parent</relativePath>
   </parent> 
   
diff --git a/jena-jdbc/jena-jdbc-core/pom.xml b/jena-jdbc/jena-jdbc-core/pom.xml
index ef9c966463..e85426e4ae 100644
--- a/jena-jdbc/jena-jdbc-core/pom.xml
+++ b/jena-jdbc/jena-jdbc-core/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.jena</groupId>
 		<artifactId>jena-jdbc</artifactId>
-		<version>3.3.0-SNAPSHOT</version>
+		<version>3.2.0-SNAPSHOT</version>
 	</parent>
 	<artifactId>jena-jdbc-core</artifactId>
 	<name>Apache Jena - JDBC Core API</name>
@@ -36,7 +36,7 @@
 		<dependency>
 			<groupId>org.apache.jena</groupId>
 			<artifactId>jena-arq</artifactId>
-			<version>3.3.0-SNAPSHOT</version>
+			<version>3.2.0-SNAPSHOT</version>
 		</dependency>
 
     <!-- Jena Driver configures Log4j directly -->
diff --git a/jena-jdbc/jena-jdbc-driver-bundle/pom.xml b/jena-jdbc/jena-jdbc-driver-bundle/pom.xml
index a0f7c993ea..11de257676 100644
--- a/jena-jdbc/jena-jdbc-driver-bundle/pom.xml
+++ b/jena-jdbc/jena-jdbc-driver-bundle/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.jena</groupId>
 		<artifactId>jena-jdbc</artifactId>
-		<version>3.3.0-SNAPSHOT</version>
+		<version>3.2.0-SNAPSHOT</version>
 	</parent>
 	<artifactId>jena-jdbc-driver-bundle</artifactId>
 	<name>Apache Jena - JDBC Driver Bundle</name>
@@ -45,17 +45,17 @@
 		<dependency>
 			<groupId>org.apache.jena</groupId>
 			<artifactId>jena-jdbc-driver-mem</artifactId>
-			<version>3.3.0-SNAPSHOT</version>
+			<version>3.2.0-SNAPSHOT</version>
 		</dependency>
 		<dependency>
 			<groupId>org.apache.jena</groupId>
 			<artifactId>jena-jdbc-driver-remote</artifactId>
-			<version>3.3.0-SNAPSHOT</version>
+			<version>3.2.0-SNAPSHOT</version>
 		</dependency>
 		<dependency>
 			<groupId>org.apache.jena</groupId>
 			<artifactId>jena-jdbc-driver-tdb</artifactId>
-			<version>3.3.0-SNAPSHOT</version>
+			<version>3.2.0-SNAPSHOT</version>
 		</dependency>
 
 		<!-- Test Dependencies -->
@@ -67,41 +67,41 @@
 		<dependency>
 			<groupId>org.apache.jena</groupId>
 			<artifactId>jena-jdbc-driver-mem</artifactId>
-			<version>3.3.0-SNAPSHOT</version>
+			<version>3.2.0-SNAPSHOT</version>
 			<classifier>tests</classifier>
 			<scope>test</scope>
 		</dependency>
 		<dependency>
 			<groupId>org.apache.jena</groupId>
 			<artifactId>jena-jdbc-driver-remote</artifactId>
-			<version>3.3.0-SNAPSHOT</version>
+			<version>3.2.0-SNAPSHOT</version>
 			<classifier>tests</classifier>
 			<scope>test</scope>
 		</dependency>
 		<dependency>
 			<groupId>org.apache.jena</groupId>
 			<artifactId>jena-jdbc-driver-tdb</artifactId>
-			<version>3.3.0-SNAPSHOT</version>
+			<version>3.2.0-SNAPSHOT</version>
 			<classifier>tests</classifier>
 			<scope>test</scope>
 		</dependency>
 		<dependency>
 			<groupId>org.apache.jena</groupId>
 			<artifactId>jena-jdbc-core</artifactId>
-			<version>3.3.0-SNAPSHOT</version>
+			<version>3.2.0-SNAPSHOT</version>
 			<classifier>tests</classifier>
 			<scope>test</scope>
 		</dependency>
 		<dependency>
 			<groupId>org.apache.jena</groupId>
 			<artifactId>jena-fuseki1</artifactId>
-			<version>1.6.0-SNAPSHOT</version>
+			<version>1.5.0-SNAPSHOT</version>
 			<scope>test</scope>
 		</dependency>
 		<dependency>
 			<groupId>org.apache.jena</groupId>
 			<artifactId>jena-fuseki1</artifactId>
-			<version>1.6.0-SNAPSHOT</version>
+			<version>1.5.0-SNAPSHOT</version>
 			<classifier>tests</classifier>
 			<scope>test</scope>
 		</dependency>
diff --git a/jena-jdbc/jena-jdbc-driver-mem/pom.xml b/jena-jdbc/jena-jdbc-driver-mem/pom.xml
index 20d1635f32..e428d6c6a2 100644
--- a/jena-jdbc/jena-jdbc-driver-mem/pom.xml
+++ b/jena-jdbc/jena-jdbc-driver-mem/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.jena</groupId>
 		<artifactId>jena-jdbc</artifactId>
-		<version>3.3.0-SNAPSHOT</version>
+		<version>3.2.0-SNAPSHOT</version>
 	</parent>
 	<artifactId>jena-jdbc-driver-mem</artifactId>
 	<name>Apache Jena - JDBC In-Memory Driver</name>
@@ -36,14 +36,14 @@
 		<dependency>
 			<groupId>org.apache.jena</groupId>
 			<artifactId>jena-jdbc-core</artifactId>
-			<version>3.3.0-SNAPSHOT</version>
+			<version>3.2.0-SNAPSHOT</version>
 		</dependency>
 
 		<!-- Test Dependencies -->
 		<dependency>
 			<groupId>org.apache.jena</groupId>
 			<artifactId>jena-jdbc-core</artifactId>
-			<version>3.3.0-SNAPSHOT</version>
+			<version>3.2.0-SNAPSHOT</version>
 			<classifier>tests</classifier>
 			<scope>test</scope>
 		</dependency>
diff --git a/jena-jdbc/jena-jdbc-driver-remote/pom.xml b/jena-jdbc/jena-jdbc-driver-remote/pom.xml
index d57a6b8da8..f13ab1be32 100644
--- a/jena-jdbc/jena-jdbc-driver-remote/pom.xml
+++ b/jena-jdbc/jena-jdbc-driver-remote/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.jena</groupId>
 		<artifactId>jena-jdbc</artifactId>
-		<version>3.3.0-SNAPSHOT</version>
+		<version>3.2.0-SNAPSHOT</version>
 	</parent>
 	<artifactId>jena-jdbc-driver-remote</artifactId>
 	<name>Apache Jena - JDBC Remote Endpoint Driver</name>
@@ -36,26 +36,26 @@
 		<dependency>
 			<groupId>org.apache.jena</groupId>
 			<artifactId>jena-jdbc-core</artifactId>
-			<version>3.3.0-SNAPSHOT</version>
+			<version>3.2.0-SNAPSHOT</version>
 		</dependency>
 		<!-- Test Dependencies -->
 		<dependency>
 			<groupId>org.apache.jena</groupId>
 			<artifactId>jena-jdbc-core</artifactId>
-			<version>3.3.0-SNAPSHOT</version>
+			<version>3.2.0-SNAPSHOT</version>
 			<classifier>tests</classifier>
 			<scope>test</scope>
 		</dependency>
 		<dependency>
 			<groupId>org.apache.jena</groupId>
 			<artifactId>jena-fuseki1</artifactId>
-			<version>1.6.0-SNAPSHOT</version>
+			<version>1.5.0-SNAPSHOT</version>
 			<scope>test</scope>
 		</dependency>
 		<dependency>
 			<groupId>org.apache.jena</groupId>
 			<artifactId>jena-fuseki1</artifactId>
-			<version>1.6.0-SNAPSHOT</version>
+			<version>1.5.0-SNAPSHOT</version>
 			<scope>test</scope>
 			<classifier>tests</classifier>
 		</dependency>
diff --git a/jena-jdbc/jena-jdbc-driver-tdb/pom.xml b/jena-jdbc/jena-jdbc-driver-tdb/pom.xml
index 72282ffbeb..1f727a1449 100644
--- a/jena-jdbc/jena-jdbc-driver-tdb/pom.xml
+++ b/jena-jdbc/jena-jdbc-driver-tdb/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.jena</groupId>
 		<artifactId>jena-jdbc</artifactId>
-		<version>3.3.0-SNAPSHOT</version>
+		<version>3.2.0-SNAPSHOT</version>
 	</parent>
 	<artifactId>jena-jdbc-driver-tdb</artifactId>
 	<name>Apache Jena - JDBC TDB Driver</name>
@@ -36,12 +36,12 @@
 		<dependency>
 			<groupId>org.apache.jena</groupId>
 			<artifactId>jena-jdbc-core</artifactId>
-			<version>3.3.0-SNAPSHOT</version>
+			<version>3.2.0-SNAPSHOT</version>
 		</dependency>
 		<dependency>
 			<groupId>org.apache.jena</groupId>
 			<artifactId>jena-tdb</artifactId>
-			<version>3.3.0-SNAPSHOT</version>
+			<version>3.2.0-SNAPSHOT</version>
 		</dependency>
 
 		<!-- Test Dependencies -->
@@ -53,14 +53,14 @@
 		<dependency>
 			<groupId>org.apache.jena</groupId>
 			<artifactId>jena-jdbc-core</artifactId>
-			<version>3.3.0-SNAPSHOT</version>
+			<version>3.2.0-SNAPSHOT</version>
 			<classifier>tests</classifier>
 			<scope>test</scope>
 		</dependency>
 		<dependency>
 			<groupId>org.apache.jena</groupId>
 			<artifactId>jena-jdbc-driver-mem</artifactId>
-			<version>3.3.0-SNAPSHOT</version>
+			<version>3.2.0-SNAPSHOT</version>
 			<classifier>tests</classifier>
 			<scope>test</scope>
 		</dependency>
diff --git a/jena-jdbc/pom.xml b/jena-jdbc/pom.xml
index e752fcdb6b..0ab2a2147b 100644
--- a/jena-jdbc/pom.xml
+++ b/jena-jdbc/pom.xml
@@ -21,7 +21,7 @@
 	<modelVersion>4.0.0</modelVersion>
 	<groupId>org.apache.jena</groupId>
 	<artifactId>jena-jdbc</artifactId>
-	<version>3.3.0-SNAPSHOT</version>
+	<version>3.2.0-SNAPSHOT</version>
 	<packaging>pom</packaging>
 	<name>Apache Jena - JDBC Parent</name>
 	<description>This is the parent module for the Jena JDBC modules.  These modules provide JDBC Type 4 drivers for in-memory and TDB datasets as well as remote SPARQL endpoints.</description>
@@ -29,7 +29,7 @@
 	<parent>
 		<groupId>org.apache.jena</groupId>
 		<artifactId>jena-parent</artifactId>
-		<version>19-SNAPSHOT</version>
+		<version>18-SNAPSHOT</version>
 		<relativePath>../jena-parent</relativePath>
 	</parent>
 
diff --git a/jena-parent/pom.xml b/jena-parent/pom.xml
index 8af18b4ddd..2c8120b5bc 100644
--- a/jena-parent/pom.xml
+++ b/jena-parent/pom.xml
@@ -23,7 +23,7 @@
   <artifactId>jena-parent</artifactId>
   <packaging>pom</packaging>
   <url>http://jena.apache.org/</url>
-  <version>19-SNAPSHOT</version>
+  <version>18-SNAPSHOT</version>
   <name>Apache Jena - Parent</name>
 
   <parent>
@@ -51,17 +51,9 @@
     <ver.log4j>1.2.17</ver.log4j>
     <ver.junit>4.12</ver.junit>
     <ver.xerces>2.11.0</ver.xerces>
-    <ver.libthrift>0.9.3</ver.libthrift>
-    <!-- the following three libraries must work together
-     consult jsonld-java's POM for the correct dependency versions -->
-    <ver.jsonldjava>0.9.0</ver.jsonldjava>
-    <ver.jackson>2.7.4</ver.jackson>
-    <ver.commonsio>2.5</ver.commonsio>
-    
-    <ver.commonslang3>3.4</ver.commonslang3>
-    <ver.commonscsv>1.3</ver.commonscsv>
-    <ver.dexxcollection>0.6</ver.dexxcollection>
 
+    <ver.jsonldjava>0.9.0</ver.jsonldjava>
+ 
     <!-- These are connected because solr4j depends on httpclient as well -->
     <ver.httpclient>4.5.2</ver.httpclient>
     <ver.httpcore>4.4.4</ver.httpcore>
@@ -160,7 +152,7 @@
       <dependency>
         <groupId>org.apache.thrift</groupId>
         <artifactId>libthrift</artifactId>
-        <version>${ver.libthrift}</version>
+        <version>0.9.3</version>
         <exclusions>
           <!-- Use whatever version Jena is using -->
           <exclusion>
@@ -177,13 +169,13 @@
       <dependency>
         <groupId>org.apache.commons</groupId>
         <artifactId>commons-csv</artifactId>
-        <version>${ver.commonscsv}</version>
+        <version>1.3</version>
       </dependency>
 
       <dependency>
         <groupId>org.apache.commons</groupId>
         <artifactId>commons-lang3</artifactId>
-        <version>${ver.commonslang3}</version>
+        <version>3.4</version>
       </dependency>
 
       <dependency>
@@ -202,7 +194,7 @@
       <dependency>
         <groupId>com.github.andrewoma.dexx</groupId>
         <artifactId>collection</artifactId>
-        <version>${ver.dexxcollection}</version>
+        <version>0.6</version>
       </dependency>
       
       <dependency>
diff --git a/jena-permissions/pom.xml b/jena-permissions/pom.xml
index de395bef75..56741b7f93 100644
--- a/jena-permissions/pom.xml
+++ b/jena-permissions/pom.xml
@@ -21,7 +21,7 @@
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.apache.jena</groupId>
   <artifactId>jena-permissions</artifactId>
-  <version>3.3.0-SNAPSHOT</version>
+  <version>3.2.0-SNAPSHOT</version>
   <properties>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
@@ -34,7 +34,7 @@
   <parent>
     <groupId>org.apache.jena</groupId>
     <artifactId>jena-parent</artifactId>
-    <version>19-SNAPSHOT</version>
+    <version>18-SNAPSHOT</version>
     <relativePath>../jena-parent</relativePath>
   </parent>
 	<organization>
diff --git a/jena-rdfconnection/pom.xml b/jena-rdfconnection/pom.xml
index aa90b49926..dc4d766459 100644
--- a/jena-rdfconnection/pom.xml
+++ b/jena-rdfconnection/pom.xml
@@ -17,7 +17,9 @@
    limitations under the License.
 1-->
 
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" 
+	 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 
   <modelVersion>4.0.0</modelVersion>
 
@@ -25,14 +27,14 @@
   <artifactId>jena-rdfconnection</artifactId>
   <packaging>jar</packaging>
   <name>Apache Jena - RDF Connection</name>
-  <version>3.3.0-SNAPSHOT</version>
+  <version>3.2.0-SNAPSHOT</version>
 
   <description>RDF Connection</description>
 
   <parent>
     <groupId>org.apache.jena</groupId>
     <artifactId>jena-parent</artifactId>
-    <version>19-SNAPSHOT</version>
+    <version>18-SNAPSHOT</version>
     <relativePath>../jena-parent</relativePath>
   </parent>
 
@@ -47,13 +49,13 @@
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-arq</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
     </dependency>
 
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-base</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
       <classifier>tests</classifier>
       <scope>test</scope>
     </dependency>
@@ -61,7 +63,7 @@
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-arq</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
       <classifier>tests</classifier>
       <scope>test</scope>
     </dependency>
@@ -70,7 +72,7 @@
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-core</artifactId>
       <classifier>tests</classifier>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
       <scope>test</scope>
     </dependency>    
 
diff --git a/jena-sdb/pom.xml b/jena-sdb/pom.xml
index 5bc4e7b182..ddfdb04256 100644
--- a/jena-sdb/pom.xml
+++ b/jena-sdb/pom.xml
@@ -21,12 +21,12 @@
   <artifactId>jena-sdb</artifactId>
   <packaging>jar</packaging>
   <name>Apache Jena - SDB (SQL based triple store)</name>
-  <version>3.3.0-SNAPSHOT</version>
+  <version>3.2.0-SNAPSHOT</version>
 
   <parent>
     <groupId>org.apache.jena</groupId>
     <artifactId>jena-parent</artifactId>
-    <version>19-SNAPSHOT</version>
+    <version>18-SNAPSHOT</version>
     <relativePath>../jena-parent</relativePath>
   </parent> 
 
@@ -43,20 +43,20 @@
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-arq</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
     </dependency>
 
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-cmds</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
     </dependency>
     
     <!-- Need the tests as well -->
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-arq</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
       <classifier>tests</classifier>
       <scope>test</scope>
     </dependency>
@@ -65,7 +65,7 @@
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-core</artifactId>
       <classifier>tests</classifier>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
       <scope>test</scope>
     </dependency>
 
@@ -73,7 +73,7 @@
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-base</artifactId>
       <classifier>tests</classifier>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
       <scope>test</scope>
     </dependency>
 
diff --git a/jena-shaded-guava/pom.xml b/jena-shaded-guava/pom.xml
index 4588dea8b3..2bc6da2805 100644
--- a/jena-shaded-guava/pom.xml
+++ b/jena-shaded-guava/pom.xml
@@ -22,11 +22,11 @@
   <parent>
     <groupId>org.apache.jena</groupId>
     <artifactId>jena-parent</artifactId>
-    <version>19-SNAPSHOT</version>
+    <version>18-SNAPSHOT</version>
     <relativePath>../jena-parent</relativePath>
   </parent>
   <artifactId>jena-shaded-guava</artifactId>
-  <version>3.3.0-SNAPSHOT</version>
+  <version>3.2.0-SNAPSHOT</version>
   <name>Apache Jena - Shadowed external libraries</name>
   <description>
     This module shades Google's Guava.
diff --git a/jena-spatial/pom.xml b/jena-spatial/pom.xml
index 59aad5e333..bb2434ae33 100644
--- a/jena-spatial/pom.xml
+++ b/jena-spatial/pom.xml
@@ -21,12 +21,12 @@
   <artifactId>jena-spatial</artifactId>
   <packaging>jar</packaging>
   <name>Apache Jena - SPARQL Spatial Search</name>
-  <version>3.3.0-SNAPSHOT</version>
+  <version>3.2.0-SNAPSHOT</version>
 
   <parent>
     <groupId>org.apache.jena</groupId>
     <artifactId>jena-parent</artifactId>
-    <version>19-SNAPSHOT</version>
+    <version>18-SNAPSHOT</version>
     <relativePath>../jena-parent</relativePath>
   </parent>
 
@@ -43,21 +43,21 @@
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>apache-jena-libs</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
       <type>pom</type>
     </dependency>
 
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-cmds</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
     </dependency>
 
     <!-- Testing support -->
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-base</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
       <classifier>tests</classifier>
       <scope>test</scope>
     </dependency>
diff --git a/jena-tdb/pom.xml b/jena-tdb/pom.xml
index 9133e1c1b2..83c73b6cd4 100644
--- a/jena-tdb/pom.xml
+++ b/jena-tdb/pom.xml
@@ -21,12 +21,12 @@
   <artifactId>jena-tdb</artifactId>
   <packaging>jar</packaging>
   <name>Apache Jena - TDB (Native Triple Store)</name>
-  <version>3.3.0-SNAPSHOT</version>
+  <version>3.2.0-SNAPSHOT</version>
 
   <parent>
     <groupId>org.apache.jena</groupId>
     <artifactId>jena-parent</artifactId>
-    <version>19-SNAPSHOT</version>
+    <version>18-SNAPSHOT</version>
     <relativePath>../jena-parent</relativePath>
   </parent> 
 
@@ -54,14 +54,14 @@
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-arq</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
     </dependency>
 
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-arq</artifactId>
       <classifier>tests</classifier>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
       <scope>test</scope>
     </dependency>
 
@@ -69,7 +69,7 @@
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-core</artifactId>
       <classifier>tests</classifier>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
       <scope>test</scope>
     </dependency>
 
@@ -77,7 +77,7 @@
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-base</artifactId>
       <classifier>tests</classifier>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
       <scope>test</scope>
     </dependency>
 
diff --git a/jena-text/pom.xml b/jena-text/pom.xml
index c201e61b19..ef826f9c66 100644
--- a/jena-text/pom.xml
+++ b/jena-text/pom.xml
@@ -21,12 +21,12 @@
   <artifactId>jena-text</artifactId>
   <packaging>jar</packaging>
   <name>Apache Jena - SPARQL Text Search</name>
-  <version>3.3.0-SNAPSHOT</version>
+  <version>3.2.0-SNAPSHOT</version>
 
   <parent>
     <groupId>org.apache.jena</groupId>
     <artifactId>jena-parent</artifactId>
-    <version>19-SNAPSHOT</version>
+    <version>18-SNAPSHOT</version>
     <relativePath>../jena-parent</relativePath>
   </parent>
 
@@ -41,14 +41,14 @@
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>apache-jena-libs</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
       <type>pom</type>
     </dependency>
     
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-cmds</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
     </dependency>
     
     <dependency>
@@ -60,7 +60,7 @@
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-base</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
       <classifier>tests</classifier>
       <scope>test</scope>
     </dependency>
diff --git a/pom.xml b/pom.xml
index c435066d33..8848b0b78a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
   <artifactId>jena</artifactId>
   <packaging>pom</packaging>
   <url>http://jena.apache.org/</url>
-  <version>3.3.0-SNAPSHOT</version>
+  <version>3.2.0-SNAPSHOT</version>
 
   <!-- The org.apache:apache version is also in jena-parent pom.xml -->
   <parent>


Test patch:
diff --git a/jena-arq/src/test/java/org/apache/jena/riot/tokens/TestTokenizer.java b/jena-arq/src/test/java/org/apache/jena/riot/tokens/TestTokenizer.java
index a568c52b76..4baf1f2afb 100644
--- a/jena-arq/src/test/java/org/apache/jena/riot/tokens/TestTokenizer.java
+++ b/jena-arq/src/test/java/org/apache/jena/riot/tokens/TestTokenizer.java
@@ -60,6 +60,12 @@ public class TestTokenizer extends BaseTest {
         return tokenizeAndTestExact(input, tokenType, tokenImage, null) ;
     }
 
+    private static Token tokenizeAndTestExact(String input, StringType stringType, String tokenImage) {
+        Token token = tokenizeAndTestExact(input, TokenType.STRING, tokenImage, null) ;
+        assertEquals(stringType, token.getStringType()); 
+        return token;
+    }
+
     private static Token tokenizeAndTestExact(String input, TokenType tokenType, String tokenImage1, String tokenImage2) {
         Tokenizer tokenizer = tokenizer(input) ;
         Token token = testNextToken(tokenizer, tokenType, tokenImage1, tokenImage2) ;
@@ -239,38 +245,38 @@ public class TestTokenizer extends BaseTest {
 
     @Test
     public void tokenUnit_str1() {
-        tokenizeAndTestExact("   'abc'   ", TokenType.STRING1, "abc") ;
+        tokenizeAndTestExact("   'abc'   ", StringType.STRING1, "abc") ;
     }
 
     @Test
     public void tokenUnit_str2() {
-        tokenizeAndTestExact("   ''   ", TokenType.STRING1, "") ;
+        tokenizeAndTestExact("   ''   ", StringType.STRING1, "") ;
     }
 
     @Test
     public void tokenUnit_str3() {
-        tokenizeAndTestExact("'\\u0020'", TokenType.STRING1, " ") ;
+        tokenizeAndTestExact("'\\u0020'", StringType.STRING1, " ") ;
     }
 
     @Test
     public void tokenUnit_str4() {
-        tokenizeAndTestExact("'a\\'\\\"\\n\\t\\r\\f'", TokenType.STRING1, "a'\"\n\t\r\f") ;
+        tokenizeAndTestExact("'a\\'\\\"\\n\\t\\r\\f'", StringType.STRING1, "a'\"\n\t\r\f") ;
     }
 
     @Test(expected = RiotParseException.class)
     public void tokenUnit_str5() {
         // This is a raw newline. \n is a Java string escape.
-        tokenizeAndTestExact("'\n'", TokenType.STRING1, "\n") ;
+        tokenizeAndTestExact("'\n'", StringType.STRING1, "\n") ;
     }
 
     @Test
     public void tokenUnit_str6() {
-        tokenizeAndTestExact("   \"abc\"   ", TokenType.STRING2, "abc") ;
+        tokenizeAndTestExact("   \"abc\"   ", StringType.STRING2, "abc") ;
     }
 
     @Test
     public void tokenUnit_str7() {
-        tokenizeAndTestExact("\"\"", TokenType.STRING2, "") ;
+        tokenizeAndTestExact("\"\"", StringType.STRING2, "") ;
     }
 
     @Test(expected = RiotParseException.class)
@@ -286,57 +292,57 @@ public class TestTokenizer extends BaseTest {
 
     @Test
     public void tokenUnit_str10() {
-        tokenizeAndTestExact("'\\'abc'", TokenType.STRING1, "'abc") ;
+        tokenizeAndTestExact("'\\'abc'", StringType.STRING1, "'abc") ;
     }
 
     @Test
     public void tokenUnit_str11() {
-        tokenizeAndTestExact("'\\U00000020'", TokenType.STRING1, " ") ;
+        tokenizeAndTestExact("'\\U00000020'", StringType.STRING1, " ") ;
     }
 
     @Test
     public void tokenUnit_str_long1() {
-        tokenizeAndTestExact("'''aaa'''", TokenType.LONG_STRING1, "aaa") ;
+        tokenizeAndTestExact("'''aaa'''", StringType.LONG_STRING1, "aaa") ;
     }
 
     @Test
     public void tokenUnit_str_long2() {
-        tokenizeAndTestExact("\"\"\"aaa\"\"\"", TokenType.LONG_STRING2, "aaa") ;
+        tokenizeAndTestExact("\"\"\"aaa\"\"\"", StringType.LONG_STRING2, "aaa") ;
     }
 
     @Test
     public void tokenUnit_str_long3() {
-        tokenizeAndTestExact("''''1234'''", TokenType.LONG_STRING1, "'1234") ;
+        tokenizeAndTestExact("''''1234'''", StringType.LONG_STRING1, "'1234") ;
     }
 
     @Test
     public void tokenUnit_str_long4() {
-        tokenizeAndTestExact("'''''1234'''", TokenType.LONG_STRING1, "''1234") ;
+        tokenizeAndTestExact("'''''1234'''", StringType.LONG_STRING1, "''1234") ;
     }
 
     @Test
     public void tokenUnit_str_long5() {
-        tokenizeAndTestExact("'''\\'''1234'''", TokenType.LONG_STRING1, "'''1234") ;
+        tokenizeAndTestExact("'''\\'''1234'''", StringType.LONG_STRING1, "'''1234") ;
     }
 
     @Test
     public void tokenUnit_str_long6() {
-        tokenizeAndTestExact("\"\"\"\"1234\"\"\"", TokenType.LONG_STRING2, "\"1234") ;
+        tokenizeAndTestExact("\"\"\"\"1234\"\"\"", StringType.LONG_STRING2, "\"1234") ;
     }
 
     @Test
     public void tokenUnit_str_long7() {
-        tokenizeAndTestExact("\"\"\"\"\"1234\"\"\"", TokenType.LONG_STRING2, "\"\"1234") ;
+        tokenizeAndTestExact("\"\"\"\"\"1234\"\"\"", StringType.LONG_STRING2, "\"\"1234") ;
     }
 
     @Test
     public void tokenUnit_str_long8() {
-        tokenizeAndTestExact("''''''", TokenType.LONG_STRING1, "") ;
+        tokenizeAndTestExact("''''''", StringType.LONG_STRING1, "") ;
     }
 
     @Test
     public void tokenUnit_str_long9() {
-        tokenizeAndTestExact("\"\"\"'''''''''''''''''\"\"\"", TokenType.LONG_STRING2, "'''''''''''''''''") ;
+        tokenizeAndTestExact("\"\"\"'''''''''''''''''\"\"\"", StringType.LONG_STRING2, "'''''''''''''''''") ;
     }
 
     @Test(expected = RiotParseException.class)
@@ -668,9 +674,10 @@ public class TestTokenizer extends BaseTest {
         tokenizeAndTestExact("0Xabc", TokenType.HEX, "0Xabc") ;
     }
 
-    private static void tokenizeAndTestLiteralDT(String input, TokenType lexType, String image, TokenType dt,
+    private static void tokenizeAndTestLiteralDT(String input, StringType lexType, String image, TokenType dt,
                                                  String dtImage1, String dtImage2) {
-        Token lexToken = new Token(lexType, image) ;
+        Token lexToken = new Token(TokenType.STRING, image) ;
+        lexToken.setStringType(lexType);
         Token dtToken = new Token(dt, dtImage1, dtImage2) ;
         tokenizeAndTest(input, TokenType.LITERAL_DT, image, null, lexToken, dtToken) ;
 
@@ -691,24 +698,24 @@ public class TestTokenizer extends BaseTest {
 
     @Test
     public void tokenLiteralDT_0() {
-        tokenizeAndTestLiteralDT("\"123\"^^<x> ", TokenType.STRING2, "123", TokenType.IRI, "x", null) ;
+        tokenizeAndTestLiteralDT("\"123\"^^<x> ", StringType.STRING2, "123", TokenType.IRI, "x", null) ;
     }
 
     // literal test function.
 
     @Test
     public void tokenLiteralDT_1() {
-        tokenizeAndTestLiteralDT("'123'^^x:y ", TokenType.STRING1, "123", TokenType.PREFIXED_NAME, "x", "y") ;
+        tokenizeAndTestLiteralDT("'123'^^x:y ", StringType.STRING1, "123", TokenType.PREFIXED_NAME, "x", "y") ;
     }
 
     @Test
     public void tokenLiteralDT_2() {
-        tokenizeAndTestLiteralDT("'123'^^:y", TokenType.STRING1, "123", TokenType.PREFIXED_NAME, "", "y") ;
+        tokenizeAndTestLiteralDT("'123'^^:y", StringType.STRING1, "123", TokenType.PREFIXED_NAME, "", "y") ;
     }
 
     @Test
     public void tokenLiteralDT_3() {
-        tokenizeAndTestLiteralDT("'''123'''^^<xyz>", TokenType.LONG_STRING1, "123", TokenType.IRI, "xyz", null) ;
+        tokenizeAndTestLiteralDT("'''123'''^^<xyz>", StringType.LONG_STRING1, "123", TokenType.IRI, "xyz", null) ;
     }
 
 //    @Test(expected = RiotParseException.class)
@@ -734,15 +741,15 @@ public class TestTokenizer extends BaseTest {
 //    }
 
     public void tokenLiteralDT_4() {
-        tokenizeAndTestLiteralDT("'123'  ^^<xyz>", TokenType.STRING1, "123", TokenType.IRI, "xyz", null) ;
+        tokenizeAndTestLiteralDT("'123'  ^^<xyz>", StringType.STRING1, "123", TokenType.IRI, "xyz", null) ;
     }
     
     public void tokenLiteralDT_5() {
-        tokenizeAndTestLiteralDT("'123'^^  <xyz>", TokenType.STRING1, "123", TokenType.IRI, "xyz", null) ;
+        tokenizeAndTestLiteralDT("'123'^^  <xyz>", StringType.STRING1, "123", TokenType.IRI, "xyz", null) ;
     }
 
     public void tokenLiteralDT_6() {
-        tokenizeAndTestLiteralDT("'123'  ^^  <xyz>", TokenType.STRING1, "123", TokenType.IRI, "xyz", null) ;
+        tokenizeAndTestLiteralDT("'123'  ^^  <xyz>", StringType.STRING1, "123", TokenType.IRI, "xyz", null) ;
     }
 
     @Test(expected = RiotParseException.class)
@@ -841,13 +848,13 @@ public class TestTokenizer extends BaseTest {
 
     @Test
     public void tokenComment_02() {
-        tokenizeAndTestExact("\"foo # Non-Comment\"", TokenType.STRING2, "foo # Non-Comment") ;
+        tokenizeAndTestExact("\"foo # Non-Comment\"", TokenType.STRING, "foo # Non-Comment") ;
     }
 
     @Test
     public void tokenComment_03() {
-        Tokenizer tokenizer = tokenizeAndTestFirst("'foo' # Comment\n'bar'", TokenType.STRING1, "foo") ;
-        testNextToken(tokenizer, TokenType.STRING1, "bar") ;
+        Tokenizer tokenizer = tokenizeAndTestFirst("'foo' # Comment\n'bar'", TokenType.STRING, "foo") ;
+        testNextToken(tokenizer, TokenType.STRING, "bar") ;
     }
 
     @Test
@@ -915,7 +922,7 @@ public class TestTokenizer extends BaseTest {
         assertTrue(tokenizer.hasNext()) ;
         Token token = tokenizer.next() ;
         assertNotNull(token) ;
-        assertEquals(TokenType.STRING1, token.getType()) ;
+        assertEquals(TokenType.STRING, token.getType()) ;
         assertEquals("abc", token.getImage()) ;
         assertFalse(tokenizer.hasNext()) ;
     }
diff --git a/jena-core/src/test/java/org/apache/jena/graph/test/AbstractTestGraph.java b/jena-core/src/test/java/org/apache/jena/graph/test/AbstractTestGraph.java
index 912a2575b3..f03651ea3b 100644
--- a/jena-core/src/test/java/org/apache/jena/graph/test/AbstractTestGraph.java
+++ b/jena-core/src/test/java/org/apache/jena/graph/test/AbstractTestGraph.java
@@ -343,7 +343,7 @@ public abstract class AbstractTestGraph extends GraphTestBase
         GraphUtil.delete( g, tripleList );
         assertEquals( "graph has original size", initialSize, g.size() );
     }
-
+    
     public void testAddWithReificationPreamble()
     {
         Graph g = getGraph();
@@ -625,14 +625,44 @@ public abstract class AbstractTestGraph extends GraphTestBase
         Graph triples = graphWith( "this type graph; I type slowly" );
         GraphUtil.addInto( g, triples );
         L.assertHas( new Object[] {"addGraph", g, triples} );
+        testContains( g, triples );
+    }
+
+    public void testBulkAddGraph1() {
+        Graph g1 = graphWith( "pigs might fly; dead can dance" );
+        Graph g2 = graphWith( "this type graph" );
+        GraphUtil.addInto( g1, g2 );
+        testContains( g1, g2 );
     }
 
+    public void testBulkAddGraph2() {
+        Graph g1 = graphWith( "this type graph" );
+        Graph g2 = graphWith( "pigs might fly; dead can dance" );
+        GraphUtil.addInto( g1, g2 );
+        testContains( g1, g2);
+    }
+    
     public void testBulkDeleteGraph()
     {        
         Graph g = getAndRegister( L );
         Graph triples = graphWith( "this type graph; I type slowly" );
         GraphUtil.deleteFrom( g, triples );
         L.assertHas( new Object[] {"deleteGraph", g, triples} );
+        testOmits( g, triples );
+    }
+    
+    public void testBulkDeleteGraph1() {
+        Graph g1 = graphWith( "pigs might fly; dead can dance" );
+        Graph g2 = graphWith( "pigs might fly" );
+        GraphUtil.deleteFrom( g1, g2 );
+        testOmits( g1, g2);
+    }
+
+    public void testBulkDeleteGraph2() {
+        Graph g1 = graphWith( "pigs might fly" );
+        Graph g2 = graphWith( "pigs might fly; dead can dance" );
+        GraphUtil.deleteFrom( g1, g2 );
+        testOmits( g1, g2);
     }
 
     public void testGeneralEvent()
diff --git a/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/ServerTest.java b/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/ServerTest.java
index b6914049ac..cd832cc03f 100644
--- a/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/ServerTest.java
+++ b/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/ServerTest.java
@@ -25,6 +25,15 @@ import org.apache.jena.rdf.model.Model ;
 import org.apache.jena.rdf.model.ModelFactory ;
 import org.apache.jena.sparql.sse.SSE ;
 
+/**
+ * Manage a server for testing. Example for one server per test suite:
+ * 
+ * <pre>
+ *     \@BeforeClass public static void beforeClass() { ServerTest.allocServer() ; }
+ *     \@AfterClass  public static void afterClass()  { ServerTest.freeServer() ; }
+ *     \@Before      public void beforeTest()         { ServerTest.resetServer() ; }
+ * </pre>
+ */
 public class ServerTest {
     public static final String  gn1           = "http://graph/1" ;
     public static final String  gn2           = "http://graph/2" ;
diff --git a/jena-integration-tests/pom.xml b/jena-integration-tests/pom.xml
index 984fdbb783..60f41e5a25 100644
--- a/jena-integration-tests/pom.xml
+++ b/jena-integration-tests/pom.xml
@@ -17,7 +17,9 @@
    information regarding copyright ownership.
 -->
 
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" 
+	 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 
   <modelVersion>4.0.0</modelVersion>
 
@@ -25,14 +27,14 @@
   <artifactId>jena-integration-tests</artifactId>
   <packaging>jar</packaging>
   <name>Apache Jena - Integration Testing</name>
-  <version>3.3.0-SNAPSHOT</version>
+  <version>3.2.0-SNAPSHOT</version>
 
   <description>Apache Jena - Integration Testing</description>
 
   <parent>
     <groupId>org.apache.jena</groupId>
     <artifactId>jena-parent</artifactId>
-    <version>19-SNAPSHOT</version>
+    <version>18-SNAPSHOT</version>
     <relativePath>../jena-parent</relativePath>
   </parent>
 
@@ -47,7 +49,7 @@
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>apache-jena-libs</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
       <type>pom</type>
     </dependency>
 
@@ -55,13 +57,13 @@
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-rdfconnection</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
     </dependency>
 
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-rdfconnection</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
       <classifier>tests</classifier>
       <scope>test</scope>
     </dependency>
@@ -70,7 +72,7 @@
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-base</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
       <classifier>tests</classifier>
       <scope>test</scope>
     </dependency>
@@ -79,14 +81,14 @@
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-core</artifactId>
       <classifier>tests</classifier>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
       <scope>test</scope>
     </dependency>    
 
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-arq</artifactId>
-      <version>3.3.0-SNAPSHOT</version>
+      <version>3.2.0-SNAPSHOT</version>
       <classifier>tests</classifier>
       <scope>test</scope>
     </dependency>
@@ -94,7 +96,7 @@
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-fuseki-embedded</artifactId>
-      <version>2.6.0-SNAPSHOT</version>
+      <version>2.5.0-SNAPSHOT</version>
       <scope>test</scope>
     </dependency>