On Sun, 28 Aug 2022 22:42:14 GMT, Chris Plummer <cjplum...@openjdk.org> wrote:

> If you are going to do that, then you should track down all uses of this code 
> (direct and indirect) to see if this error is ever acceptable and is handled 
> properly. It seems that if the unicode string is bad, we should be exiting. I 
> see this code being used indirectly from setAgentPropertyValue(), which only 
> seems to be used for sun.jdwp.listenerAddress. Do we want the raw unicode 
> bytes to be used in this case if they cannot be converted? It's also used 
> from printLastError(), which gets the unicode bytes from GetLastError(). 
> Should't they always be valid?

I agree it complicates things and it would require looking at all usages. My 
comment was just to say that if it is changed to emit a warning then it would 
only make sense to do so in limited cases (the NO_UNICODE_TRANSLATION mostly). 
It may be simpler to not change the code of course.

-------------

PR: https://git.openjdk.org/jdk/pull/9918

Reply via email to