Skip to content

Commit

Permalink
Close socket on error and add missing argument.
Browse files Browse the repository at this point in the history
  • Loading branch information
raphw committed Jun 17, 2020
1 parent c259f6e commit 15bb3eb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1730,6 +1730,7 @@ public static VirtualMachine attach(String processId, int timeout, Dispatcher di
if (answer.contains(' ' + key + ' ')) {
return new ForOpenJ9(socket);
} else {
socket.close();
throw new IllegalStateException("Unexpected answered to attachment: " + answer);
}
} finally {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ public static WithImplicitTarget bootstrap(MethodDescription.InDefinedShape boot
arguments.add(Type.getType(((TypeDescription) constant).getDescriptor()));
types.add(TypeDescription.CLASS);
} else {
arguments.add(constant);
TypeDescription typeDescription = TypeDescription.ForLoadedType.of(constant.getClass()).asUnboxed();
types.add(typeDescription);
if (JavaType.METHOD_TYPE.isInstance(constant) || JavaType.METHOD_HANDLE.isInstance(constant)) {
Expand Down

0 comments on commit 15bb3eb

Please sign in to comment.