On 25/08/2019 20:35, Claes Redestad wrote:

Both functions abort similarly if UTF-8 sequences can't be decoded.
The fix- version just gets rid of logic to check for slashes, which is redundant at all existing call sites except the Class.forName one.

The fact we return JNI_FALSE when verifyFixClassname fails is a bit odd: this means we'll go into verifyClassname, fail the same way, and still
throw a CNFE, just with a slightly different message.
What you have is okay, I was mostly interesting in seeing if we could rename verifyFixClassname to fixClassname that returns JNI_TRUE if it succeeds and JNI_FALSE if fails due to a slash. We can look at that another time, I don't want to delay this improvement.

-Alan

Reply via email to