On Wed, 3 Feb 2021 12:21:30 GMT, Claes Redestad <redes...@openjdk.org> wrote:

> This patch moves some sanity checking done in ClassLoader.java to the 
> corresponding endpoints in native or VM code.

I'm unsure the benefit of moving the check done by `checkName` to the VM but 
`preDefineClass` still calls `checkName`.   The overhead of `checkName` should 
be fairly negligible?

src/java.base/share/native/libjava/ClassLoader.c line 291:

> 289:     }
> 290:     // disallow slashes in input, change '.' to '/'
> 291:     if (verifyFixClassname(clname)) {

perhaps we should replace all use of `fixClassname` with `verifyFixClassname` 
and remove `fixClassname`.

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

PR: https://git.openjdk.java.net/jdk/pull/2378

Reply via email to