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 2026/01/12 22:29:16 UTC
(commons-bcel) 01/02: org.apache.bcel.classfile.ConstantPool.ConstantPool(Constant[]) now uses varagrs: ConstantPool(Constant...)
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 a081f602776fa7fc3d2134d14bf4b389975e6036
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Mon Jan 12 17:28:57 2026 -0500
org.apache.bcel.classfile.ConstantPool.ConstantPool(Constant[]) now uses
varagrs: ConstantPool(Constant...)
---
src/changes/changes.xml | 1 +
src/main/java/org/apache/bcel/classfile/ConstantPool.java | 2 +-
src/test/java/org/apache/bcel/classfile/StackMapTest.java | 2 +-
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 012930ef..465469da 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -74,6 +74,7 @@ The <action> type attribute can be add,update,fix,remove.
<action type="fix" dev="ggregory" due-to="Gary Gregory, Stanislav Fort">Code.Code(int, int, int, int, byte[], CodeException[], Attribute[], ConstantPool) now throws a ClassFormatException if the code array is greater than the JVM specification allows.</action>
<action type="fix" dev="ggregory" due-to="Gary Gregory">Code.setCode(byte[]) now throws a ClassFormatException if the code array is greater than the JVM specification allows.</action>
<action type="fix" dev="ggregory" due-to="Gary Gregory">ClassDumper.dump() should not call the input stream it didn't open; fixes IOException when calling DumpClass.main(ClassDumper.java:351).</action>
+ <action type="fix" dev="ggregory" due-to="Gary Gregory">org.apache.bcel.classfile.ConstantPool.ConstantPool(Constant[]) now uses varagrs: ConstantPool(Constant...).</action>
<!-- ADD -->
<action type="add" dev="ggregory" due-to="Gary Gregory">Add Const.MAJOR_26.</action>
<action type="add" dev="ggregory" due-to="Gary Gregory">Add Const.MINOR_26.</action>
diff --git a/src/main/java/org/apache/bcel/classfile/ConstantPool.java b/src/main/java/org/apache/bcel/classfile/ConstantPool.java
index fc13643b..440fd683 100644
--- a/src/main/java/org/apache/bcel/classfile/ConstantPool.java
+++ b/src/main/java/org/apache/bcel/classfile/ConstantPool.java
@@ -71,7 +71,7 @@ public class ConstantPool implements Cloneable, Node, Iterable<Constant> {
*
* @param constantPool Array of constants.
*/
- public ConstantPool(final Constant[] constantPool) {
+ public ConstantPool(final Constant... constantPool) {
setConstantPool(constantPool);
}
diff --git a/src/test/java/org/apache/bcel/classfile/StackMapTest.java b/src/test/java/org/apache/bcel/classfile/StackMapTest.java
index 78825445..03d0922a 100644
--- a/src/test/java/org/apache/bcel/classfile/StackMapTest.java
+++ b/src/test/java/org/apache/bcel/classfile/StackMapTest.java
@@ -30,7 +30,7 @@ class StackMapTest {
@Test
void testSetStackMap() {
- final StackMap stackMap = new StackMap(0, 0, StackMapEntry.EMPTY_ARRAY, new ConstantPool(new Constant[] { new ConstantLong(0) }));
+ final StackMap stackMap = new StackMap(0, 0, StackMapEntry.EMPTY_ARRAY, new ConstantPool(new ConstantLong(0)));
// No NPE
stackMap.setStackMap(null);
assertArrayEquals(StackMapEntry.EMPTY_ARRAY, stackMap.getStackMap());