From b715358717e5f590831b38c0a9b5db57231603d1 Mon Sep 17 00:00:00 2001 From: Rafael Winterhalter Date: Thu, 26 Sep 2024 22:39:22 +0200 Subject: [PATCH] Add null check. --- byte-buddy-dep/src/main/java/net/bytebuddy/build/Plugin.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/byte-buddy-dep/src/main/java/net/bytebuddy/build/Plugin.java b/byte-buddy-dep/src/main/java/net/bytebuddy/build/Plugin.java index 9deaadf5ce..21d31311d1 100644 --- a/byte-buddy-dep/src/main/java/net/bytebuddy/build/Plugin.java +++ b/byte-buddy-dep/src/main/java/net/bytebuddy/build/Plugin.java @@ -3348,7 +3348,10 @@ protected MultiReleaseVersionMatcher(ClassFileVersion classFileVersion) { /** * {@inheritDoc} */ - public boolean matches(@NeverNull Element target) { + public boolean matches(@MaybeNull Element target) { + if (target == null) { + return true; + } String name = target.getName(); if (name.startsWith("/")) { name = name.substring(1);