Skip to content

Commit

Permalink
[squid:S1149] Synchronized classes Vector, Hashtable, Stack and Strin…
Browse files Browse the repository at this point in the history
…gBuffer should not be used
  • Loading branch information
AymanDF committed May 30, 2016
1 parent 490f41c commit 9f2e214
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Expand Up @@ -174,7 +174,7 @@ public void setTypeParameters(List<TypeParameter> typeParameters) {
@Override
public String getDeclarationAsString(boolean includingModifiers, boolean includingThrows,
boolean includingParameterName) {
StringBuffer sb = new StringBuffer();
StringBuilder sb = new StringBuilder();
if (includingModifiers) {
AccessSpecifier accessSpecifier = ModifierSet.getAccessSpecifier(getModifiers());
sb.append(accessSpecifier.getCodeRepresenation());
Expand Down
Expand Up @@ -230,7 +230,7 @@ public String getDeclarationAsString(boolean includingModifiers, boolean includi
*/
@Override
public String getDeclarationAsString(boolean includingModifiers, boolean includingThrows, boolean includingParameterName) {
StringBuffer sb = new StringBuffer();
StringBuilder sb = new StringBuilder();
if (includingModifiers) {
AccessSpecifier accessSpecifier = ModifierSet.getAccessSpecifier(getModifiers());
sb.append(accessSpecifier.getCodeRepresenation());
Expand Down
Expand Up @@ -97,7 +97,7 @@ public CommentsCollection parse(final InputStream in, final String charsetName)
State state = State.CODE;
LineComment currentLineComment = null;
BlockComment currentBlockComment = null;
StringBuffer currentContent = null;
StringBuilder currentContent = null;

int currLine = 1;
int currCol = 1;
Expand All @@ -119,13 +119,13 @@ public CommentsCollection parse(final InputStream in, final String charsetName)
currentLineComment.setBeginLine(currLine);
currentLineComment.setBeginColumn(currCol - 1);
state = State.IN_LINE_COMMENT;
currentContent = new StringBuffer();
currentContent = new StringBuilder();
} else if (parserState.isLastChar('/') && c == '*') {
currentBlockComment = new BlockComment();
currentBlockComment.setBeginLine(currLine);
currentBlockComment.setBeginColumn(currCol - 1);
state = State.IN_BLOCK_COMMENT;
currentContent = new StringBuffer();
currentContent = new StringBuilder();
} else if (c == '"') {
state = State.IN_STRING;
} else if (c == '\'') {
Expand Down

0 comments on commit 9f2e214

Please sign in to comment.