File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -54,20 +54,20 @@ public static void main(String[] args) throws IOException {
54
54
private static boolean inject (String agentArgs , String agentPath ,String process ) throws Exception {
55
55
List <VirtualMachineDescriptor > vmList = VirtualMachine .list ();
56
56
if (vmList .size () <= 0 )
57
- return true ;
57
+ return false ;
58
58
if (process != null ){
59
59
for (VirtualMachineDescriptor vmd : vmList ) {
60
60
String displayName = vmd .displayName ();
61
61
if (displayName .equals (process )){
62
- inject (vmd ,agentArgs ,agentPath );
62
+ return inject (vmd ,agentArgs ,agentPath );
63
63
}
64
64
}
65
65
}
66
66
67
67
for (VirtualMachineDescriptor vmd : vmList ) {
68
68
String displayName = vmd .displayName ();
69
69
if (displayName .contains ("weblogic.Server" ) || displayName .contains ("catalina" )) {
70
- inject (vmd ,agentArgs ,agentPath );
70
+ return inject (vmd ,agentArgs ,agentPath );
71
71
}
72
72
}
73
73
return false ;
You can’t perform that action at this time.
0 commit comments