Remove unnecessary unboxing. #1538

This commit is contained in:
Michal Kordas 2015-08-02 12:50:02 +02:00 committed by Roman Ivanov
parent 111bd4b1df
commit 0a6026c9ab
5 changed files with 9 additions and 9 deletions

View File

@ -79,7 +79,7 @@ public final class Utils {
final Integer[] ids = TOKEN_NAME_TO_VALUE.values().toArray(new Integer[0]);
TOKEN_IDS = new int[ids.length];
for (int i = 0; i < ids.length; i++) {
TOKEN_IDS[i] = ids[i].intValue();
TOKEN_IDS[i] = ids[i];
}
}
@ -307,7 +307,7 @@ public final class Utils {
if (id == null) {
throw new IllegalArgumentException("given name " + name);
}
return id.intValue();
return id;
}
/**

View File

@ -148,7 +148,7 @@ public class TrailingCommentCheck extends AbstractFormatCheck {
lines.addAll(cComments.keySet());
for (Integer lineNo : lines) {
final String line = getLines()[lineNo.intValue() - 1];
final String line = getLines()[lineNo - 1];
String lineBefore = "";
TextBlock comment = null;
if (cppComments.containsKey(lineNo)) {

View File

@ -312,7 +312,7 @@ public abstract class AbstractExpressionHandler {
// checked by a child expression)
if (col != null) {
checkSingleLine(i, col.intValue(), theLevel, false);
checkSingleLine(i, col, theLevel, false);
}
}
}
@ -479,7 +479,7 @@ public abstract class AbstractExpressionHandler {
final Integer colNum = lines.getStartColumn(lineNum);
final int thisLineColumn = expandedTabsColumnNo(tree);
if (colNum == null || thisLineColumn < colNum.intValue()) {
if (colNum == null || thisLineColumn < colNum) {
lines.addLineAndCol(lineNum, thisLineColumn);
}

View File

@ -52,7 +52,7 @@ public class LineSet {
*/
public int firstLineCol() {
final Object firstLineKey = lines.firstKey();
return lines.get(firstLineKey).intValue();
return lines.get(firstLineKey);
}
/**
@ -61,7 +61,7 @@ public class LineSet {
* @return the line number of the first line
*/
public int firstLine() {
return lines.firstKey().intValue();
return lines.firstKey();
}
/**
@ -70,7 +70,7 @@ public class LineSet {
* @return the line number of the last line
*/
public int lastLine() {
return lines.lastKey().intValue();
return lines.lastKey();
}
/**

View File

@ -370,7 +370,7 @@ public final class JavadocUtils {
if (id == null) {
throw new IllegalArgumentException("Unknown javdoc token name. Given name " + name);
}
return id.intValue();
return id;
}
/**