Skip to content

Commit

Permalink
Naming/PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
wied03 committed Oct 26, 2024
1 parent 6130538 commit d425fc7
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ public class ActionConfiguration {

public final boolean allowUnknownParameters;

public final List<String> alternateMessageURIs;

public final Action annotation;

public final Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<>();
Expand All @@ -60,8 +62,6 @@ public class ActionConfiguration {

public final Map<HTTPMethod, ExecuteMethodConfiguration> executeMethods;

public final List<String> fallbackActionMessageURIs;

public final Map<String, FileUpload> fileUploadMembers;

public final List<Method> formPrepareMethods;
Expand Down Expand Up @@ -125,15 +125,15 @@ public ActionConfiguration(Class<?> actionClass,
List<Method> preValidationMethods,
Field unknownParametersField,
Set<String> validContentTypes,
List<String> fallbackActionMessageURIs) {
List<String> alternateMessageURIs) {
Objects.requireNonNull(actionClass);

this.actionClass = actionClass;
this.allowUnknownParameters = allowUnknownParameters;
this.constraintValidationMethods = constraintValidationMethods;
this.formPrepareMethods = formPrepareMethods;
this.authorizationMethods = authorizationMethods;
this.fallbackActionMessageURIs = fallbackActionMessageURIs;
this.alternateMessageURIs = alternateMessageURIs;
this.jwtAuthorizationMethods = jwtAuthorizationMethods;
this.preValidationMethods = preValidationMethods;
this.postValidationMethods = postValidationMethods;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,11 @@ protected String findMessage(ActionInvocation actionInvocation, String key) {

ActionConfiguration config = actionInvocation.configuration;
if (config != null) {
return config.fallbackActionMessageURIs.stream()
.map(uri -> findMessage(uri, key))
.filter(Objects::nonNull)
.findFirst()
.orElse(null);
return config.alternateMessageURIs.stream()
.map(uri -> findMessage(uri, key))
.filter(Objects::nonNull)
.findFirst()
.orElse(null);
}

return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
#
normal_message=normal_message
normal_message=Normal message
2 changes: 1 addition & 1 deletion src/test/web/messages/nested/nested-message.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
#
nested_message=nested_message
nested_message=Nested message

0 comments on commit d425fc7

Please sign in to comment.