Issue #2541: Clean up input files to not use forbidden APIs
This commit is contained in:
parent
992678f1ba
commit
edb810c10e
16
pom.xml
16
pom.xml
|
|
@ -893,24 +893,8 @@
|
|||
<exclude>**/Main.class</exclude>
|
||||
<!-- Tests related -->
|
||||
<exclude>**/Input*</exclude>
|
||||
<exclude>**/*Input.class</exclude>
|
||||
<exclude>**/New*</exclude>
|
||||
<exclude>**/CompareTreesWithComments.class</exclude>
|
||||
<exclude>**/UpdateClass.class</exclude>
|
||||
<exclude>**/bug*</exclude>
|
||||
<exclude>**/oneMoreClass.class</exclude>
|
||||
<exclude>**/RightCurlyInput_Other.class</exclude>
|
||||
<exclude>**/test_*</exclude>
|
||||
<exclude>**/WithInner$Inner.class</exclude>
|
||||
<exclude>**/Foo*</exclude>
|
||||
<exclude>**/WithAnon$1.class</exclude>
|
||||
<exclude>**/UncommentedMainTest*</exclude>
|
||||
<exclude>**/Temp*</exclude>
|
||||
<exclude>**/Issue*</exclude>
|
||||
<exclude>**/Main1.class</exclude>
|
||||
<exclude>**/ConfigurationBuilder.class</exclude>
|
||||
<exclude>**/WithAnonymousClass$1.class</exclude>
|
||||
<exclude>**/Test.class</exclude>
|
||||
</excludes>
|
||||
</configuration>
|
||||
<executions>
|
||||
|
|
|
|||
|
|
@ -75,12 +75,12 @@ class InputRightCurlyOther
|
|||
{
|
||||
boolean flag = true;
|
||||
if (flag) {
|
||||
System.out.println("heh");
|
||||
flag = !flag; } System.err.
|
||||
println("Xe-xe");
|
||||
System.identityHashCode("heh");
|
||||
flag = !flag; } System.
|
||||
identityHashCode("Xe-xe");
|
||||
|
||||
|
||||
if (flag) { System.err.println("some foo"); }
|
||||
if (flag) { System.identityHashCode("some foo"); }
|
||||
} //ok
|
||||
} //ok
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ class UpdateClass
|
|||
IO in = new IO();
|
||||
while ((r = in.read()) != null) {} // ok
|
||||
for (; index < s.length && s[index] != 'x'; index++) {} // ok
|
||||
if (a == 1) {} else {System.out.println("a");} // warn
|
||||
if (a == 1) {} else {System.identityHashCode("a");} // warn
|
||||
do {} while(a == 1); //ok
|
||||
switch (a) {} //warn
|
||||
int[] z = {}; // ok
|
||||
|
|
@ -72,7 +72,7 @@ class WithInner
|
|||
IO in = new IO();
|
||||
while ((r = in.read()) != null) {} // ok
|
||||
for (; index < s.length && s[index] != 'x'; index++) {} // ok
|
||||
if (a == 1) {} else {System.out.println("a");} // warn
|
||||
if (a == 1) {} else {System.identityHashCode("a");} // warn
|
||||
do {} while(a == 1); //ok
|
||||
switch (a) {} //warn
|
||||
int[] z = {}; // ok
|
||||
|
|
@ -102,7 +102,7 @@ class WithAnon
|
|||
IO in = new IO();
|
||||
while ((r = in.read()) != null) {} // ok
|
||||
for (; index < s.length && s[index] != 'x'; index++) {} // ok
|
||||
if (a == 1) {} else {System.out.println("a");} // warn
|
||||
if (a == 1) {} else {System.identityHashCode("a");} // warn
|
||||
do {} while(a == 1); //ok
|
||||
switch (a) {} //warn
|
||||
int[] z = {}; // ok
|
||||
|
|
@ -122,21 +122,21 @@ class NewClass {
|
|||
int a = 1;
|
||||
|
||||
if (a == 1) {
|
||||
System.out.println("a");
|
||||
System.identityHashCode("a");
|
||||
} else {} // warn
|
||||
|
||||
if (a == 1) {
|
||||
System.out.println("a");
|
||||
System.identityHashCode("a");
|
||||
} else {/*ignore*/} // OK
|
||||
|
||||
if (a == 1) {
|
||||
/*ignore*/
|
||||
} else {
|
||||
System.out.println("a");
|
||||
System.identityHashCode("a");
|
||||
} // ok
|
||||
|
||||
if (a == 1) {
|
||||
System.out.println("a");
|
||||
System.identityHashCode("a");
|
||||
} else if (a != 1) {
|
||||
/*ignore*/
|
||||
} else {
|
||||
|
|
@ -146,7 +146,7 @@ class NewClass {
|
|||
if (a == 1) {
|
||||
/*ignore*/
|
||||
} else if (a != 1) {
|
||||
System.out.println("a");
|
||||
System.identityHashCode("a");
|
||||
} else {
|
||||
/*ignore*/
|
||||
}
|
||||
|
|
@ -156,7 +156,7 @@ class NewClass {
|
|||
} else if (a != 1) {
|
||||
/*ignore*/
|
||||
} else {
|
||||
System.out.println("a");
|
||||
System.identityHashCode("a");
|
||||
}
|
||||
|
||||
if (a == 1) {
|
||||
|
|
@ -191,21 +191,21 @@ class NewClass {
|
|||
int a = 1;
|
||||
|
||||
if (a == 1) {
|
||||
System.out.println("a");
|
||||
System.identityHashCode("a");
|
||||
} else {} // warn
|
||||
|
||||
if (a == 1) {
|
||||
System.out.println("a");
|
||||
System.identityHashCode("a");
|
||||
} else {/*ignore*/} // OK
|
||||
|
||||
if (a == 1) {
|
||||
/*ignore*/
|
||||
} else {
|
||||
System.out.println("a");
|
||||
System.identityHashCode("a");
|
||||
} // ok
|
||||
|
||||
if (a == 1) {
|
||||
System.out.println("a");
|
||||
System.identityHashCode("a");
|
||||
} else if (a != 1) {
|
||||
/*ignore*/
|
||||
} else {
|
||||
|
|
@ -215,7 +215,7 @@ class NewClass {
|
|||
if (a == 1) {
|
||||
/*ignore*/
|
||||
} else if (a != 1) {
|
||||
System.out.println("a");
|
||||
System.identityHashCode("a");
|
||||
} else {
|
||||
/*ignore*/
|
||||
}
|
||||
|
|
@ -225,7 +225,7 @@ class NewClass {
|
|||
} else if (a != 1) {
|
||||
/*ignore*/
|
||||
} else {
|
||||
System.out.println("a");
|
||||
System.identityHashCode("a");
|
||||
}
|
||||
|
||||
if (a == 1) {
|
||||
|
|
@ -260,21 +260,21 @@ class NewClass {
|
|||
int a = 1;
|
||||
|
||||
if (a == 1) {
|
||||
System.out.println("a");
|
||||
System.identityHashCode("a");
|
||||
} else {} // warn
|
||||
|
||||
if (a == 1) {
|
||||
System.out.println("a");
|
||||
System.identityHashCode("a");
|
||||
} else {/*ignore*/} // OK
|
||||
|
||||
if (a == 1) {
|
||||
/*ignore*/
|
||||
} else {
|
||||
System.out.println("a");
|
||||
System.identityHashCode("a");
|
||||
} // ok
|
||||
|
||||
if (a == 1) {
|
||||
System.out.println("a");
|
||||
System.identityHashCode("a");
|
||||
} else if (a != 1) {
|
||||
/*ignore*/
|
||||
} else {
|
||||
|
|
@ -284,7 +284,7 @@ class NewClass {
|
|||
if (a == 1) {
|
||||
/*ignore*/
|
||||
} else if (a != 1) {
|
||||
System.out.println("a");
|
||||
System.identityHashCode("a");
|
||||
} else {
|
||||
/*ignore*/
|
||||
}
|
||||
|
|
@ -294,7 +294,7 @@ class NewClass {
|
|||
} else if (a != 1) {
|
||||
/*ignore*/
|
||||
} else {
|
||||
System.out.println("a");
|
||||
System.identityHashCode("a");
|
||||
}
|
||||
|
||||
if (a == 1) {
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ public class InputEmptyCatchBlockNoViolations
|
|||
return;
|
||||
}
|
||||
catch (Exception e) {
|
||||
System.out.println(e);
|
||||
System.identityHashCode(e);
|
||||
return;
|
||||
}
|
||||
finally
|
||||
|
|
@ -41,11 +41,11 @@ public class InputEmptyCatchBlockNoViolations
|
|||
int e=u-y;
|
||||
}
|
||||
catch (IllegalArgumentException e) {
|
||||
System.out.println(e); //some comment
|
||||
System.identityHashCode(e); //some comment
|
||||
return;
|
||||
}
|
||||
catch (IllegalStateException ex) {
|
||||
System.out.println(ex);
|
||||
System.identityHashCode(ex);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
@ -58,7 +58,7 @@ public class InputEmptyCatchBlockNoViolations
|
|||
int e=u-y;
|
||||
}
|
||||
catch (IllegalArgumentException e) {
|
||||
System.out.println(e);
|
||||
System.identityHashCode(e);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ public class InputOneStatementPerLine {
|
|||
public void doLegalString() {
|
||||
one = 1;
|
||||
two = 2;
|
||||
System.out.println("one = 1; two = 2");
|
||||
System.identityHashCode("one = 1; two = 2");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ public class InputVariableDeclarationUsageDistanceCheck {
|
|||
|
||||
String ar[] = { "1", "2" };
|
||||
for (String st : ar) {
|
||||
System.out.println(st);
|
||||
System.identityHashCode(st);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -381,11 +381,11 @@ public class InputVariableDeclarationUsageDistanceCheck {
|
|||
int filterCount = 0;
|
||||
for (int i = 0; i < 10; i++, filterCount++) {
|
||||
int abc = 0;
|
||||
System.out.println(abc);
|
||||
System.identityHashCode(abc);
|
||||
|
||||
for (int j = 0; j < 10; j++) {
|
||||
abc = filterCount;
|
||||
System.out.println(abc);
|
||||
System.identityHashCode(abc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -482,7 +482,7 @@ public class InputVariableDeclarationUsageDistanceCheck {
|
|||
options.addBindFile(null);
|
||||
options.addBindFile(null);
|
||||
options.addBindFile(null);
|
||||
System.out.println("message");
|
||||
System.identityHashCode("message");
|
||||
myOption.setArgName("abc"); // distance=7
|
||||
}
|
||||
|
||||
|
|
@ -504,15 +504,15 @@ public class InputVariableDeclarationUsageDistanceCheck {
|
|||
int count = 0;
|
||||
String[] files = {};
|
||||
|
||||
System.out.println("Data archivation started");
|
||||
System.identityHashCode("Data archivation started");
|
||||
files.notify();
|
||||
System.out.println("sss");
|
||||
System.identityHashCode("sss");
|
||||
|
||||
if (files == null || files.length == 0) {
|
||||
System.out.println("No files on a remote site");
|
||||
System.identityHashCode("No files on a remote site");
|
||||
}
|
||||
else {
|
||||
System.out.println("Files on remote site: " + files.length);
|
||||
System.identityHashCode("Files on remote site: " + files.length);
|
||||
|
||||
for (String ftpFile : files) {
|
||||
if (files.length == 0) {
|
||||
|
|
@ -523,7 +523,7 @@ public class InputVariableDeclarationUsageDistanceCheck {
|
|||
}
|
||||
}
|
||||
|
||||
System.out.println();
|
||||
System.lineSeparator();
|
||||
|
||||
return count;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,12 +52,12 @@ public class InputFallThrough
|
|||
}
|
||||
case 15: //warn
|
||||
do {
|
||||
System.out.println("something");
|
||||
System.identityHashCode("something");
|
||||
return;
|
||||
} while(true);
|
||||
case 16:
|
||||
for (int j1 = 0; j1 < 10; j1++) {
|
||||
System.err.println("something");
|
||||
System.identityHashCode("something");
|
||||
return;
|
||||
}
|
||||
case 17:
|
||||
|
|
@ -185,12 +185,12 @@ public class InputFallThrough
|
|||
// fallthru
|
||||
case 15:
|
||||
do {
|
||||
System.out.println("something");
|
||||
System.identityHashCode("something");
|
||||
return;
|
||||
} while(true);
|
||||
case 16:
|
||||
for (int j1 = 0; j1 < 10; j1++) {
|
||||
System.err.println("something");
|
||||
System.identityHashCode("something");
|
||||
return;
|
||||
}
|
||||
case 17:
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ public class InputCommentsIndentationCommentIsAtTheEndOfBlock {
|
|||
for (int i = 0; i < 5; i++) {
|
||||
org.junit.Assert.assertEquals(expected.get(i), array[i]);
|
||||
}
|
||||
String s = String.format("The array element "
|
||||
String s = String.format(java.util.Locale.ENGLISH, "The array element "
|
||||
+ "immediately following the end of the collection should be nulled",
|
||||
array[1]);
|
||||
// the above example was taken from hibernate-orm and was modified a bit
|
||||
|
|
@ -158,7 +158,7 @@ public class InputCommentsIndentationCommentIsAtTheEndOfBlock {
|
|||
for (int i = 0; i < 5; i++) {
|
||||
org.junit.Assert.assertEquals(expected.get(i), array[i]);
|
||||
}
|
||||
String s = String.format("The array element "
|
||||
String s = String.format(java.util.Locale.ENGLISH, "The array element "
|
||||
+ "immediately following the end of the collection should be nulled",
|
||||
array[1]);
|
||||
// warn
|
||||
|
|
@ -175,13 +175,13 @@ public class InputCommentsIndentationCommentIsAtTheEndOfBlock {
|
|||
}
|
||||
|
||||
public String foo25() {
|
||||
return String.format("%d",
|
||||
return String.format(java.util.Locale.ENGLISH, "%d",
|
||||
1);
|
||||
// comment
|
||||
}
|
||||
|
||||
public String foo26() {
|
||||
return String.format("%d",
|
||||
return String.format(java.util.Locale.ENGLISH, "%d",
|
||||
1);
|
||||
// warn
|
||||
}
|
||||
|
|
@ -196,14 +196,14 @@ public class InputCommentsIndentationCommentIsAtTheEndOfBlock {
|
|||
|
||||
public String foo28() {
|
||||
int a = 5;
|
||||
return String.format("%d",
|
||||
return String.format(java.util.Locale.ENGLISH, "%d",
|
||||
1);
|
||||
// comment
|
||||
}
|
||||
|
||||
public String foo29() {
|
||||
int a = 5;
|
||||
return String.format("%d",
|
||||
return String.format(java.util.Locale.ENGLISH, "%d",
|
||||
1);
|
||||
// warn
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ public class InputCommentsIndentationInSwitchBlock {
|
|||
int a;
|
||||
}
|
||||
// warn
|
||||
case "18": { System.out.println();
|
||||
case "18": { System.lineSeparator();
|
||||
} // trailing comment
|
||||
case "19":
|
||||
// comment
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ class WithAnonymousClass {
|
|||
Ball b = new Ball() {
|
||||
|
||||
public void hit() {
|
||||
System.out.println("You hit it!");
|
||||
System.identityHashCode("You hit it!");
|
||||
}
|
||||
|
||||
protected void finalize() { //warn
|
||||
|
|
|
|||
|
|
@ -214,8 +214,8 @@ public class RightCurlyCheckTest extends BaseCheckTestSupport {
|
|||
"188:13: " + getCheckMessage(MSG_KEY_LINE_NEW, "}", 13),
|
||||
"197:9: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 9),
|
||||
"197:10: " + getCheckMessage(MSG_KEY_LINE_NEW, "}", 10),
|
||||
"201:49: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 49),
|
||||
"201:50: " + getCheckMessage(MSG_KEY_LINE_NEW, "}", 50),
|
||||
"201:54: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 54),
|
||||
"201:55: " + getCheckMessage(MSG_KEY_LINE_NEW, "}", 55),
|
||||
"204:75: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 75),
|
||||
"204:76: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 76),
|
||||
"204:77: " + getCheckMessage(MSG_KEY_LINE_NEW, "}", 77),
|
||||
|
|
@ -245,8 +245,8 @@ public class RightCurlyCheckTest extends BaseCheckTestSupport {
|
|||
"148:13: " + getCheckMessage(MSG_KEY_LINE_NEW, "}", 13),
|
||||
"157:9: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 9),
|
||||
"157:10: " + getCheckMessage(MSG_KEY_LINE_NEW, "}", 10),
|
||||
"161:49: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 49),
|
||||
"161:50: " + getCheckMessage(MSG_KEY_LINE_NEW, "}", 50),
|
||||
"161:54: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 54),
|
||||
"161:55: " + getCheckMessage(MSG_KEY_LINE_NEW, "}", 55),
|
||||
"164:75: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 75),
|
||||
"164:76: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 76),
|
||||
"164:77: " + getCheckMessage(MSG_KEY_LINE_NEW, "}", 77),
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ class InputSemantic
|
|||
// can never happen, empty compound statement is another workaround
|
||||
}
|
||||
catch (UnsupportedOperationException handledException) {
|
||||
System.out.println(handledException.getMessage());
|
||||
System.identityHashCode(handledException.getMessage());
|
||||
}
|
||||
catch (SecurityException ex) { /* hello */ }
|
||||
catch (StringIndexOutOfBoundsException ex) {}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ public class InputUncommentedMain
|
|||
// uncommented main
|
||||
public static void main(String[] args)
|
||||
{
|
||||
System.out.println("InputUncommentedMain.main()");
|
||||
System.identityHashCode("InputUncommentedMain.main()");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -22,7 +22,7 @@ class Main1
|
|||
// uncommented main in class Main
|
||||
public static void main(String[] args)
|
||||
{
|
||||
System.out.println("Main.main()");
|
||||
System.identityHashCode("Main.main()");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -31,7 +31,7 @@ class UncommentedMainTest1
|
|||
// one more uncommented main
|
||||
public static void main(java.lang.String[] args)
|
||||
{
|
||||
System.out.println("test1.main()");
|
||||
System.identityHashCode("test1.main()");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -40,7 +40,7 @@ class UncommentedMainTest2
|
|||
// wrong arg type
|
||||
public static void main(int args)
|
||||
{
|
||||
System.out.println("test2.main()");
|
||||
System.identityHashCode("test2.main()");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -49,7 +49,7 @@ class UncommentedMainTest3
|
|||
// no-public main
|
||||
static void main(String[] args)
|
||||
{
|
||||
System.out.println("test3.main()");
|
||||
System.identityHashCode("test3.main()");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -58,7 +58,7 @@ class UncommentedMainTest4
|
|||
// non-static main
|
||||
public void main(String[] args)
|
||||
{
|
||||
System.out.println("test4.main()");
|
||||
System.identityHashCode("test4.main()");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -67,7 +67,7 @@ class UncommentedMainTest5
|
|||
// wrong return type
|
||||
public static int main(String[] args)
|
||||
{
|
||||
System.out.println("test5.main()");
|
||||
System.identityHashCode("test5.main()");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
|
@ -77,7 +77,7 @@ class UncommentedMainTest6
|
|||
// too many params
|
||||
public static void main(String[] args, int param)
|
||||
{
|
||||
System.out.println("test6.main()");
|
||||
System.identityHashCode("test6.main()");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -86,6 +86,6 @@ class UncommentedMainTest7
|
|||
// main w/o params
|
||||
public static void main()
|
||||
{
|
||||
System.out.println("test7.main()");
|
||||
System.identityHashCode("test7.main()");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ public class InputUncommentedMain2
|
|||
// uncommented main with depth 2
|
||||
public void main(String[] args)
|
||||
{
|
||||
System.out.println("InputUncommentedMain.main()");
|
||||
System.identityHashCode("InputUncommentedMain.main()");
|
||||
}
|
||||
|
||||
//lets go deeper
|
||||
|
|
@ -21,7 +21,7 @@ public class InputUncommentedMain2
|
|||
// uncommented main with depth 3
|
||||
public void main(String[] args)
|
||||
{
|
||||
System.out.println("InputUncommentedMain.main()");
|
||||
System.identityHashCode("InputUncommentedMain.main()");
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -30,7 +30,7 @@ public class InputUncommentedMain2
|
|||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
System.out.println("InputUncommentedMain.main()");
|
||||
System.identityHashCode("InputUncommentedMain.main()");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,6 @@ class oneMoreClass {
|
|||
|
||||
public static void anyWrongMethodName(String[] args)
|
||||
{
|
||||
System.out.println("InputUncommentedMain.main()");
|
||||
System.identityHashCode("InputUncommentedMain.main()");
|
||||
}
|
||||
}
|
||||
|
|
@ -9,6 +9,6 @@ class InputUncommentedMainTest4
|
|||
// one more uncommented main
|
||||
public static void main(int[] args)
|
||||
{
|
||||
System.out.println("test1.main()");
|
||||
System.identityHashCode("test1.main()");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -82,8 +82,8 @@ public class InputBracesSingleLineStatements
|
|||
}
|
||||
|
||||
private void testElse(int k) {
|
||||
if (k == 4) System.out.println("yes");
|
||||
else System.out.println("no");
|
||||
if (k == 4) System.identityHashCode("yes");
|
||||
else System.identityHashCode("no");
|
||||
for (;;);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ public class InputEmptyCatchBlock
|
|||
return;
|
||||
}
|
||||
catch (Exception e) {
|
||||
System.out.println(e);
|
||||
System.identityHashCode(e);
|
||||
return;
|
||||
}
|
||||
finally
|
||||
|
|
@ -112,11 +112,11 @@ public class InputEmptyCatchBlock
|
|||
int e=u-y;
|
||||
}
|
||||
catch (IllegalArgumentException e) {
|
||||
System.out.println(e); //some comment
|
||||
System.identityHashCode(e); //some comment
|
||||
return;
|
||||
}
|
||||
catch (IllegalStateException ex) {
|
||||
System.out.println(ex);
|
||||
System.identityHashCode(ex);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
@ -129,7 +129,7 @@ public class InputEmptyCatchBlock
|
|||
int e=u-y;
|
||||
}
|
||||
catch (IllegalArgumentException e) {
|
||||
System.out.println(e);
|
||||
System.identityHashCode(e);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ class InputLeftCurlyOther
|
|||
{
|
||||
boolean flag = true;
|
||||
if (flag) {
|
||||
System.out.println("heh");
|
||||
System.identityHashCode("heh");
|
||||
flag = !flag; } System.err.
|
||||
println("Xe-xe");
|
||||
// it is ok to have rcurly on the same line as previous
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ public class InputNeedBraces
|
|||
}
|
||||
|
||||
switch(1) {
|
||||
case 1: System.out.println();
|
||||
case 1: System.lineSeparator();
|
||||
case 2: { break;}
|
||||
|
||||
case 3: {
|
||||
|
|
@ -41,7 +41,7 @@ public class InputNeedBraces
|
|||
case 4:
|
||||
break;
|
||||
|
||||
case 5: System.out.println();
|
||||
case 5: System.lineSeparator();
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ class InputNestedBlocks
|
|||
case 3: // test fallthrough
|
||||
default:
|
||||
// Not OK, SLIST is not complete case body
|
||||
System.out.println("Hello");
|
||||
System.identityHashCode("Hello");
|
||||
{
|
||||
x = 2;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -153,12 +153,12 @@ public class InputRightCurlyAloneOrSingleline {
|
|||
|
||||
void foo25() {
|
||||
for (int i = 0; i < 10; i++) {
|
||||
System.out.println("Hello, world!");
|
||||
System.identityHashCode("Hello, world!");
|
||||
}} //violation
|
||||
|
||||
void foo26() {
|
||||
for (int i = 0; i < 10; i++) {
|
||||
System.out.println("Hello, world!");}} //violation
|
||||
System.identityHashCode("Hello, world!");}} //violation
|
||||
|
||||
void foo27() {
|
||||
for (int i = 0; i < 10; i++) {for (int j = 0; j < 15; j++) {int a;}}} //violation
|
||||
|
|
@ -172,7 +172,7 @@ public class InputRightCurlyAloneOrSingleline {
|
|||
private void foo29() {
|
||||
boolean flag = true;
|
||||
if (flag) {
|
||||
System.out.println("heh");
|
||||
System.identityHashCode("heh");
|
||||
flag = !flag; } System.err. //violation
|
||||
println("Xe-xe");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -193,12 +193,12 @@ class InputRightCurlyAnnotations
|
|||
|
||||
void foo25() {
|
||||
for (int i = 0; i < 10; i++) {
|
||||
System.out.println("Hello, world!");
|
||||
System.identityHashCode("Hello, world!");
|
||||
}} //violation
|
||||
|
||||
void foo26() {
|
||||
for (int i = 0; i < 10; i++) {
|
||||
System.out.println("Hello, world!");}} //violation
|
||||
System.identityHashCode("Hello, world!");}} //violation
|
||||
|
||||
void foo27() {
|
||||
for (int i = 0; i < 10; i++) {for (int j = 0; j < 15; j++) {int a;}}} //violation
|
||||
|
|
@ -212,7 +212,7 @@ class InputRightCurlyAnnotations
|
|||
private void foo29() {
|
||||
boolean flag = true;
|
||||
if (flag) {
|
||||
System.out.println("heh");
|
||||
System.identityHashCode("heh");
|
||||
flag = !flag; } System.err. //violation
|
||||
println("Xe-xe");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ class UpdateClass
|
|||
if (doSideEffect() == 1) {} //is not OK,
|
||||
while ((a = index - 1) != 0) {} // is OK
|
||||
for (; index < s.length && s[index] != 'x'; index++) {} // is OK
|
||||
if (a == 1) {} else {System.out.println("a");} // is not OK
|
||||
if (a == 1) {} else {System.identityHashCode("a");} // is not OK
|
||||
switch (a) {} //warn
|
||||
switch (a) { //ok
|
||||
case 1:
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ public class InputFallThrough
|
|||
}
|
||||
case 15: //fall through!!!
|
||||
do {
|
||||
System.out.println("something");
|
||||
System.identityHashCode("something");
|
||||
return;
|
||||
} while(true);
|
||||
case 16:
|
||||
|
|
@ -185,7 +185,7 @@ public class InputFallThrough
|
|||
// fallthru
|
||||
case 15:
|
||||
do {
|
||||
System.out.println("something");
|
||||
System.identityHashCode("something");
|
||||
return;
|
||||
} while(true);
|
||||
case 16:
|
||||
|
|
@ -422,7 +422,7 @@ public class InputFallThrough
|
|||
case 1:
|
||||
switch(hashCode()){}
|
||||
case 2:
|
||||
System.out.println();
|
||||
System.lineSeparator();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -431,20 +431,20 @@ public class InputFallThrough
|
|||
switch(hashCode()) {
|
||||
case 1:
|
||||
if (true) {
|
||||
System.out.println();
|
||||
System.lineSeparator();
|
||||
}
|
||||
case 2:
|
||||
System.out.println();
|
||||
System.lineSeparator();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void noCommentAtTheEnd() {
|
||||
switch(hashCode()) {
|
||||
case 1: System.out.println();
|
||||
case 1: System.lineSeparator();
|
||||
|
||||
case 2:
|
||||
System.out.println();
|
||||
System.lineSeparator();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ public class InputFallThrough2 {
|
|||
case 0:
|
||||
case 1:
|
||||
case 2:
|
||||
System.out.println(var2);
|
||||
System.identityHashCode(var2);
|
||||
break;
|
||||
case 3:
|
||||
if (true) {
|
||||
|
|
@ -59,14 +59,14 @@ public class InputFallThrough2 {
|
|||
}
|
||||
case 8:
|
||||
if(var2 == 5) {
|
||||
System.out.println("0xB16B00B5");
|
||||
System.identityHashCode("0xB16B00B5");
|
||||
}
|
||||
else {
|
||||
break;
|
||||
}
|
||||
case 9:
|
||||
if(var2 == 5) {
|
||||
System.out.println("0xCAFED00D");
|
||||
System.identityHashCode("0xCAFED00D");
|
||||
}
|
||||
else {
|
||||
System.out.printf("0x4B1D");
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ class test_1241722
|
|||
|
||||
public void doSomething(Object _o)
|
||||
{
|
||||
System.out.println(_o);
|
||||
System.identityHashCode(_o);
|
||||
}
|
||||
|
||||
public void doSomething2(Object _o1)
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ package com.puppycrawl.tools.checkstyle.checks.coding;
|
|||
|
||||
class Foo1 {
|
||||
public void foo(String text) {
|
||||
System.out.println(text);
|
||||
System.identityHashCode(text);
|
||||
|
||||
class Bar {
|
||||
void bar (String text) {
|
||||
|
|
|
|||
|
|
@ -11,12 +11,12 @@ public class InputFinalLocalVariableNativeMethods
|
|||
|
||||
public void print () {
|
||||
String str = nativeFoo(1, 4);
|
||||
System.out.println(str);
|
||||
System.identityHashCode(str);
|
||||
}
|
||||
|
||||
public static void main(final String[] args) {
|
||||
(new InputFinalLocalVariableNativeMethods()).print();
|
||||
System.out.println("In Java, the average is " +
|
||||
System.identityHashCode("In Java, the average is " +
|
||||
new InputFinalLocalVariableNativeMethods().average(3, 2));
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ class InputModifiedControl
|
|||
Serializable s = new Serializable() {
|
||||
int i = 3;
|
||||
void a() {
|
||||
System.out.println(i++);
|
||||
System.identityHashCode(i++);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ public class InputMultipleStringLiterals
|
|||
|
||||
void method1() {
|
||||
String a1 = "StringContents";
|
||||
System.out.println("StringContents");
|
||||
System.identityHashCode("StringContents");
|
||||
// The following is not reported, since it is two string literals.
|
||||
String a2 = "String" + "Contents";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ public class InputOneStatementPerLine {
|
|||
public void doLegalString() {
|
||||
one = 1;
|
||||
two = 2;
|
||||
System.out.println("one = 1; two = 2");
|
||||
System.identityHashCode("one = 1; two = 2");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ class Issue257 {
|
|||
foo.read();
|
||||
}
|
||||
catch (final IOException e) {
|
||||
e.printStackTrace();
|
||||
e.getCause();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ public class InputUnnecessaryParentheses {
|
|||
}
|
||||
|
||||
for (int i = (0+1); (i) < ((6+6)); i += (1+0)) {
|
||||
System.out.println("hi");
|
||||
System.identityHashCode("hi");
|
||||
}
|
||||
|
||||
return (0);
|
||||
|
|
@ -84,7 +84,7 @@ public class InputUnnecessaryParentheses {
|
|||
|
||||
private void print(int arg)
|
||||
{
|
||||
System.out.println("arg = " + arg);
|
||||
System.identityHashCode("arg = " + arg);
|
||||
}
|
||||
|
||||
static class TypeParameterized<T> {}
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ public class InputVariableDeclarationUsageDistance {
|
|||
|
||||
String ar[] = { "1", "2" };
|
||||
for (String st : ar) {
|
||||
System.out.println(st);
|
||||
System.identityHashCode(st);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -381,11 +381,11 @@ public class InputVariableDeclarationUsageDistance {
|
|||
int filterCount = 0;
|
||||
for (int i = 0; i < 10; i++, filterCount++) {
|
||||
int abc = 0;
|
||||
System.out.println(abc);
|
||||
System.identityHashCode(abc);
|
||||
|
||||
for (int j = 0; j < 10; j++) {
|
||||
abc = filterCount;
|
||||
System.out.println(abc);
|
||||
System.identityHashCode(abc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -482,7 +482,7 @@ public class InputVariableDeclarationUsageDistance {
|
|||
options.addBindFile(null);
|
||||
options.addBindFile(null);
|
||||
options.addBindFile(null);
|
||||
System.out.println("message");
|
||||
System.identityHashCode("message");
|
||||
myOption.setArgName("abc"); // distance=7
|
||||
}
|
||||
|
||||
|
|
@ -504,15 +504,15 @@ public class InputVariableDeclarationUsageDistance {
|
|||
int count = 0;
|
||||
String[] files = {};
|
||||
|
||||
System.out.println("Data archivation started");
|
||||
System.identityHashCode("Data archivation started");
|
||||
files.notify();
|
||||
System.out.println("sss");
|
||||
System.identityHashCode("sss");
|
||||
|
||||
if (files == null || files.length == 0) {
|
||||
System.out.println("No files on a remote site");
|
||||
System.identityHashCode("No files on a remote site");
|
||||
}
|
||||
else {
|
||||
System.out.println("Files on remote site: " + files.length);
|
||||
System.identityHashCode("Files on remote site: " + files.length);
|
||||
|
||||
for (String ftpFile : files) {
|
||||
if (files.length == 0) {
|
||||
|
|
@ -523,7 +523,7 @@ public class InputVariableDeclarationUsageDistance {
|
|||
}
|
||||
}
|
||||
|
||||
System.out.println();
|
||||
System.lineSeparator();
|
||||
|
||||
return count;
|
||||
}
|
||||
|
|
@ -553,13 +553,13 @@ public class InputVariableDeclarationUsageDistance {
|
|||
else {
|
||||
node = new TreeMapNode(label);
|
||||
}
|
||||
System.out.println(id.toString() + node);
|
||||
System.out.println(node.toString() + id);
|
||||
System.identityHashCode(id.toString() + node);
|
||||
System.identityHashCode(node.toString() + id);
|
||||
if (parentId == null || parentId == -1) { ///!!!!!!!
|
||||
root = node;
|
||||
}
|
||||
else {
|
||||
System.out.println(parentId.toString() +node);
|
||||
System.identityHashCode(parentId.toString() +node);
|
||||
}
|
||||
}
|
||||
return root;
|
||||
|
|
@ -841,68 +841,68 @@ public class InputVariableDeclarationUsageDistance {
|
|||
class New {
|
||||
void a() {
|
||||
int a = 1;
|
||||
System.out.println();
|
||||
System.out.println();
|
||||
System.out.println();
|
||||
System.out.println();
|
||||
System.lineSeparator();
|
||||
System.lineSeparator();
|
||||
System.lineSeparator();
|
||||
System.lineSeparator();
|
||||
while (true) {
|
||||
System.out.println();
|
||||
System.out.println(a);
|
||||
System.lineSeparator();
|
||||
System.identityHashCode(a);
|
||||
}
|
||||
}
|
||||
|
||||
void b() {
|
||||
int a = 1;
|
||||
System.out.println();
|
||||
System.out.println();
|
||||
System.out.println();
|
||||
System.out.println();
|
||||
System.lineSeparator();
|
||||
System.lineSeparator();
|
||||
System.lineSeparator();
|
||||
System.lineSeparator();
|
||||
do {
|
||||
System.out.println();
|
||||
System.out.println(a);
|
||||
System.lineSeparator();
|
||||
System.identityHashCode(a);
|
||||
} while (true);
|
||||
}
|
||||
|
||||
void c() {
|
||||
int a = 1;
|
||||
System.out.println();
|
||||
System.out.println();
|
||||
System.out.println();
|
||||
System.out.println();
|
||||
System.lineSeparator();
|
||||
System.lineSeparator();
|
||||
System.lineSeparator();
|
||||
System.lineSeparator();
|
||||
for (;;) {
|
||||
System.out.println();
|
||||
System.out.println(a);
|
||||
System.lineSeparator();
|
||||
System.identityHashCode(a);
|
||||
}
|
||||
}
|
||||
|
||||
void d() {
|
||||
int a = 1;
|
||||
System.out.println();
|
||||
System.out.println();
|
||||
System.out.println();
|
||||
System.out.println();
|
||||
System.lineSeparator();
|
||||
System.lineSeparator();
|
||||
System.lineSeparator();
|
||||
System.lineSeparator();
|
||||
for (int i: new int[]{1,2,3}) {
|
||||
System.out.println();
|
||||
System.out.println(a);
|
||||
System.lineSeparator();
|
||||
System.identityHashCode(a);
|
||||
}
|
||||
}
|
||||
|
||||
void f() {
|
||||
int a = 1;
|
||||
System.out.println();
|
||||
System.out.println();
|
||||
System.out.println();
|
||||
System.out.println();
|
||||
System.lineSeparator();
|
||||
System.lineSeparator();
|
||||
System.lineSeparator();
|
||||
System.lineSeparator();
|
||||
while (true)
|
||||
System.out.println(a);
|
||||
System.identityHashCode(a);
|
||||
}
|
||||
|
||||
void h() {
|
||||
int a = 1;
|
||||
System.out.println();
|
||||
System.out.println();
|
||||
System.out.println();
|
||||
System.out.println();
|
||||
System.lineSeparator();
|
||||
System.lineSeparator();
|
||||
System.lineSeparator();
|
||||
System.lineSeparator();
|
||||
while (true)
|
||||
while (true)
|
||||
a++;
|
||||
|
|
@ -912,37 +912,37 @@ class New {
|
|||
int a = 1;
|
||||
switch (Math.max(1, 2)) {
|
||||
case 1:
|
||||
System.out.println();
|
||||
System.lineSeparator();
|
||||
break;
|
||||
case 2:
|
||||
System.out.println();
|
||||
System.lineSeparator();
|
||||
break;
|
||||
}
|
||||
|
||||
switch (Math.max(1, 2)) {
|
||||
case 1:
|
||||
System.out.println(a);
|
||||
System.identityHashCode(a);
|
||||
break;
|
||||
case 2:
|
||||
System.out.println(a);
|
||||
System.identityHashCode(a);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void k() {
|
||||
int a = 1;
|
||||
System.out.println();
|
||||
System.out.println();
|
||||
System.out.println();
|
||||
System.out.println();
|
||||
System.lineSeparator();
|
||||
System.lineSeparator();
|
||||
System.lineSeparator();
|
||||
System.lineSeparator();
|
||||
while (true) {
|
||||
System.out.println();
|
||||
System.lineSeparator();
|
||||
if (true) {
|
||||
System.out.println();
|
||||
System.lineSeparator();
|
||||
} else if (true) {
|
||||
System.out.println(a);
|
||||
System.identityHashCode(a);
|
||||
} else {
|
||||
System.out.println();
|
||||
System.lineSeparator();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -954,10 +954,10 @@ class New {
|
|||
switch (hashCode()){}
|
||||
switch (Math.max(1, 2)) {
|
||||
case 1:
|
||||
System.out.println(a);
|
||||
System.identityHashCode(a);
|
||||
break;
|
||||
case 2:
|
||||
System.out.println(a);
|
||||
System.identityHashCode(a);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -965,9 +965,9 @@ class New {
|
|||
|
||||
void tryWithoutFinally() {
|
||||
int a = 1;
|
||||
System.out.println();
|
||||
System.out.println();
|
||||
System.out.println();
|
||||
System.lineSeparator();
|
||||
System.lineSeparator();
|
||||
System.lineSeparator();
|
||||
try {
|
||||
a = 2;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ public abstract class InputDesignForExtension
|
|||
{
|
||||
protected void finalThroughClassDef()
|
||||
{
|
||||
System.out.println("no way to override");
|
||||
System.identityHashCode("no way to override");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -36,7 +36,7 @@ public abstract class InputDesignForExtension
|
|||
|
||||
private void aPrivateMethod()
|
||||
{
|
||||
System.out.println("no way to override");
|
||||
System.identityHashCode("no way to override");
|
||||
}
|
||||
|
||||
protected abstract void nonFinalButAbstract();
|
||||
|
|
@ -45,7 +45,7 @@ public abstract class InputDesignForExtension
|
|||
|
||||
protected void doh()
|
||||
{
|
||||
System.out.println("nonempty and overriding possible");
|
||||
System.identityHashCode("nonempty and overriding possible");
|
||||
}
|
||||
|
||||
// has a potentially complex implementation in native code.
|
||||
|
|
@ -55,12 +55,12 @@ public abstract class InputDesignForExtension
|
|||
|
||||
public final void aFinalMethod()
|
||||
{
|
||||
System.out.println("no way to override");
|
||||
System.identityHashCode("no way to override");
|
||||
}
|
||||
|
||||
public static void aStaticMethod()
|
||||
{
|
||||
System.out.println("no way to override");
|
||||
System.identityHashCode("no way to override");
|
||||
}
|
||||
|
||||
// tries to trigger bug #884035
|
||||
|
|
@ -84,7 +84,7 @@ public abstract class InputDesignForExtension
|
|||
{
|
||||
public void someMethod()
|
||||
{
|
||||
System.out.println("nonempty and overriding is possible");
|
||||
System.identityHashCode("nonempty and overriding is possible");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -94,7 +94,7 @@ public abstract class InputDesignForExtension
|
|||
private nonFinalClass(){}
|
||||
public void someMethod()
|
||||
{
|
||||
System.out.println("nonempty and overriding is possible");
|
||||
System.identityHashCode("nonempty and overriding is possible");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -104,7 +104,7 @@ public abstract class InputDesignForExtension
|
|||
public anotherNonFinalClass(){}
|
||||
public void someMethod()
|
||||
{
|
||||
System.out.println("nonempty and overriding is possible");
|
||||
System.identityHashCode("nonempty and overriding is possible");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ public class InputInnerClass {
|
|||
|
||||
class InnerInMethod1 {
|
||||
void methodTest1() {
|
||||
System.out.println("test1");
|
||||
System.identityHashCode("test1");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -42,7 +42,7 @@ public class InputInnerClass {
|
|||
}
|
||||
|
||||
void methodTest2() { //error
|
||||
System.out.println("test2");
|
||||
System.identityHashCode("test2");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -63,7 +63,7 @@ class Temp2 {
|
|||
}
|
||||
|
||||
void methodTest2() { //error
|
||||
System.out.println("test2");
|
||||
System.identityHashCode("test2");
|
||||
}
|
||||
|
||||
private int i = 0; //error
|
||||
|
|
|
|||
|
|
@ -16,6 +16,6 @@ public class InputNonUtilityClass extends JPanel
|
|||
|
||||
public static void utilMethod()
|
||||
{
|
||||
System.out.println("I'm a utility method");
|
||||
System.identityHashCode("I'm a utility method");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ public class InputBraceAdjustment //indent:0 exp:0
|
|||
boolean uglyGnuStyle = true; //indent:8 exp:8
|
||||
if (uglyGnuStyle) //indent:8 exp:8
|
||||
{ //indent:10 exp:10
|
||||
System.out.println("ugly GNU style braces"); //indent:12 exp:12
|
||||
System.identityHashCode("ugly GNU style braces"); //indent:12 exp:12
|
||||
} //indent:8 exp:10 warn
|
||||
} //indent:6 exp:6
|
||||
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ public class InputCommentsIndentationInSwitchBlock {
|
|||
int a;
|
||||
}
|
||||
// violation
|
||||
case "18": { System.out.println();
|
||||
case "18": { System.lineSeparator();
|
||||
} // trailing comment
|
||||
case "19":
|
||||
// comment
|
||||
|
|
|
|||
|
|
@ -22,21 +22,21 @@ public class InputInvalidLabelIndent { //indent:0 exp:0
|
|||
|
||||
while (test) { //indent:8 exp:8
|
||||
label: //indent:10 exp:8,12 warn
|
||||
System.out.println("label test"); //indent:12 exp:12
|
||||
System.identityHashCode("label test"); //indent:12 exp:12
|
||||
|
||||
if (test) { //indent:12 exp:12
|
||||
unusedLabel: //indent:16 exp:16
|
||||
System.out.println("more testing"); //indent:16 exp:16
|
||||
System.identityHashCode("more testing"); //indent:16 exp:16
|
||||
} //indent:12 exp:12
|
||||
|
||||
} //indent:8 exp:8
|
||||
label2: //indent:2 exp:4,8 warn
|
||||
System.out.println("toplevel"); //indent:8 exp:8
|
||||
System.identityHashCode("toplevel"); //indent:8 exp:8
|
||||
label3: //indent:4 exp:4
|
||||
System.out.println("toplevel"); //indent:18 exp:8,12 warn
|
||||
System.out.println("toplevel"); //indent:18 exp:8 warn
|
||||
System.identityHashCode("toplevel"); //indent:18 exp:8,12 warn
|
||||
System.identityHashCode("toplevel"); //indent:18 exp:8 warn
|
||||
label4: //indent:4 exp:4
|
||||
System.out.println("toplevel"); //indent:6 exp:8,12 warn
|
||||
System.identityHashCode("toplevel"); //indent:6 exp:8,12 warn
|
||||
label5: //indent:4 exp:4
|
||||
System //indent:6 exp:8,12 warn
|
||||
.out. //indent:12 exp:>=10
|
||||
|
|
|
|||
|
|
@ -100,20 +100,20 @@ public class InputInvalidMethodIndent { //indent:0 exp:0
|
|||
System.getProperty("foo"); //indent:10 exp:12 warn
|
||||
} //indent:6 exp:8 warn
|
||||
|
||||
System.out.println("methods are: " + //indent:8 exp:8
|
||||
System.identityHashCode("methods are: " + //indent:8 exp:8
|
||||
Arrays.asList( //indent:10 exp:12 warn
|
||||
new String[] {"method"}).toString()); //indent:16 exp:>=14
|
||||
|
||||
|
||||
System.out.println("methods are: " + //indent:8 exp:8
|
||||
System.identityHashCode("methods are: " + //indent:8 exp:8
|
||||
Arrays.asList( //indent:12 exp:>=12
|
||||
new String[] {"method"}).toString()); //indent:14 exp:>=14
|
||||
|
||||
System.out.println("methods are: " //indent:8 exp:8
|
||||
System.identityHashCode("methods are: " //indent:8 exp:8
|
||||
+ Arrays.asList( //indent:10 exp:12 warn
|
||||
new String[] {"method"}).toString()); //indent:16 exp:>=14
|
||||
|
||||
System.out.println("methods are: " //indent:8 exp:8
|
||||
System.identityHashCode("methods are: " //indent:8 exp:8
|
||||
+ Arrays.asList( //indent:12 exp:>=12
|
||||
new String[] {"method"}).toString()); //indent:14 exp:>=12
|
||||
|
||||
|
|
@ -126,7 +126,7 @@ public class InputInvalidMethodIndent { //indent:0 exp:0
|
|||
new String("type") //indent:10 exp:12 warn
|
||||
); //indent:6 exp:8 warn
|
||||
|
||||
System.out.println("methods are: " + Arrays.asList( //indent:8 exp:8
|
||||
System.identityHashCode("methods are: " + Arrays.asList( //indent:8 exp:8
|
||||
new String[] {"method"}).toString() //indent:12 exp:>=12
|
||||
); //indent:6 exp:8 warn
|
||||
} //indent:4 exp:4
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ public class InputInvalidSwitchIndent { //indent:0 exp:0
|
|||
switch (s) { //indent:6 exp:8 warn
|
||||
|
||||
case 4: //indent:10 exp:12 warn
|
||||
System.out.println(""); //indent:14 exp:16 warn
|
||||
System.identityHashCode(""); //indent:14 exp:16 warn
|
||||
break; //indent:16 exp:16
|
||||
|
||||
case CONST: //indent:12 exp:12
|
||||
|
|
@ -41,7 +41,7 @@ public class InputInvalidSwitchIndent { //indent:0 exp:0
|
|||
break; //indent:16 exp:16
|
||||
|
||||
default: //indent:10 exp:12 warn
|
||||
System.out.println(""); //indent:14 exp:16 warn
|
||||
System.identityHashCode(""); //indent:14 exp:16 warn
|
||||
break; //indent:14 exp:16 warn
|
||||
} //indent:8 exp:8
|
||||
|
||||
|
|
@ -50,21 +50,21 @@ public class InputInvalidSwitchIndent { //indent:0 exp:0
|
|||
switch (s) { //indent:8 exp:8
|
||||
|
||||
case 4: { //indent:12 exp:12
|
||||
System.out.println(""); //indent:14 exp:16 warn
|
||||
System.identityHashCode(""); //indent:14 exp:16 warn
|
||||
break; //indent:18 exp:16 warn
|
||||
} //indent:10 exp:12 warn
|
||||
|
||||
case CONST2: //indent:12 exp:12
|
||||
case CONST3: //indent:12 exp:12
|
||||
{ //indent:10 exp:12 warn
|
||||
System.out.println(""); //indent:16 exp:16
|
||||
System.identityHashCode(""); //indent:16 exp:16
|
||||
break; //indent:16 exp:16
|
||||
} //indent:14 exp:12 warn
|
||||
|
||||
|
||||
case 22: //indent:12 exp:12
|
||||
{ //indent:14 exp:12 warn
|
||||
System.out.println(""); //indent:16 exp:16
|
||||
System.identityHashCode(""); //indent:16 exp:16
|
||||
break; //indent:16 exp:16
|
||||
} //indent:10 exp:12 warn
|
||||
} //indent:8 exp:8
|
||||
|
|
@ -80,7 +80,7 @@ public class InputInvalidSwitchIndent { //indent:0 exp:0
|
|||
case //indent:12 exp:12
|
||||
CONST3: //indent:14 exp:16 warn
|
||||
{ //indent:12 exp:12
|
||||
System.out.println(""); //indent:16 exp:16
|
||||
System.identityHashCode(""); //indent:16 exp:16
|
||||
break; //indent:16 exp:16
|
||||
} //indent:12 exp:12
|
||||
} //indent:8 exp:8
|
||||
|
|
|
|||
|
|
@ -24,26 +24,26 @@ public class InputInvalidTryIndent { //indent:0 exp:0
|
|||
|
||||
try { //indent:9 exp:8 warn
|
||||
} catch (Throwable t) { //indent:7 exp:8 warn
|
||||
System.out.println("err"); //indent:12 exp:12
|
||||
System.identityHashCode("err"); //indent:12 exp:12
|
||||
} //indent:7 exp:8 warn
|
||||
|
||||
try { //indent:4 exp:8 warn
|
||||
System.out.println("test"); //indent:8 exp:12 warn
|
||||
System.identityHashCode("test"); //indent:8 exp:12 warn
|
||||
} finally { //indent:4 exp:8 warn
|
||||
System.out.println("finally"); //indent:8 exp:12 warn
|
||||
System.identityHashCode("finally"); //indent:8 exp:12 warn
|
||||
} //indent:8 exp:8
|
||||
|
||||
try { //indent:8 exp:8
|
||||
} catch (Throwable t) { //indent:8 exp:8
|
||||
System.out.println("err"); //indent:8 exp:12 warn
|
||||
System.identityHashCode("err"); //indent:8 exp:12 warn
|
||||
} finally { //indent:8 exp:8
|
||||
} //indent:8 exp:8
|
||||
|
||||
try { //indent:8 exp:8
|
||||
} catch (Exception t) { //indent:10 exp:8 warn
|
||||
System.out.println("err"); //indent:12 exp:12
|
||||
System.identityHashCode("err"); //indent:12 exp:12
|
||||
} catch (Throwable t) { //indent:6 exp:8 warn
|
||||
System.out.println("err"); //indent:12 exp:12
|
||||
System.identityHashCode("err"); //indent:12 exp:12
|
||||
} //indent:8 exp:8
|
||||
|
||||
try { //indent:8 exp:8
|
||||
|
|
@ -53,31 +53,31 @@ public class InputInvalidTryIndent { //indent:0 exp:0
|
|||
|
||||
|
||||
try { //indent:8 exp:8
|
||||
System.out.println("try"); //indent:12 exp:12
|
||||
System.identityHashCode("try"); //indent:12 exp:12
|
||||
} //indent:8 exp:8
|
||||
catch (Exception t) { //indent:8 exp:8
|
||||
System.out.println("err"); //indent:10 exp:12 warn
|
||||
System.out.println("err"); //indent:14 exp:12 warn
|
||||
System.out.println("err"); //indent:10 exp:12 warn
|
||||
System.identityHashCode("err"); //indent:10 exp:12 warn
|
||||
System.identityHashCode("err"); //indent:14 exp:12 warn
|
||||
System.identityHashCode("err"); //indent:10 exp:12 warn
|
||||
} //indent:8 exp:8
|
||||
catch (Throwable t) { //indent:6 exp:8 warn
|
||||
System.out.println("err"); //indent:12 exp:12
|
||||
System.identityHashCode("err"); //indent:12 exp:12
|
||||
} //indent:8 exp:8
|
||||
finally { //indent:8 exp:8
|
||||
} //indent:8 exp:8
|
||||
|
||||
try //indent:8 exp:8
|
||||
{ //indent:10 exp:8 warn
|
||||
System.out.println("try"); //indent:12 exp:12
|
||||
System.identityHashCode("try"); //indent:12 exp:12
|
||||
} //indent:10 exp:8 warn
|
||||
catch (Exception t) //indent:8 exp:8
|
||||
{ //indent:6 exp:8 warn
|
||||
System.out.println("err"); //indent:12 exp:12
|
||||
System.out.println("err"); //indent:12 exp:12
|
||||
System.identityHashCode("err"); //indent:12 exp:12
|
||||
System.identityHashCode("err"); //indent:12 exp:12
|
||||
} //indent:10 exp:8 warn
|
||||
catch (Throwable t) //indent:8 exp:8
|
||||
{ //indent:8 exp:8
|
||||
System.out.println("err"); //indent:10 exp:12 warn
|
||||
System.identityHashCode("err"); //indent:10 exp:12 warn
|
||||
} //indent:8 exp:8
|
||||
finally //indent:8 exp:8
|
||||
{ //indent:8 exp:8
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ public class InputUseTwoSpaces { //indent:0 exp:0
|
|||
|
||||
class Test { //indent:0 exp:0
|
||||
public static void main(String[] args) { //indent:2 exp:2
|
||||
System.out.println(" Hello" + //indent:4 exp:4
|
||||
System.identityHashCode(" Hello" + //indent:4 exp:4
|
||||
new Object() { //indent:6 exp:>=6
|
||||
public String toString() { //indent:8 exp:8
|
||||
return "World"; //indent:10 exp:10
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ class bug1260079 //indent:0 exp:0
|
|||
{ //indent:8 exp:8
|
||||
public void run() //indent:12 exp:12
|
||||
{ //indent:12 exp:12
|
||||
System.out.println("ran"); //indent:16 exp:16
|
||||
System.identityHashCode("ran"); //indent:16 exp:16
|
||||
} //indent:12 exp:12
|
||||
}.start(); //indent:8 exp:8
|
||||
} //indent:4 exp:4
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ public class InputValidCommaIndent { //indent:0 exp:0
|
|||
|
||||
if ((j == 2 && k == 3) //indent:8 exp:8
|
||||
|| test) { //indent:14 exp:>=12
|
||||
System.out.println("test"); //indent:12 exp:12
|
||||
System.identityHashCode("test"); //indent:12 exp:12
|
||||
} //indent:8 exp:8
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ public class InputValidDotIndent { //indent:0 exp:0
|
|||
/** Creates a new instance of InputValidDotIndent */ //indent:4 exp:4
|
||||
public InputValidDotIndent() { //indent:4 exp:4
|
||||
|
||||
System.out.println(); //indent:8 exp:8
|
||||
System.lineSeparator(); //indent:8 exp:8
|
||||
|
||||
System. //indent:8 exp:8
|
||||
out.println(); //indent:12 exp:12
|
||||
|
|
|
|||
|
|
@ -22,16 +22,16 @@ public class InputValidLabelIndent { //indent:0 exp:0
|
|||
|
||||
while (test) { //indent:8 exp:8
|
||||
label: //indent:8 exp:8,12
|
||||
System.out.println("label test"); //indent:12 exp:12,16
|
||||
System.identityHashCode("label test"); //indent:12 exp:12,16
|
||||
|
||||
if (test) { //indent:12 exp:12
|
||||
unusedLabel: //indent:12 exp:12
|
||||
System.out.println("more testing"); //indent:16 exp:16,20
|
||||
System.identityHashCode("more testing"); //indent:16 exp:16,20
|
||||
} //indent:12 exp:12
|
||||
|
||||
} //indent:8 exp:8
|
||||
label2: //indent:4 exp:4,8
|
||||
System.out.println("toplevel"); //indent:8 exp:8,12
|
||||
System.identityHashCode("toplevel"); //indent:8 exp:8,12
|
||||
} //indent:4 exp:4
|
||||
|
||||
} //indent:0 exp:0
|
||||
|
|
|
|||
|
|
@ -140,14 +140,14 @@ public class InputValidMethodIndent extends java.awt.event.MouseAdapter implemen
|
|||
|
||||
|
||||
void method6() { //indent:4 exp:4
|
||||
System.out.println("methods are: " + Arrays.asList( //indent:8 exp:8
|
||||
System.identityHashCode("methods are: " + Arrays.asList( //indent:8 exp:8
|
||||
new String[] {"method"}).toString()); //indent:12 exp:>=12
|
||||
|
||||
System.out.println("methods are: " + Arrays.asList( //indent:8 exp:8
|
||||
System.identityHashCode("methods are: " + Arrays.asList( //indent:8 exp:8
|
||||
new String[] {"method"} //indent:12 exp:>=12
|
||||
).toString()); //indent:8 exp:8
|
||||
|
||||
System.out.println("methods are: " + Arrays.asList( //indent:8 exp:8
|
||||
System.identityHashCode("methods are: " + Arrays.asList( //indent:8 exp:8
|
||||
new String[] {"method"}).toString() //indent:12 exp:>=12
|
||||
); //indent:8 exp:8
|
||||
|
||||
|
|
@ -158,11 +158,11 @@ public class InputValidMethodIndent extends java.awt.event.MouseAdapter implemen
|
|||
myfunc2(3, 4, method2(3, 4, 5, 6) + 5, //indent:8 exp:8
|
||||
6, 7, 8, 9); //indent:12 exp:>=12
|
||||
|
||||
System.out.println("methods are: " + //indent:8 exp:8
|
||||
System.identityHashCode("methods are: " + //indent:8 exp:8
|
||||
Arrays.asList( //indent:12 exp:>=12
|
||||
new String[] {"method"}).toString()); //indent:16 exp:>=16
|
||||
|
||||
System.out.println("methods are: " //indent:8 exp:8
|
||||
System.identityHashCode("methods are: " //indent:8 exp:8
|
||||
+ Arrays.asList( //indent:12 exp:>=12
|
||||
new String[] {"method"}).toString()); //indent:16 exp:>=16
|
||||
|
||||
|
|
@ -170,11 +170,11 @@ public class InputValidMethodIndent extends java.awt.event.MouseAdapter implemen
|
|||
String blah = (String) System.getProperty( //indent:8 exp:8
|
||||
new String("type")); //indent:12 exp:>=12
|
||||
|
||||
System.out.println(method1() + "mytext" //indent:8 exp:8
|
||||
System.identityHashCode(method1() + "mytext" //indent:8 exp:8
|
||||
+ " at indentation level not at correct indentation, " //indent:12 exp:>=12
|
||||
+ method1()); //indent:12 exp:>=12
|
||||
|
||||
System.out.println( //indent:8 exp:8
|
||||
System.identityHashCode( //indent:8 exp:8
|
||||
method1() + "mytext" //indent:12 exp:>=12
|
||||
+ " at indentation level not at correct indentation, " //indent:16 exp:>=12
|
||||
+ method1()); //indent:16 exp:>=12
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ public class InputValidSwitchIndent { //indent:0 exp:0
|
|||
switch (s) { //indent:8 exp:8
|
||||
|
||||
case 4: //indent:12 exp:12
|
||||
System.out.println(""); //indent:16 exp:16
|
||||
System.identityHashCode(""); //indent:16 exp:16
|
||||
break; //indent:16 exp:16
|
||||
|
||||
case CONST: //indent:12 exp:12
|
||||
|
|
@ -41,7 +41,7 @@ public class InputValidSwitchIndent { //indent:0 exp:0
|
|||
break; //indent:16 exp:16
|
||||
|
||||
default: //indent:12 exp:12
|
||||
System.out.println(""); //indent:16 exp:16
|
||||
System.identityHashCode(""); //indent:16 exp:16
|
||||
break; //indent:16 exp:16
|
||||
} //indent:8 exp:8
|
||||
|
||||
|
|
@ -50,7 +50,7 @@ public class InputValidSwitchIndent { //indent:0 exp:0
|
|||
switch (s) { //indent:8 exp:8
|
||||
|
||||
case 4: { //indent:12 exp:12
|
||||
System.out.println(""); //indent:16 exp:16
|
||||
System.identityHashCode(""); //indent:16 exp:16
|
||||
break; //indent:16 exp:16
|
||||
} //indent:12 exp:12
|
||||
|
||||
|
|
@ -60,7 +60,7 @@ public class InputValidSwitchIndent { //indent:0 exp:0
|
|||
case CONST2: //indent:12 exp:12
|
||||
case CONST3: //indent:12 exp:12
|
||||
{ //indent:12 exp:12
|
||||
System.out.println(""); //indent:16 exp:16
|
||||
System.identityHashCode(""); //indent:16 exp:16
|
||||
break; //indent:16 exp:16
|
||||
} //indent:12 exp:12
|
||||
|
||||
|
|
@ -73,7 +73,7 @@ public class InputValidSwitchIndent { //indent:0 exp:0
|
|||
|
||||
case //indent:12 exp:12
|
||||
4: { //indent:16 exp:16
|
||||
System.out.println(""); //indent:16 exp:16
|
||||
System.identityHashCode(""); //indent:16 exp:16
|
||||
break; //indent:16 exp:16
|
||||
} //indent:12 exp:12
|
||||
|
||||
|
|
@ -85,7 +85,7 @@ public class InputValidSwitchIndent { //indent:0 exp:0
|
|||
case //indent:12 exp:12
|
||||
CONST3: //indent:16 exp:16
|
||||
{ //indent:12 exp:12
|
||||
System.out.println(""); //indent:16 exp:16
|
||||
System.identityHashCode(""); //indent:16 exp:16
|
||||
break; //indent:16 exp:16
|
||||
} //indent:12 exp:12
|
||||
|
||||
|
|
@ -99,7 +99,7 @@ public class InputValidSwitchIndent { //indent:0 exp:0
|
|||
|
||||
switch (s) { //indent:8 exp:8
|
||||
default: //indent:12 exp:12
|
||||
System.out.println(""); //indent:16 exp:16
|
||||
System.identityHashCode(""); //indent:16 exp:16
|
||||
break; //indent:16 exp:16
|
||||
} //indent:8 exp:8
|
||||
|
||||
|
|
|
|||
|
|
@ -24,26 +24,26 @@ public class InputValidTryIndent { //indent:0 exp:0
|
|||
|
||||
try { //indent:8 exp:8
|
||||
} catch (Throwable t) { //indent:8 exp:8
|
||||
System.out.println("err"); //indent:12 exp:12
|
||||
System.identityHashCode("err"); //indent:12 exp:12
|
||||
} //indent:8 exp:8
|
||||
|
||||
try { //indent:8 exp:8
|
||||
System.out.println("test"); //indent:12 exp:12
|
||||
System.identityHashCode("test"); //indent:12 exp:12
|
||||
} finally { //indent:8 exp:8
|
||||
System.out.println("finally"); //indent:12 exp:12
|
||||
System.identityHashCode("finally"); //indent:12 exp:12
|
||||
} //indent:8 exp:8
|
||||
|
||||
try { //indent:8 exp:8
|
||||
} catch (Throwable t) { //indent:8 exp:8
|
||||
System.out.println("err"); //indent:12 exp:12
|
||||
System.identityHashCode("err"); //indent:12 exp:12
|
||||
} finally { //indent:8 exp:8
|
||||
} //indent:8 exp:8
|
||||
|
||||
try { //indent:8 exp:8
|
||||
} catch (Exception t) { //indent:8 exp:8
|
||||
System.out.println("err"); //indent:12 exp:12
|
||||
System.identityHashCode("err"); //indent:12 exp:12
|
||||
} catch (Throwable t) { //indent:8 exp:8
|
||||
System.out.println("err"); //indent:12 exp:12
|
||||
System.identityHashCode("err"); //indent:12 exp:12
|
||||
} //indent:8 exp:8
|
||||
|
||||
try { //indent:8 exp:8
|
||||
|
|
@ -53,30 +53,30 @@ public class InputValidTryIndent { //indent:0 exp:0
|
|||
|
||||
|
||||
try { //indent:8 exp:8
|
||||
System.out.println("try"); //indent:12 exp:12
|
||||
System.identityHashCode("try"); //indent:12 exp:12
|
||||
} //indent:8 exp:8
|
||||
catch (Exception t) { //indent:8 exp:8
|
||||
System.out.println("err"); //indent:12 exp:12
|
||||
System.out.println("err"); //indent:12 exp:12
|
||||
System.identityHashCode("err"); //indent:12 exp:12
|
||||
System.identityHashCode("err"); //indent:12 exp:12
|
||||
} //indent:8 exp:8
|
||||
catch (Throwable t) { //indent:8 exp:8
|
||||
System.out.println("err"); //indent:12 exp:12
|
||||
System.identityHashCode("err"); //indent:12 exp:12
|
||||
} //indent:8 exp:8
|
||||
finally { //indent:8 exp:8
|
||||
} //indent:8 exp:8
|
||||
|
||||
try //indent:8 exp:8
|
||||
{ //indent:8 exp:8
|
||||
System.out.println("try"); //indent:12 exp:12
|
||||
System.identityHashCode("try"); //indent:12 exp:12
|
||||
} //indent:8 exp:8
|
||||
catch (Exception t) //indent:8 exp:8
|
||||
{ //indent:8 exp:8
|
||||
System.out.println("err"); //indent:12 exp:12
|
||||
System.out.println("err"); //indent:12 exp:12
|
||||
System.identityHashCode("err"); //indent:12 exp:12
|
||||
System.identityHashCode("err"); //indent:12 exp:12
|
||||
} //indent:8 exp:8
|
||||
catch (Throwable t) //indent:8 exp:8
|
||||
{ //indent:8 exp:8
|
||||
System.out.println("err"); //indent:12 exp:12
|
||||
System.identityHashCode("err"); //indent:12 exp:12
|
||||
} //indent:8 exp:8
|
||||
finally //indent:8 exp:8
|
||||
{ //indent:8 exp:8
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ public class InputScopeAnonInner
|
|||
private Runnable mRunnable = new Runnable() {
|
||||
public void run() // should not have to be documented, class is anon.
|
||||
{
|
||||
System.out.println("running");
|
||||
System.identityHashCode("running");
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -38,7 +38,7 @@ public class InputScopeAnonInner
|
|||
{
|
||||
public void mouseClicked( MouseEvent aEv )
|
||||
{
|
||||
System.out.println("click");
|
||||
System.identityHashCode("click");
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
|
@ -52,7 +52,7 @@ public class InputScopeAnonInner
|
|||
{
|
||||
public void mouseClicked( MouseEvent aEv )
|
||||
{
|
||||
System.out.println("click");
|
||||
System.identityHashCode("click");
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ public class InputBooleanExpressionComplexityNPE
|
|||
{
|
||||
static {
|
||||
try {
|
||||
System.out.println("a");
|
||||
System.identityHashCode("a");
|
||||
} catch (IllegalStateException | IllegalArgumentException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ public class InputJavaNCSS {
|
|||
int a = 0;
|
||||
switch (a) {
|
||||
case 1: //falls through
|
||||
case 2: System.out.println("Hello"); break;
|
||||
case 2: System.identityHashCode("Hello"); break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
|
|
@ -40,7 +40,7 @@ public class InputJavaNCSS {
|
|||
|
||||
//should give an ncss of 2
|
||||
public void itemStateChanged(ItemEvent e) {
|
||||
System.out.println("Hello");
|
||||
System.identityHashCode("Hello");
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,22 +50,22 @@ public class InputAnonInnerLength
|
|||
private Runnable mRunnable1 = new Runnable() {
|
||||
public void run() // should not have to be documented, class is anon.
|
||||
{
|
||||
System.out.println("running");
|
||||
System.out.println("running");
|
||||
System.out.println("running");
|
||||
System.out.println("running");
|
||||
System.out.println("running");
|
||||
System.out.println("running");
|
||||
System.out.println("running");
|
||||
System.out.println("running");
|
||||
System.out.println("running");
|
||||
System.out.println("running");
|
||||
System.out.println("running");
|
||||
System.out.println("running");
|
||||
System.out.println("running");
|
||||
System.out.println("running");
|
||||
System.out.println("running");
|
||||
System.out.println("running");
|
||||
System.identityHashCode("running");
|
||||
System.identityHashCode("running");
|
||||
System.identityHashCode("running");
|
||||
System.identityHashCode("running");
|
||||
System.identityHashCode("running");
|
||||
System.identityHashCode("running");
|
||||
System.identityHashCode("running");
|
||||
System.identityHashCode("running");
|
||||
System.identityHashCode("running");
|
||||
System.identityHashCode("running");
|
||||
System.identityHashCode("running");
|
||||
System.identityHashCode("running");
|
||||
System.identityHashCode("running");
|
||||
System.identityHashCode("running");
|
||||
System.identityHashCode("running");
|
||||
System.identityHashCode("running");
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -75,21 +75,21 @@ public class InputAnonInnerLength
|
|||
private Runnable mRunnable2 = new Runnable() {
|
||||
public void run() // should not have to be documented, class is anon.
|
||||
{
|
||||
System.out.println("running");
|
||||
System.out.println("running");
|
||||
System.out.println("running");
|
||||
System.out.println("running");
|
||||
System.out.println("running");
|
||||
System.out.println("running");
|
||||
System.out.println("running");
|
||||
System.out.println("running");
|
||||
System.out.println("running");
|
||||
System.out.println("running");
|
||||
System.out.println("running");
|
||||
System.out.println("running");
|
||||
System.out.println("running");
|
||||
System.out.println("running");
|
||||
System.out.println("running");
|
||||
System.identityHashCode("running");
|
||||
System.identityHashCode("running");
|
||||
System.identityHashCode("running");
|
||||
System.identityHashCode("running");
|
||||
System.identityHashCode("running");
|
||||
System.identityHashCode("running");
|
||||
System.identityHashCode("running");
|
||||
System.identityHashCode("running");
|
||||
System.identityHashCode("running");
|
||||
System.identityHashCode("running");
|
||||
System.identityHashCode("running");
|
||||
System.identityHashCode("running");
|
||||
System.identityHashCode("running");
|
||||
System.identityHashCode("running");
|
||||
System.identityHashCode("running");
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -102,7 +102,7 @@ public class InputAnonInnerLength
|
|||
{
|
||||
public void mouseClicked( MouseEvent aEv )
|
||||
{
|
||||
System.out.println("click");
|
||||
System.identityHashCode("click");
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
|
@ -116,7 +116,7 @@ public class InputAnonInnerLength
|
|||
{
|
||||
public void mouseClicked( MouseEvent aEv )
|
||||
{
|
||||
System.out.println("click");
|
||||
System.identityHashCode("click");
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ public class InputParenPadWithSpace
|
|||
{
|
||||
int[] i = new int[2];
|
||||
for ( int j: i ) {
|
||||
System.out.println ( j );
|
||||
System.identityHashCode ( j );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ public class InputWhitespaceAround
|
|||
{
|
||||
int[] i = new int[2];
|
||||
for ( int j: i ) {
|
||||
System.out.println ( j );
|
||||
System.identityHashCode ( j );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue