Skip to content
This repository was archived by the owner on Apr 1, 2019. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/main/java/us/monoid/json/JSONException.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ public class JSONException extends Exception {
*
*/
private static final long serialVersionUID = 0;
private Throwable cause;
private final Throwable cause;

/**
* Constructs a JSONException with an explanatory message.
* @param message Detail about the reason for the exception.
*/
public JSONException(String message) {
super(message);
cause = null;
}

public JSONException(Throwable t) {
Expand Down
14 changes: 10 additions & 4 deletions src/main/java/us/monoid/web/jp/javacc/ParseException.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,17 @@ public ParseException(Token currentTokenVal,

public ParseException() {
super();
currentToken = null;
expectedTokenSequences = null;
tokenImage = null;
}

/** Constructor with message. */
public ParseException(String message) {
super(message);
currentToken = null;
expectedTokenSequences = null;
tokenImage = null;
}


Expand All @@ -62,21 +68,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;
public final 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;
public final 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;
public final String[] tokenImage;

/**
* It uses "currentToken" and "expectedTokenSequences" to generate a parse
Expand Down Expand Up @@ -131,7 +137,7 @@ private static String initialise(Token currentToken,
/**
* The end of line string for this machine.
*/
protected String eol = System.getProperty("line.separator", "\n");
protected final String eol = System.getProperty("line.separator", "\n");

/**
* Used to convert raw characters to their escaped version
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/us/monoid/web/jp/javacc/TokenMgrError.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class TokenMgrError extends Error
* Indicates the reason why the exception is thrown. It will have
* one of the above 4 values.
*/
int errorCode;
final int errorCode;

/**
* Replaces unprintable characters by their escaped (or unicode escaped)
Expand Down Expand Up @@ -131,6 +131,7 @@ public String getMessage() {

/** No arg constructor. */
public TokenMgrError() {
errorCode = 0;
}

/** Constructor with message and reason. */
Expand Down