This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-bcel.git
The following commit(s) were added to refs/heads/master by this push: new 3b615d54 Use ternary expression 3b615d54 is described below commit 3b615d54df8ae4151628c0a00477c7f6a7b6c0ec Author: Gary David Gregory (Code signing key) <ggreg...@apache.org> AuthorDate: Tue Nov 15 09:35:39 2022 -0500 Use ternary expression Resolves a SpotBugs issue --- src/main/java/org/apache/bcel/Repository.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/main/java/org/apache/bcel/Repository.java b/src/main/java/org/apache/bcel/Repository.java index 4d1d5480..79f8d298 100644 --- a/src/main/java/org/apache/bcel/Repository.java +++ b/src/main/java/org/apache/bcel/Repository.java @@ -186,10 +186,7 @@ public abstract class Repository { */ public static ClassPath.ClassFile lookupClassFile(final String className) { try (ClassPath path = repository.getClassPath()) { - if (path == null) { - return null; - } - return path.getClassFile(className); + return path == null ? null : path.getClassFile(className); } catch (final IOException e) { return null; }