You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@johnzon.apache.org by rm...@apache.org on 2015/11/09 20:12:37 UTC

incubator-johnzon git commit: unused field

Repository: incubator-johnzon
Updated Branches:
  refs/heads/master 6f76d14b4 -> 3632ff7ab


unused field


Project: http://git-wip-us.apache.org/repos/asf/incubator-johnzon/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-johnzon/commit/3632ff7a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-johnzon/tree/3632ff7a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-johnzon/diff/3632ff7a

Branch: refs/heads/master
Commit: 3632ff7ab3531086f87fc2255f3f1a112af29956
Parents: 6f76d14
Author: Romain Manni-Bucau <rm...@gmail.com>
Authored: Mon Nov 9 11:12:32 2015 -0800
Committer: Romain Manni-Bucau <rm...@gmail.com>
Committed: Mon Nov 9 11:12:32 2015 -0800

----------------------------------------------------------------------
 .../org/apache/johnzon/core/JsonStreamParserImpl.java | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-johnzon/blob/3632ff7a/johnzon-core/src/main/java/org/apache/johnzon/core/JsonStreamParserImpl.java
----------------------------------------------------------------------
diff --git a/johnzon-core/src/main/java/org/apache/johnzon/core/JsonStreamParserImpl.java b/johnzon-core/src/main/java/org/apache/johnzon/core/JsonStreamParserImpl.java
index 27fcbe2..89e5752 100644
--- a/johnzon-core/src/main/java/org/apache/johnzon/core/JsonStreamParserImpl.java
+++ b/johnzon-core/src/main/java/org/apache/johnzon/core/JsonStreamParserImpl.java
@@ -18,6 +18,10 @@
  */
 package org.apache.johnzon.core;
 
+import javax.json.JsonException;
+import javax.json.stream.JsonLocation;
+import javax.json.stream.JsonParser;
+import javax.json.stream.JsonParsingException;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
@@ -26,11 +30,6 @@ import java.math.BigDecimal;
 import java.nio.charset.Charset;
 import java.util.NoSuchElementException;
 
-import javax.json.JsonException;
-import javax.json.stream.JsonLocation;
-import javax.json.stream.JsonParser;
-import javax.json.stream.JsonParsingException;
-
 //This class represents either the Json tokenizer and the Json parser.
 public class JsonStreamParserImpl implements JsonChars, JsonParser{
 
@@ -55,7 +54,6 @@ public class JsonStreamParserImpl implements JsonChars, JsonParser{
     //do we read from a character stream or a byte stream
     //not used at the moment but maybe relevant in future to calculate the JsonLocation offset
     @SuppressWarnings("unused")
-    private final boolean readBytes;
     private final BufferStrategy.BufferProvider<char[]> bufferProvider;
     private final BufferStrategy.BufferProvider<char[]> valueProvider;
 
@@ -142,16 +140,12 @@ public class JsonStreamParserImpl implements JsonChars, JsonParser{
 
         if (reader != null) {
             this.in = reader;
-            readBytes = false;
         } else if (encoding == null) {
             this.in = new RFC4627AwareInputStreamReader(inputStream);
-            readBytes = true;
 
         } else {
             this.in = new InputStreamReader(inputStream, encoding.newDecoder());
-            readBytes = true;
         }
-
     }
 
     //append a single char to the value buffer