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
commit a8e156d92612433be3ae300a83719355f459b67b Author: Gary David Gregory (Code signing key) <[email protected]> AuthorDate: Sat Jun 22 09:00:52 2024 -0400 Fix SpotBugs RV_RETURN_VALUE_IGNORED_BAD_PRACTICE in JasminVisitor --- src/changes/changes.xml | 1 + src/examples/JasminVisitor.java | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/changes/changes.xml b/src/changes/changes.xml index f6498fc3..fb77982b 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -64,6 +64,7 @@ The <action> type attribute can be add,update,fix,remove. <action type="update" dev="ggregory" due-to="Gary Gregory">Fix PMD UnnecessaryFullyQualifiedName.</action> <action type="update" dev="ggregory" due-to="Gary Gregory">Fix PMD EmptyCatchBlock by allowing commented blocks.</action> <action type="update" dev="ggregory" due-to="Gary Gregory">Fix PMD EmptyControlStatement by allowing commented blocks.</action> + <action type="update" dev="ggregory" due-to="Gary Gregory">Fix SpotBugs RV_RETURN_VALUE_IGNORED_BAD_PRACTICE in JasminVisitor.</action> <!-- ADD --> <action type="update" dev="ggregory" due-to="nbauma109, Gary Gregory, Mark Roberts">Add accessors to model and unit tests, Javadoc #183.</action> <!-- UPDATE --> diff --git a/src/examples/JasminVisitor.java b/src/examples/JasminVisitor.java index 16ef15c5..eafc548b 100644 --- a/src/examples/JasminVisitor.java +++ b/src/examples/JasminVisitor.java @@ -73,8 +73,10 @@ public class JasminVisitor extends org.apache.bcel.classfile.EmptyVisitor { className = className.substring(index + 1); if (!path.isEmpty()) { - final File f = new File(path); - f.mkdirs(); + final File file = new File(path); + if (!file.mkdirs()) { + System.err.println("Couldn't create directories for " + file); + } } final String name = path + className + ".j";
