Skip to content

Commit

Permalink
Ban more class loading primitives
Browse files Browse the repository at this point in the history
No new violations are found after TGP.

PiperOrigin-RevId: 653356443
  • Loading branch information
java-team-github-bot authored and Error Prone Team committed Jul 22, 2024
1 parent 62c454e commit afe3944
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ public final class BanClassLoader extends AbstractBanUnsafeAPIChecker
private static final Matcher<MethodInvocationTree> METHOD_MATCHER =
anyOf(
anyMethod().onDescendantOf("java.lang.ClassLoader").named("defineClass"),
anyMethod().onDescendantOf("jdk.internal.misc.Unsafe").named("defineClass"),
anyMethod().onDescendantOf("jdk.internal.access.JavaLangAccess").named("defineClass"),
anyMethod().onDescendantOf("java.lang.invoke.MethodHandles.Lookup").named("defineClass"),
anyMethod()
.onDescendantOf("java.rmi.server.RMIClassLoader")
Expand Down

0 comments on commit afe3944

Please sign in to comment.