--- a/src/jdk.attach/solaris/classes/sun/tools/attach/VirtualMachineImpl.java Thu Aug 22 10:43:25 2019 -0400
+++ b/src/jdk.attach/solaris/classes/sun/tools/attach/VirtualMachineImpl.java Thu Aug 22 10:40:34 2019 -0700
@@ -60,8 +60,11 @@
int pid;
try {
pid = Integer.parseInt(vmid);
+ if (pid < 1) {
+ throw new NumberFormatException();
+ }
} catch (NumberFormatException x) {
- throw new AttachNotSupportedException("Invalid process identifier");
+ throw new AttachNotSupportedException("Invalid process identifier: " + vmid);
}
// Opens the door file to the target VM. If the file is not