[ 
https://issues.apache.org/jira/browse/WW-5383?focusedWorklogId=897820&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-897820
 ]

ASF GitHub Bot logged work on WW-5383:
--------------------------------------

                Author: ASF GitHub Bot
            Created on: 03/Jan/24 10:09
            Start Date: 03/Jan/24 10:09
    Worklog Time Spent: 10m 
      Work Description: kusalk commented on code in PR #830:
URL: https://github.com/apache/struts/pull/830#discussion_r1440272476


##########
plugins/convention/src/main/java/org/apache/struts2/convention/PackageBasedActionConfigBuilder.java:
##########
@@ -673,17 +697,17 @@ protected void buildConfiguration(Set<Class> classes) {
             for (String namespace : namespaces) {
                 String defaultActionName = determineActionName(actionClass);
                 PackageConfig.Builder defaultPackageConfig = 
getPackageConfig(packageConfigs, namespace,
-                        actionPackage, actionClass, null);
+                    actionPackage, actionClass, null);
 
                 // Verify that the annotations have no errors and also 
determine if the default action
                 // configuration should still be built or not.
                 Map<String, List<Action>> map = 
getActionAnnotations(actionClass);
                 Set<String> actionNames = new HashSet<>();
                 boolean hasDefaultMethod = 
ReflectionTools.containsMethod(actionClass, DEFAULT_METHOD);
                 if (!map.containsKey(DEFAULT_METHOD)
-                        && hasDefaultMethod
-                        && actionAnnotation == null && actionsAnnotation == 
null
-                        && (alwaysMapExecute || map.isEmpty())) {
+                    && hasDefaultMethod
+                    && actionAnnotation == null && actionsAnnotation == null
+                    && (alwaysMapExecute || map.isEmpty())) {

Review Comment:
   My personal preference is to use double indents for continuations - it 
avoids situations like these where the guard blends in with the following code





Issue Time Tracking
-------------------

    Worklog Id:     (was: 897820)
    Time Spent: 0.5h  (was: 20m)

> Exclude JAR files by default when scanning for actions on JDK9+
> ---------------------------------------------------------------
>
>                 Key: WW-5383
>                 URL: https://issues.apache.org/jira/browse/WW-5383
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Plugin - Convention
>            Reporter: Lukasz Lenart
>            Priority: Minor
>             Fix For: 6.4.0
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> When running an app on the JDK9+ it can happen that the Convention plugin 
> starts scanning JAR files due to changed behaviour of 
> {{getClassLoader().getResources("")}} as this will also return additional 
> path and current pattern to exclude JARs won't work.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to