Hi Gary,

On 12/18/17 6:47 AM, Gary Adams wrote:
Here's a simple fix to correct the error message when the java_pid socket
is not found. The code previously reported the attach_pid file name
rather than the socket file name that was not found.

  Issue: https://bugs.openjdk.java.net/browse/JDK-8188856
  Webrev: http://cr.openjdk.java.net/~gadams/8188856/webrev.00/

I don't understand why you couldn't simply have changed the f.getPath() reference to "path". From what I can see, there is no difference between "path" and "socket_name". The problem you are fixing is that the error message prints f.getPath(), but that refers to the attach file and the error message should refer to the socket file. You've correct this, but have done so in a round about way. Above the error message (in two places) exists:

           path = findSocketFile(pid, ns_pid);

So "path" is what you want. You have indirectly fixed the problem by having findSocketFile() store the path in socket_name, and then you print socket_name, but why not just do the direct fix and print "path".

Also, the copyrights need to be updated.

thanks,

Chris


Reply via email to