You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2019/09/16 18:04:42 UTC

[commons-bcel] 02/02: Fix checkstyle violations WRT parens.

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 41a541a0cf01ef51c118cfde7dca2b48ef31645d
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Mon Sep 16 14:04:11 2019 -0400

    Fix checkstyle violations WRT parens.
---
 src/main/java/org/apache/bcel/classfile/Module.java         | 2 +-
 src/main/java/org/apache/bcel/classfile/ModuleRequires.java | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/bcel/classfile/Module.java b/src/main/java/org/apache/bcel/classfile/Module.java
index a0a9d62..024f876 100644
--- a/src/main/java/org/apache/bcel/classfile/Module.java
+++ b/src/main/java/org/apache/bcel/classfile/Module.java
@@ -191,7 +191,7 @@ public final class Module extends Attribute {
         buf.append("Module:\n");
         buf.append("  name:    ") .append(cp.getConstantString(module_name_index, Const.CONSTANT_Module).replace('/', '.')).append("\n");
         buf.append("  flags:   ") .append(String.format("%04x", module_flags)).append("\n");
-        final String version = (module_version_index == 0 ? "0" : cp.getConstantString(module_version_index, Const.CONSTANT_Utf8));
+        final String version = module_version_index == 0 ? "0" : cp.getConstantString(module_version_index, Const.CONSTANT_Utf8);
         buf.append("  version: ") .append(version).append("\n");
 
         buf.append("  requires(").append(requires_table.length).append("):\n");
diff --git a/src/main/java/org/apache/bcel/classfile/ModuleRequires.java b/src/main/java/org/apache/bcel/classfile/ModuleRequires.java
index 136a227..2d5d80b 100644
--- a/src/main/java/org/apache/bcel/classfile/ModuleRequires.java
+++ b/src/main/java/org/apache/bcel/classfile/ModuleRequires.java
@@ -94,7 +94,7 @@ public final class ModuleRequires implements Cloneable, Node {
         final String module_name = constant_pool.constantToString(requires_index, Const.CONSTANT_Module);
         buf.append(Utility.compactClassName(module_name, false));
         buf.append(", ").append(String.format("%04x", requires_flags));
-        final String version = (requires_version_index == 0 ? "0" : constant_pool.getConstantString(requires_version_index, Const.CONSTANT_Utf8));
+        final String version = requires_version_index == 0 ? "0" : constant_pool.getConstantString(requires_version_index, Const.CONSTANT_Utf8);
         buf.append(", ").append(version);
         return buf.toString();
     }