Summary
Add constructor which can be specified both the exception message and caused Throwable into com.sun.tools.attach.AttachNotSupportedException.
Problem
JDK-8373867 improves the logic to find tmp directory used for attach mechanism. It needs to fallback to find /tmp on the system even if the exception is thrown when Attach API attempt to access /proc/<PID>/root due to lack of permission. If fallback code failed with exception (e.g. lack of permission), it should be reported with root cause.
For such situation, Exception has a constructor with exception message and the cause, but it is not implemented in AttachNotSupportedException.
Solution
Add new constructor to com.sun.tools.attach.AttachNotSupportedException to specify root cause.
Specification
/**
* Constructs an <code>AttachNotSupportedException</code> with
* the specified cause.
*
* @param message the detail message.
* @param cause the cause of this exception.
*/
public AttachNotSupportedException(String message, Throwable cause)
- csr of
-
JDK-8373867 Improve robustness of Attach API for finding tmp directory
-
- Resolved
-