File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
spring-expression/src/test/java/org/springframework/expression/spel Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -236,25 +236,25 @@ public void NPE_SPR5673() {
236
236
}
237
237
238
238
@ Test
239
- public void accessingNullPropertyViaReflection_SPR5663 () throws AccessException {
239
+ public void propertyAccessOnNullTarget_SPR5663 () throws AccessException {
240
240
PropertyAccessor accessor = new ReflectivePropertyAccessor ();
241
241
EvaluationContext context = TestScenarioCreator .getTestEvaluationContext ();
242
242
assertFalse (accessor .canRead (context , null , "abc" ));
243
243
assertFalse (accessor .canWrite (context , null , "abc" ));
244
244
245
245
try {
246
246
accessor .read (context , null , "abc" );
247
- fail ("Should have failed with an IllegalStateException " );
247
+ fail ("Should have failed with an AccessException " );
248
248
}
249
- catch (IllegalStateException ex ) {
249
+ catch (AccessException ex ) {
250
250
// expected
251
251
}
252
252
253
253
try {
254
254
accessor .write (context , null , "abc" , "foo" );
255
- fail ("Should have failed with an IllegalStateException " );
255
+ fail ("Should have failed with an AccessException " );
256
256
}
257
- catch (IllegalStateException ex ) {
257
+ catch (AccessException ex ) {
258
258
// expected
259
259
}
260
260
}
You can’t perform that action at this time.
0 commit comments