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 2022/11/23 17:51:44 UTC

[commons-bcel] 03/05: Make org.apache.bcel.generic.ICONST.value final

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 3a67fafb3dd7cbb270db5538a108c23932d4d13e
Author: Gary David Gregory (Code signing key) <gg...@apache.org>
AuthorDate: Wed Nov 23 10:49:16 2022 -0500

    Make org.apache.bcel.generic.ICONST.value final
---
 src/main/java/org/apache/bcel/generic/ICONST.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/bcel/generic/ICONST.java b/src/main/java/org/apache/bcel/generic/ICONST.java
index d1b9ab72..009cc319 100644
--- a/src/main/java/org/apache/bcel/generic/ICONST.java
+++ b/src/main/java/org/apache/bcel/generic/ICONST.java
@@ -25,12 +25,13 @@ package org.apache.bcel.generic;
  */
 public class ICONST extends Instruction implements ConstantPushInstruction {
 
-    private int value;
+    private final int value;
 
     /**
      * Empty constructor needed for Instruction.readInstruction. Not to be used otherwise.
      */
     ICONST() {
+        this(0);
     }
 
     public ICONST(final int i) {