From ae005d1a2417c05a615e48ba44304402aa755925 Mon Sep 17 00:00:00 2001 From: Faisal Hameed Date: Sun, 10 Apr 2016 16:45:27 +0500 Subject: [PATCH] Fixing squid:ClassVariableVisibilityCheck - Class variable fields should not have public accessibility. --- .../javacc/JSONPathCompilerTokenManager.java | 2 +- .../monoid/web/jp/javacc/ParseException.java | 18 +++++++++++++++--- .../monoid/web/jp/javacc/SimpleCharStream.java | 2 +- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/src/main/java/us/monoid/web/jp/javacc/JSONPathCompilerTokenManager.java b/src/main/java/us/monoid/web/jp/javacc/JSONPathCompilerTokenManager.java index dd55ad9..29dfb9f 100644 --- a/src/main/java/us/monoid/web/jp/javacc/JSONPathCompilerTokenManager.java +++ b/src/main/java/us/monoid/web/jp/javacc/JSONPathCompilerTokenManager.java @@ -8,7 +8,7 @@ public class JSONPathCompilerTokenManager implements JSONPathCompilerConstants { /** Debug output. */ - public java.io.PrintStream debugStream = System.out; + private java.io.PrintStream debugStream = System.out; /** Set debug output. */ public void setDebugStream(java.io.PrintStream ds) { debugStream = ds; } private final int jjStopStringLiteralDfa_0(int pos, long active0) diff --git a/src/main/java/us/monoid/web/jp/javacc/ParseException.java b/src/main/java/us/monoid/web/jp/javacc/ParseException.java index 0520528..f00e69a 100644 --- a/src/main/java/us/monoid/web/jp/javacc/ParseException.java +++ b/src/main/java/us/monoid/web/jp/javacc/ParseException.java @@ -62,21 +62,21 @@ public ParseException(String message) { * this object has been created due to a parse error, the token * followng this token will (therefore) be the first error token. */ - public Token currentToken; + private Token currentToken; /** * Each entry in this array is an array of integers. Each array * of integers represents a sequence of tokens (by their ordinal * values) that is expected at this point of the parse. */ - public int[][] expectedTokenSequences; + private int[][] expectedTokenSequences; /** * This is a reference to the "tokenImage" array of the generated * parser within which the parse error occurred. This array is * defined in the generated ...Constants interface. */ - public String[] tokenImage; + private String[] tokenImage; /** * It uses "currentToken" and "expectedTokenSequences" to generate a parse @@ -183,5 +183,17 @@ static String add_escapes(String str) { return retval.toString(); } + public Token getCurrentToken() { + return currentToken; + } + + public int[][] getExpectedTokenSequences() { + return expectedTokenSequences; + } + + public String[] getTokenImage() { + return tokenImage; + } + } /* JavaCC - OriginalChecksum=ab578882683d17bd63a4b7e9390109e4 (do not edit this line) */ diff --git a/src/main/java/us/monoid/web/jp/javacc/SimpleCharStream.java b/src/main/java/us/monoid/web/jp/javacc/SimpleCharStream.java index 782cbc9..bba5b55 100644 --- a/src/main/java/us/monoid/web/jp/javacc/SimpleCharStream.java +++ b/src/main/java/us/monoid/web/jp/javacc/SimpleCharStream.java @@ -15,7 +15,7 @@ public class SimpleCharStream int available; int tokenBegin; /** Position in buffer. */ - public int bufpos = -1; + protected int bufpos = -1; protected int bufline[]; protected int bufcolumn[];