Skip to content

Commit 9190a87

Browse files
committed
fix: support jdk11 attach exception
1 parent 898a18d commit 9190a87

File tree

1 file changed

+11
-1
lines changed
  • packer/src/main/java/com/reajason/javaweb/packer/jar/attach

1 file changed

+11
-1
lines changed

packer/src/main/java/com/reajason/javaweb/packer/jar/attach/Attacher.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,17 @@ public static void main(String[] args) throws Exception {
5757
Attacher.attach(args[0]);
5858
} catch (Exception e) {
5959
if (!e.getMessage().equals("0")) {
60-
throw e;
60+
Throwable cause = e.getCause();
61+
if (cause != null) {
62+
if (!cause.getMessage().equals("0")) {
63+
cause = e.getCause();
64+
if (cause != null) {
65+
if (!cause.getMessage().equals("0")) {
66+
throw e;
67+
}
68+
}
69+
}
70+
}
6171
}
6272
}
6373
System.out.println("ok");

0 commit comments

Comments
 (0)