Skip to content

Commit

Permalink
Remove superfluous use of boxing
Browse files Browse the repository at this point in the history
  • Loading branch information
turbanoff authored and mattirn committed Sep 27, 2021
1 parent 3ae43a1 commit 56c2a07
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public static void main(String[] args) throws IOException {
.terminal(terminal).build();

String command = args[0];
int pos = Integer.valueOf(args[1]);
int pos = Integer.parseInt(args[1]);

MaskingCallback maskingCallback = new CommandArgumentMask(command, pos);

Expand Down
4 changes: 2 additions & 2 deletions terminal/src/main/java/org/jline/utils/Curses.java
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ private static void doTputs(Appendable out, String str, Object... params) throws
int start = index;
while (str.charAt(index++) != '}') ;
if (exec) {
int v = Integer.valueOf(str.substring(start, index - 1));
int v = Integer.parseInt(str.substring(start, index - 1));
stack.push(v);
}
break;
Expand Down Expand Up @@ -470,7 +470,7 @@ private static int toInteger(Object pop) {
} else if (pop instanceof Boolean) {
return (Boolean) pop ? 1 : 0;
} else {
return Integer.valueOf(pop.toString());
return Integer.parseInt(pop.toString());
}
}

Expand Down

0 comments on commit 56c2a07

Please sign in to comment.