From 2062aa247f0ff8aff95fadcd45686df90189621e Mon Sep 17 00:00:00 2001 From: Rafael Winterhalter Date: Wed, 25 Sep 2024 01:44:27 +0200 Subject: [PATCH] Add suppressed warning for empty array. --- .../src/main/java/net/bytebuddy/dynamic/ClassFileLocator.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/byte-buddy-dep/src/main/java/net/bytebuddy/dynamic/ClassFileLocator.java b/byte-buddy-dep/src/main/java/net/bytebuddy/dynamic/ClassFileLocator.java index dac8b28bae..43cf89cd5a 100644 --- a/byte-buddy-dep/src/main/java/net/bytebuddy/dynamic/ClassFileLocator.java +++ b/byte-buddy-dep/src/main/java/net/bytebuddy/dynamic/ClassFileLocator.java @@ -987,6 +987,7 @@ public static ClassFileLocator ofRuntimeJar() throws IOException { * {@inheritDoc} */ @MaybeNull + @SuppressFBWarnings(value = "PZLA_PREFER_ZERO_LENGTH_ARRAYS", justification = "Null value indicates failed lookup.") protected byte[] doLocate(String path) throws IOException { ZipEntry zipEntry = jarFile.getEntry(path); if (zipEntry == null) { @@ -1286,6 +1287,7 @@ public static ClassFileLocator of(File folder, ClassFileVersion classFileVersion * {@inheritDoc} */ @MaybeNull + @SuppressFBWarnings(value = "PZLA_PREFER_ZERO_LENGTH_ARRAYS", justification = "Null value indicates failed lookup.") protected byte[] doLocate(String path) throws IOException { File file = new File(folder, path); if (file.exists()) {