Skip to content

Commit

Permalink
code cleanup and optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
monu-k2io committed Aug 10, 2023
1 parent e03ec1c commit 2529230
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@ public class StrutsHelper {
private static final String WILDCARD = "*";
public static void gatherURLMappings(RuntimeConfiguration runtimeConfig) {
try {

Map<String, Map<String, ActionConfig>> namespaces = runtimeConfig.getActionConfigs();
for (Map.Entry<String, Map<String, ActionConfig>> namespace : namespaces.entrySet()) {

String url = namespace.getKey();
for (ActionConfig actionConfig : namespace.getValue().values()) {
String mapping;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

@Weave(type = MatchType.Interface, originalName = "com.opensymphony.xwork2.config.Configuration")
public abstract class Configuration_Instrumentation {

abstract public RuntimeConfiguration getRuntimeConfiguration();

// TODO: Need extract action extension
Expand All @@ -17,15 +16,8 @@ public List<PackageProvider> reloadContainer(List<ContainerProvider> containerPr
try {
returnVal = Weaver.callOriginal();
} finally {
postProcessing(getRuntimeConfiguration());
StrutsHelper.gatherURLMappings(getRuntimeConfiguration());
}
return returnVal;
}

private static void postProcessing(RuntimeConfiguration runtimeConfiguration) {
try {
StrutsHelper.gatherURLMappings(runtimeConfiguration);
} catch (Throwable ignored) {
}
}
}
1 change: 1 addition & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,4 @@ include 'instrumentation:jdbc-inet-oranxo'
include 'instrumentation:jdbc-sybase-6'
include 'instrumentation:low-priority-instrumentation'
include 'instrumentation:commons-jxpath'
include 'instrumentation:apache-struts2'

0 comments on commit 2529230

Please sign in to comment.