Use uppercase for classpath-related static final field names

Closes gh-35525
This commit is contained in:
Sébastien Deleuze
2025-09-22 18:32:14 +02:00
parent 5ac3c40689
commit 7635ac38f6
76 changed files with 451 additions and 450 deletions
@@ -43,15 +43,15 @@ class MapTests extends AbstractExpressionTests {
// if the list is full of literals then it will be of the type unmodifiableMapClass
// rather than HashMap (or similar)
private static final Class<?> unmodifiableMapClass = Collections.unmodifiableMap(Map.of()).getClass();
private static final Class<?> UNMODIFIABLE_MAP_CLASS = Collections.unmodifiableMap(Map.of()).getClass();
@Test
void inlineMapCreationForLiterals() {
evaluate("{'a':1, 'b':2, 'c':3, 'd':4, 'e':5}", "{a=1, b=2, c=3, d=4, e=5}", unmodifiableMapClass);
evaluate("{'a':1}", "{a=1}", unmodifiableMapClass);
evaluate("{'abc':'def', 'uvw':'xyz'}", "{abc=def, uvw=xyz}", unmodifiableMapClass);
evaluate("{:}", "{}", unmodifiableMapClass);
evaluate("{'a':1, 'b':2, 'c':3, 'd':4, 'e':5}", "{a=1, b=2, c=3, d=4, e=5}", UNMODIFIABLE_MAP_CLASS);
evaluate("{'a':1}", "{a=1}", UNMODIFIABLE_MAP_CLASS);
evaluate("{'abc':'def', 'uvw':'xyz'}", "{abc=def, uvw=xyz}", UNMODIFIABLE_MAP_CLASS);
evaluate("{:}", "{}", UNMODIFIABLE_MAP_CLASS);
}
@Test
@@ -65,9 +65,9 @@ class MapTests extends AbstractExpressionTests {
@Test
void inlineMapAndNesting() {
evaluate("{a:{a:1,b:2,c:3},b:{d:4,e:5,f:6}}", "{a={a=1, b=2, c=3}, b={d=4, e=5, f=6}}", unmodifiableMapClass);
evaluate("{a:{x:1,y:'2',z:3},b:{u:4,v:{'a','b'},w:5,x:6}}", "{a={x=1, y=2, z=3}, b={u=4, v=[a, b], w=5, x=6}}", unmodifiableMapClass);
evaluate("{a:{1,2,3},b:{4,5,6}}", "{a=[1, 2, 3], b=[4, 5, 6]}", unmodifiableMapClass);
evaluate("{a:{a:1,b:2,c:3},b:{d:4,e:5,f:6}}", "{a={a=1, b=2, c=3}, b={d=4, e=5, f=6}}", UNMODIFIABLE_MAP_CLASS);
evaluate("{a:{x:1,y:'2',z:3},b:{u:4,v:{'a','b'},w:5,x:6}}", "{a={x=1, y=2, z=3}, b={u=4, v=[a, b], w=5, x=6}}", UNMODIFIABLE_MAP_CLASS);
evaluate("{a:{1,2,3},b:{4,5,6}}", "{a=[1, 2, 3], b=[4, 5, 6]}", UNMODIFIABLE_MAP_CLASS);
}
@Test