Skip to content

Commit c055518

Browse files
committed
Polishing
1 parent 62e94a4 commit c055518

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

spring-webflow/src/main/java/org/springframework/webflow/action/DispatchMethodInvoker.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2004-2012 the original author or authors.
2+
* Copyright 2004-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -48,12 +48,13 @@ class DispatchMethodInvoker {
4848
*/
4949
@SuppressWarnings("serial")
5050
private Map<String, Method> methodCache = new AbstractCachingMapDecorator<String, Method>() {
51+
@Override
5152
public Method create(String key) {
5253
String methodName = key;
5354
try {
5455
return new MethodKey(target.getClass(), methodName, parameterTypes).getMethod();
5556
} catch (InvalidMethodKeyException e) {
56-
throw new MethodLookupException("Unable to resolve dispatch method " + e.getMethodKey()
57+
throw new MethodLookupException("Unable to resolve dispatch method '" + e.getMethodKey()
5758
+ "'; make sure the method name is correct and such a method is defined on targetClass "
5859
+ target.getClass().getName(), e);
5960
}

spring-webflow/src/main/java/org/springframework/webflow/expression/spel/ActionPropertyAccessor.java

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2004-2012 the original author or authors.
2+
* Copyright 2004-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -28,32 +28,37 @@
2828
* Spring EL Property Accessor that allows invocation of methods against a resolved Web Flow action, typically a
2929
* {@link MultiAction} in expressions.
3030
* </p>
31-
*
31+
*
3232
* @see org.springframework.webflow.action.EvaluateAction
33-
*
33+
*
3434
* @author Rossen Stoyanchev
3535
* @since 2.1
3636
*/
3737
public class ActionPropertyAccessor implements PropertyAccessor {
3838

39+
@Override
3940
public Class<?>[] getSpecificTargetClasses() {
4041
return new Class[] { Action.class };
4142
}
4243

44+
@Override
4345
public boolean canRead(EvaluationContext context, Object target, String name) {
4446
return true;
4547
}
4648

49+
@Override
4750
public TypedValue read(EvaluationContext context, Object target, String name) {
4851
AnnotatedAction annotated = new AnnotatedAction((Action) target);
4952
annotated.setMethod(name);
5053
return new TypedValue(annotated);
5154
}
5255

56+
@Override
5357
public boolean canWrite(EvaluationContext context, Object target, String name) {
5458
return false;
5559
}
5660

61+
@Override
5762
public void write(EvaluationContext context, Object target, String name, Object newValue) throws AccessException {
5863
throw new AccessException("The Action cannot be set with an expression.");
5964
}

0 commit comments

Comments
 (0)