JDK-8188856: Incorrect file path in an exception message when .java_pid is not accessible on Unix
Daniel D. Daugherty
daniel.daugherty at oracle.com
Fri Dec 15 14:14:33 UTC 2017
On 12/15/17 9:05 AM, Gary Adams wrote:
> Looking into some minor bugs in the attach area for the next release.
>
> https://bugs.openjdk.java.net/browse/JDK-8188856
>
> Seems like a minor change to fix this error message that mentions the
> java_pid socket file,
> but then outputs the attach_pid file when the socket file is not
> created .
>
> What is the general preference for this type fix?
> - remove the reference to the "socket file" in the error message
> - construct the filename for the socket that was not found
Just an opinion...
Having the specific pathname for the <socket_file> that cannot be
found is a better diagnostic. Perhaps it's possible to refactor the
code that generates the <socket_file> path so that both sides can
share that function to generate the same name...
It might not be possible to do this sharing, e.g., one side might
be in Java and the other side might be in C... In that case, having
the same algorithm implemented in both places with comments to link
the two would be my next choice...
Of course, you have to balance this level of effort against other
things on your plate...
Dan
More information about the serviceability-dev
mailing list