RFR: 8039173 Propagate errors from Diagnostic Commands as exceptions in the attach framework

Ivan Gerasimov ivan.gerasimov at oracle.com
Fri Apr 4 09:18:45 UTC 2014


Hi Staffan!

I think there is a couple of minor bugs in getErrorMessage(InputStream 
sis, int maxlen).

1) If maxlen is exactly the size of the message to read, the function 
will add an ellipsis, even though the message isn't truncated,
2) If maxlen is greater than needed, then sis.read(b, off, len) at the 
line #271 will eventually return -1, and it will cause the message to 
lose its last character.

Sincerely yours,
Ivan



More information about the serviceability-dev mailing list