mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-05 15:50:49 +07:00
IDEA-226130 GitOrigin-RevId: d20197f50aeceaea2074e905b94ea7d838d53b4a
18 lines
677 B
Java
18 lines
677 B
Java
// "Fix all 'Redundant 'String' operation' problems in file" "true"
|
|
import java.nio.charset.Charset;
|
|
import java.nio.charset.StandardCharsets;
|
|
|
|
class Main {
|
|
void foo(char[] chars, byte[] bytes, int[] ints) {
|
|
String s1 = new String(bytes);
|
|
String s2 = new String(chars);
|
|
String s3 = new String(bytes, Charset.defaultCharset());
|
|
String s4 = new String(bytes, StandardCharsets.ISO_8859_1);
|
|
|
|
String s5 = new String(ints, 0, ints.length);
|
|
String s6 = new String(chars, 0, bytes.length);
|
|
String s7 = new String(bytes, 1, bytes.length, Charset.defaultCharset());
|
|
String s8 = new String(bytes, 0, bytes.length - 1, StandardCharsets.ISO_8859_1);
|
|
}
|
|
}
|