Skip to content

Commit

Permalink
minor: fix for checkstyle 6.15 violations
Browse files Browse the repository at this point in the history
  • Loading branch information
romani committed Jan 31, 2016
1 parent 9e6c2db commit 4095edb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ private boolean passesCheck(String rawLiteral) {
* @return minimum length before checking
*/
private int minSymbolsBeforeChecking(Type type) {
int minLength;
final int minLength;
switch (type) {
case DECIMAL:
minLength = minDecimalSymbolLength;
Expand All @@ -379,7 +379,7 @@ private int minSymbolsBeforeChecking(Type type) {
* @return maximum number of characters between underscores
*/
private int maxSymbolsUntilUnderscore(Type type) {
int maxSymbols;
final int maxSymbols;
switch (type) {
case DECIMAL:
maxSymbols = maxDecimalSymbolsUntilUnderscore;
Expand Down Expand Up @@ -413,7 +413,7 @@ private int maxSymbolsUntilUnderscore(Type type) {
private String[] getNumericSegments(String rawLiteral) {
final Type type = getNumericType(rawLiteral);
final String strippedLiteral = removePrePostfixByType(rawLiteral, type);
String[] numericSegments;
final String[] numericSegments;
switch (type) {
case DECIMAL:
numericSegments = DECIMAL_SPLITTER.split(strippedLiteral);
Expand Down Expand Up @@ -450,7 +450,7 @@ private String[] getNumericSegments(String rawLiteral) {
* @return the type of literal (either decimal, hex, or binary)
*/
private Type getNumericType(String rawLiteral) {
Type type;
final Type type;
if (rawLiteral.length() < PREFIX_LENGTH) {
type = Type.DECIMAL;
}
Expand Down Expand Up @@ -552,7 +552,7 @@ private static String removePrefix(String text) {
*/
private static String removeLetterPostfix(String text) {
final char lastchar = text.charAt(text.length() - 1);
String noPostfixText;
final String noPostfixText;
if (Character.isDigit(lastchar)) {
noPostfixText = text;
}
Expand Down Expand Up @@ -580,7 +580,7 @@ else if (lastchar == 'F' && (text.contains("p") || text.contains("P"))) {
// Example: 0x1.0p1f (Hex Float)
hasPostfix = true;
}
String noPostfixText;
final String noPostfixText;
if (hasPostfix) {
noPostfixText = text.substring(0, text.length() - 1);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ private static boolean isIdentShouldBeChecked(DetailAST parentAst) {
* @return true if the field is {@code static} or local.
*/
private static boolean isStaticFieldOrLocalVariable(Frame frame, DetailAST identAst) {
boolean result;
final boolean result;
final int parentType = identAst.getParent().getType();
if (parentType == TokenTypes.DOT) {
if (identAst.getNextSibling() != null) {
Expand Down

0 comments on commit 4095edb

Please sign in to comment.