Support the case when then array initializer is taken into parentheses; more attention to comments in fix: IDEA-238645

GitOrigin-RevId: d4557daa9b37e9f103b6453d9e0ad3a18df0a870
This commit is contained in:
Andrey.Cherkasov
2020-09-16 14:13:38 +03:00
committed by intellij-monorepo-bot
parent a7668df48f
commit 50af51d8d1
4 changed files with 22 additions and 11 deletions

View File

@@ -13,7 +13,7 @@ class Main {
String s1 = new String(result1);
ByteArrayOutputStream out2 = new ByteArrayOutputStream();
byte[] result2 = out2.toByteArray();
byte[] result2 = (((out2.toByteArray()));
String s2 = new String((result2));
ByteArrayOutputStream out3 = new ByteArrayOutputStream();

View File

@@ -13,11 +13,11 @@ class Main {
Charset charset = Charset.defaultCharset();
ByteArrayOutputStream out1 = new ByteArrayOutputStream();
byte[] result1 = out1.toByteArray();
byte[] result1 = (out1.toByteArray());
String s1 = new String(result1, charset);
ByteArrayOutputStream out2 = new ByteArrayOutputStream();
byte[] result2 = out2.toByteArray();
byte[] result2 = (((out2.toByteArray())));
String s2 = new String((result2), (charset));
ByteArrayOutputStream out3 = new ByteArrayOutputStream();

View File

@@ -12,11 +12,11 @@ class Main {
String csn = "ISO-8859-1";
ByteArrayOutputStream out1 = new ByteArrayOutputStream();
byte[] result1 = out1.toByteArray();
byte[] result1 = (out1.toByteArray());
String s1 = new String(result1, csn);
ByteArrayOutputStream out2 = new ByteArrayOutputStream();
byte[] result2 = out2.toByteArray();
byte[] result2 = (((out2.toByteArray())));
String s2 = new String((result2), (csn));
ByteArrayOutputStream out3 = new ByteArrayOutputStream();