Skip to content

Commit f32b13c

Browse files
committed
Restored original 4.3.x expectation for property access on null target
1 parent 1897d8e commit f32b13c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

spring-expression/src/test/java/org/springframework/expression/spel/SpelReproTests.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -236,25 +236,25 @@ public void NPE_SPR5673() {
236236
}
237237

238238
@Test
239-
public void accessingNullPropertyViaReflection_SPR5663() throws AccessException {
239+
public void propertyAccessOnNullTarget_SPR5663() throws AccessException {
240240
PropertyAccessor accessor = new ReflectivePropertyAccessor();
241241
EvaluationContext context = TestScenarioCreator.getTestEvaluationContext();
242242
assertFalse(accessor.canRead(context, null, "abc"));
243243
assertFalse(accessor.canWrite(context, null, "abc"));
244244

245245
try {
246246
accessor.read(context, null, "abc");
247-
fail("Should have failed with an IllegalStateException");
247+
fail("Should have failed with an AccessException");
248248
}
249-
catch (IllegalStateException ex) {
249+
catch (AccessException ex) {
250250
// expected
251251
}
252252

253253
try {
254254
accessor.write(context, null, "abc", "foo");
255-
fail("Should have failed with an IllegalStateException");
255+
fail("Should have failed with an AccessException");
256256
}
257-
catch (IllegalStateException ex) {
257+
catch (AccessException ex) {
258258
// expected
259259
}
260260
}

0 commit comments

Comments
 (0)