Skip to content

Commit e3a0ecd

Browse files
Fixing variable names in tests (#745)
1 parent e1aacac commit e3a0ecd

File tree

3 files changed

+28
-28
lines changed

3 files changed

+28
-28
lines changed

src/test/java/org/openrewrite/java/migrate/IBMSemeruTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ void bar() {
8888
}
8989
}
9090
91-
public static Handler testMethod(Handler handler){ //flag (2)
92-
return handler;
91+
public static Handler testMethod(Handler handler1){ //flag (2)
92+
return handler1;
9393
}
9494
}
9595
"""

src/test/java/org/openrewrite/java/migrate/guava/PreferJavaUtilOptionalTest.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ String foo(Optional<String> optional) {
8484
import java.util.Optional;
8585
8686
class A {
87-
String foo(Optional<String> optional) {
88-
return optional.orElse(null);
87+
String foo(Optional<String> optional1) {
88+
return optional1.orElse(null);
8989
}
9090
}
9191
"""));
@@ -108,8 +108,8 @@ Optional<String> foo(Optional<String> optional) {
108108
import java.util.Optional;
109109
110110
class A {
111-
Optional<String> foo(Optional<String> optional) {
112-
return optional.orElse("other");
111+
Optional<String> foo(Optional<String> optional1) {
112+
return optional1.orElse("other");
113113
}
114114
}
115115
"""));
@@ -132,8 +132,8 @@ Optional<String> foo(Optional<String> optional) {
132132
import java.util.Optional;
133133
134134
class A {
135-
Optional<String> foo(Optional<String> optional) {
136-
return optional.orElseGet(() -> "other");
135+
Optional<String> foo(Optional<String> optional1) {
136+
return optional1.orElseGet(() -> "other");
137137
}
138138
}
139139
"""));
@@ -159,8 +159,8 @@ String foo(Optional<String> optional, Supplier<String> supplier) {
159159
import java.util.function.Supplier;
160160
161161
class A {
162-
String foo(Optional<String> optional, Supplier<String> supplier) {
163-
return optional.orElseGet(supplier);
162+
String foo(Optional<String> optional1, Supplier<String> supplier1) {
163+
return optional1.orElseGet(supplier1);
164164
}
165165
}
166166
"""
@@ -184,8 +184,8 @@ Optional<String> foo(Optional<String> optional) {
184184
import java.util.Optional;
185185
186186
class A {
187-
Optional<String> foo(Optional<String> optional) {
188-
return optional.map(String::toUpperCase);
187+
Optional<String> foo(Optional<String> optional1) {
188+
return optional1.map(String::toUpperCase);
189189
}
190190
}
191191
"""));

src/test/java/org/openrewrite/java/migrate/jakarta/RemovedJakartaFacesExpressionLanguageClassesTest.java

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ public void testJakarta() {
6767
public class Test {
6868
6969
public void testJakarta() {
70-
MethodExpression methodBinding = null;
71-
ELResolver propertyResolver = null;
72-
ValueExpression valueBinding = null;
70+
MethodExpression methodExpression = null;
71+
ELResolver eLResolver = null;
72+
ValueExpression valueExpression = null;
7373
}
7474
}
7575
"""
@@ -112,11 +112,11 @@ public void testJakarta_1() {
112112
public class Test {
113113
114114
public void testJakarta_1() {
115-
ELResolver variableResolver = null;
116-
ELException evaluationException = null;
117-
MethodNotFoundException methodNotFoundException = null;
118-
PropertyNotFoundException propertyNotFoundException = null;
119-
ELException referenceSyntaxException = null;
115+
ELResolver eLResolver = null;
116+
ELException eLException = null;
117+
MethodNotFoundException methodNotFoundException1 = null;
118+
PropertyNotFoundException propertyNotFoundException1 = null;
119+
ELException eLException1 = null;
120120
}
121121
}
122122
"""
@@ -154,9 +154,9 @@ public void testJavax() {
154154
public class Test {
155155
156156
public void testJavax() {
157-
MethodExpression methodBinding = null;
158-
ELResolver propertyResolver = null;
159-
ValueExpression valueBinding = null;
157+
MethodExpression methodExpression = null;
158+
ELResolver eLResolver = null;
159+
ValueExpression valueExpression = null;
160160
}
161161
}
162162
"""
@@ -199,11 +199,11 @@ public void testJavax_1() {
199199
public class Test {
200200
201201
public void testJavax_1() {
202-
ELResolver variableResolver = null;
203-
ELException evaluationException = null;
204-
MethodNotFoundException methodNotFoundException = null;
205-
PropertyNotFoundException propertyNotFoundException = null;
206-
ELException referenceSyntaxException = null;
202+
ELResolver eLResolver = null;
203+
ELException eLException = null;
204+
MethodNotFoundException methodNotFoundException1 = null;
205+
PropertyNotFoundException propertyNotFoundException1 = null;
206+
ELException eLException1 = null;
207207
}
208208
}
209209
"""

0 commit comments

Comments
 (0)