Skip to content

Commit

Permalink
restoring original javaparser source code
Browse files Browse the repository at this point in the history
  • Loading branch information
ftomassetti committed May 29, 2016
1 parent eba868a commit af3957c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
Expand Up @@ -101,7 +101,7 @@ private static String initialise(Token currentToken,
int[][] expectedTokenSequences,
String[] tokenImage) {
String eol = System.getProperty("line.separator", "\n");
StringBuilder expected = new StringBuilder();
StringBuffer expected = new StringBuffer();
int maxSize = 0;
for (int i = 0; i < expectedTokenSequences.length; i++) {
if (maxSize < expectedTokenSequences[i].length) {
Expand Down Expand Up @@ -151,7 +151,7 @@ private static String initialise(Token currentToken,
* string literal.
*/
static String add_escapes(String str) {
StringBuilder retval = new StringBuilder();
StringBuffer retval = new StringBuffer();
char ch;
for (int i = 0; i < str.length(); i++) {
switch (str.charAt(i))
Expand Down
Expand Up @@ -60,7 +60,7 @@ public class TokenMgrError extends Error
* equivalents in the given string
*/
protected static final String addEscapes(String str) {
StringBuilder retval = new StringBuilder();
StringBuffer retval = new StringBuffer();
char ch;
for (int i = 0; i < str.length(); i++) {
switch (str.charAt(i))
Expand Down
Expand Up @@ -56,7 +56,7 @@ public CommentsCollection parse(final InputStream in, final String charsetName)
State state = State.CODE;
LineComment currentLineComment = null;
BlockComment currentBlockComment = null;
StringBuilder currentContent = null;
StringBuffer currentContent = null;

int currLine = 1;
int currCol = 1;
Expand All @@ -78,13 +78,13 @@ public CommentsCollection parse(final InputStream in, final String charsetName)
currentLineComment.setBeginLine(currLine);
currentLineComment.setBeginColumn(currCol - 1);
state = State.IN_LINE_COMMENT;
currentContent = new StringBuilder();
currentContent = new StringBuffer();
} else if (prevTwoChars.peekLast().equals('/') && c == '*') {
currentBlockComment = new BlockComment();
currentBlockComment.setBeginLine(currLine);
currentBlockComment.setBeginColumn(currCol - 1);
state = State.IN_BLOCK_COMMENT;
currentContent = new StringBuilder();
currentContent = new StringBuffer();
} else if (c == '"') {
state = State.IN_STRING;
} else if (c == '\'') {
Expand Down
Expand Up @@ -484,8 +484,10 @@ private void removeNulls(final List<?> list) {
}

@Override public Node visit(final ExplicitConstructorInvocationStmt n, final A arg) {
if (!n.isThis() && n.getExpr() != null) {
n.setExpr((Expression) n.getExpr().accept(this, arg));
if (!n.isThis()) {
if (n.getExpr() != null) {
n.setExpr((Expression) n.getExpr().accept(this, arg));
}
}
final List<Type> typeArgs = n.getTypeArgs();
if (typeArgs != null) {
Expand Down

0 comments on commit af3957c

Please sign in to comment.