Skip to content

Commit f6e8a9a

Browse files
committed
Remove unneeded boxing/unboxing
1 parent 1461096 commit f6e8a9a

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

jansi/src/main/java/org/fusesource/jansi/AnsiOutputStream.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,10 @@ public synchronized void write(int data) throws IOException { // expected diff w
101101
} else if (data == SECOND_OSC_CHAR) {
102102
state = LOOKING_FOR_OSC_COMMAND;
103103
} else if (data == SECOND_CHARSET0_CHAR) {
104-
options.add(Integer.valueOf(0));
104+
options.add(0);
105105
state = LOOKING_FOR_CHARSET;
106106
} else if (data == SECOND_CHARSET1_CHAR) {
107-
options.add(Integer.valueOf(1));
107+
options.add(1);
108108
state = LOOKING_FOR_CHARSET;
109109
} else {
110110
reset(false);
@@ -210,7 +210,7 @@ public synchronized void write(int data) throws IOException { // expected diff w
210210
break;
211211

212212
case LOOKING_FOR_CHARSET:
213-
options.add(Character.valueOf((char) data));
213+
options.add((char) data);
214214
reset(ap.processCharsetSelect(options));
215215
break;
216216
}

jansi/src/main/java/org/fusesource/jansi/AnsiPrintStream.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ protected synchronized boolean filter(int data) { // expected diff with AnsiOutp
202202
break;
203203

204204
case LOOKING_FOR_CHARSET:
205-
options.add(Character.valueOf((char) data));
205+
options.add((char) data);
206206
reset(ap.processCharsetSelect(options));
207207
break;
208208
}

jansi/src/main/java/org/fusesource/jansi/AnsiProcessor.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ protected boolean processOperatingSystemCommand(ArrayList<Object> options) { //
242242
*/
243243
protected boolean processCharsetSelect(ArrayList<Object> options) {
244244
int set = optionInt(options, 0);
245-
char seq = ((Character) options.get(1)).charValue();
245+
char seq = (Character) options.get(1);
246246
processCharsetSelect(set, seq);
247247
return true;
248248
}

0 commit comments

Comments
 (0)