You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/test/resources/org/checkstyle/autofix/recipe/finallocalvariable/singlelocaltest/DiffSingleLocalTest.diff
Copy file name to clipboardExpand all lines: src/test/resources/org/checkstyle/autofix/recipe/finallocalvariable/singlelocaltest/InputSingleLocalTest.java
+5-1Lines changed: 5 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ public void basicLocalVariables() {
27
27
StringBuilderbuilder = newStringBuilder(); // violation, "should be declared final"
28
28
DatecurrentDate = newDate(); // violation, "should be declared final"
29
29
File// prefix comment preceding target element
30
-
tempFile = newFile("temp.txt"); // violation, "should be declared final"
30
+
tempFile = newFile("temp.txt"); // violation, "should be declared final"
31
31
}
32
32
33
33
publicvoidmethodWithCalculations() {
@@ -45,6 +45,10 @@ public String processResult(String input) {
45
45
Stringtrimmed = input.trim(); // violation, "should be declared final"
46
46
StringupperCase = trimmed.toUpperCase(); // violation, "should be declared final"
Copy file name to clipboardExpand all lines: src/test/resources/org/checkstyle/autofix/recipe/finallocalvariable/singlelocaltest/OutputSingleLocalTest.java
+6-1Lines changed: 6 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ public void basicLocalVariables() {
27
27
finalStringBuilderbuilder = newStringBuilder();
28
28
finalDatecurrentDate = newDate();
29
29
finalFile// prefix comment preceding target element
30
-
tempFile = newFile("temp.txt");
30
+
tempFile = newFile("temp.txt");
31
31
}
32
32
33
33
publicvoidmethodWithCalculations() {
@@ -44,6 +44,11 @@ public String processResult(String input) {
0 commit comments