From 59a9c8e0049cf3e17a0466985b324b8103d60f58 Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Tue, 5 Feb 2019 00:43:56 +0100 Subject: [PATCH] MethodReference.MethodValueRef.setValue throws SpelEvaluationException Closes gh-22336 --- .../springframework/expression/spel/ast/MethodReference.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/ast/MethodReference.java b/spring-expression/src/main/java/org/springframework/expression/spel/ast/MethodReference.java index 9dd732e535e..244a6c6dd99 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/ast/MethodReference.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/ast/MethodReference.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * Copyright 2002-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -395,7 +395,7 @@ public class MethodReference extends SpelNodeImpl { @Override public void setValue(@Nullable Object newValue) { - throw new IllegalAccessError(); + throw new SpelEvaluationException(0, SpelMessage.NOT_ASSIGNABLE, MethodReference.this.name); } @Override