Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package objectweb-asm for openSUSE:Factory checked in at 2026-05-20 15:23:29 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/objectweb-asm (Old) and /work/SRC/openSUSE:Factory/.objectweb-asm.new.1966 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "objectweb-asm" Wed May 20 15:23:29 2026 rev:33 rq:1353776 version:9.10 Changes: -------- --- /work/SRC/openSUSE:Factory/objectweb-asm/objectweb-asm.changes 2025-12-18 18:29:13.756012366 +0100 +++ /work/SRC/openSUSE:Factory/.objectweb-asm.new.1966/objectweb-asm.changes 2026-05-20 15:23:54.380620881 +0200 @@ -1,0 +2,9 @@ +Mon May 18 09:59:25 UTC 2026 - Fridrich Strba <[email protected]> + +- Upgrade to verision 9.10 + * new Opcodes.V27 constant for Java 27 + * bug fixes + + 318041: Compilation failure with JDK 5 + + 318043: TraceSignatureVisitor bug + +------------------------------------------------------------------- Old: ---- asm-9.9.1.pom asm-analysis-9.9.1.pom asm-commons-9.9.1.pom asm-test-9.9.1.pom asm-tree-9.9.1.pom asm-util-9.9.1.pom objectweb-asm-9.9.1.tar.xz New: ---- asm-9.10.pom asm-analysis-9.10.pom asm-commons-9.10.pom asm-test-9.10.pom asm-tree-9.10.pom asm-util-9.10.pom objectweb-asm-9.10.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ objectweb-asm.spec ++++++ --- /var/tmp/diff_new_pack.Qdz8s6/_old 2026-05-20 15:23:55.048648355 +0200 +++ /var/tmp/diff_new_pack.Qdz8s6/_new 2026-05-20 15:23:55.052648519 +0200 @@ -1,7 +1,7 @@ # # spec file for package objectweb-asm # -# Copyright (c) 2025 SUSE LLC and contributors +# Copyright (c) 2026 SUSE LLC and contributors # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,7 +18,7 @@ %define __requires_exclude java-headless Name: objectweb-asm -Version: 9.9.1 +Version: 9.10 Release: 0 Summary: Java bytecode manipulation framework License: BSD-3-Clause ++++++ _scmsync.obsinfo ++++++ --- /var/tmp/diff_new_pack.Qdz8s6/_old 2026-05-20 15:23:55.100650494 +0200 +++ /var/tmp/diff_new_pack.Qdz8s6/_new 2026-05-20 15:23:55.100650494 +0200 @@ -1,6 +1,6 @@ -mtime: 1765954581 -commit: 0249b8736efff672dcff76aa65d557e2c6dbfdf8601b52434115fa71f653f1a7 -url: https://src.opensuse.org/java-packages/objectweb-asm.git -revision: 0249b8736efff672dcff76aa65d557e2c6dbfdf8601b52434115fa71f653f1a7 +mtime: 1779098477 +commit: 6c547a9e1c0a4dbf3cb0ccff48d4eea03c41e1c2c58e867afa99410612f5117d +url: https://src.opensuse.org/java-packages/objectweb-asm +revision: 6c547a9e1c0a4dbf3cb0ccff48d4eea03c41e1c2c58e867afa99410612f5117d projectscmsync: https://src.opensuse.org/java-packages/_ObsPrj ++++++ _service ++++++ --- /var/tmp/diff_new_pack.Qdz8s6/_old 2026-05-20 15:23:55.124651481 +0200 +++ /var/tmp/diff_new_pack.Qdz8s6/_new 2026-05-20 15:23:55.132651810 +0200 @@ -2,11 +2,11 @@ <service name="tar_scm" mode="disabled"> <param name="scm">git</param> <param name="url">https://gitlab.ow2.org/asm/asm.git</param> - <param name="revision">ASM_9_9_1</param> + <param name="revision">ASM_9_10</param> <param name="match-tag">ASM_*</param> <param name="versionformat">@PARENT_TAG@</param> - <param name="versionrewrite-pattern">ASM_(\d+)_(\d+)_(\d+)</param> - <param name="versionrewrite-replacement">\1.\2.\3</param> + <param name="versionrewrite-pattern">ASM_(\d+)_(\d+)</param> + <param name="versionrewrite-replacement">\1.\2</param> <param name="exclude">**/*.jar</param> <param name="exclude">asm{,-analysis,-commons}/**/*.class</param> <param name="exclude">gradle</param> ++++++ asm-9.9.1.pom -> asm-9.10.pom ++++++ --- /work/SRC/openSUSE:Factory/objectweb-asm/asm-9.9.1.pom 2025-12-18 18:29:13.323994221 +0100 +++ /work/SRC/openSUSE:Factory/.objectweb-asm.new.1966/asm-9.10.pom 2026-05-20 15:23:53.532586003 +0200 @@ -3,7 +3,7 @@ <modelVersion>4.0.0</modelVersion> <groupId>org.ow2.asm</groupId> <artifactId>asm</artifactId> - <version>9.9.1</version> + <version>9.10</version> <name>asm</name> <description>ASM, a very small and fast Java bytecode manipulation framework</description> <url>http://asm.ow2.io/</url> ++++++ asm-analysis-9.9.1.pom -> asm-analysis-9.10.pom ++++++ --- /work/SRC/openSUSE:Factory/objectweb-asm/asm-analysis-9.9.1.pom 2025-12-18 18:29:13.339994894 +0100 +++ /work/SRC/openSUSE:Factory/.objectweb-asm.new.1966/asm-analysis-9.10.pom 2026-05-20 15:23:53.640590445 +0200 @@ -3,7 +3,7 @@ <modelVersion>4.0.0</modelVersion> <groupId>org.ow2.asm</groupId> <artifactId>asm-analysis</artifactId> - <version>9.9.1</version> + <version>9.10</version> <name>asm-analysis</name> <description>Static code analysis API of ASM, a very small and fast Java bytecode manipulation framework</description> <url>http://asm.ow2.io/</url> @@ -71,7 +71,7 @@ <dependency> <groupId>org.ow2.asm</groupId> <artifactId>asm-tree</artifactId> - <version>9.9.1</version> + <version>9.10</version> <scope>compile</scope> </dependency> </dependencies> ++++++ asm-commons-9.9.1.pom -> asm-commons-9.10.pom ++++++ --- /work/SRC/openSUSE:Factory/objectweb-asm/asm-commons-9.9.1.pom 2025-12-18 18:29:13.359995734 +0100 +++ /work/SRC/openSUSE:Factory/.objectweb-asm.new.1966/asm-commons-9.10.pom 2026-05-20 15:23:53.768595709 +0200 @@ -3,7 +3,7 @@ <modelVersion>4.0.0</modelVersion> <groupId>org.ow2.asm</groupId> <artifactId>asm-commons</artifactId> - <version>9.9.1</version> + <version>9.10</version> <name>asm-commons</name> <description>Usefull class adapters based on ASM, a very small and fast Java bytecode manipulation framework</description> <url>http://asm.ow2.io/</url> @@ -71,13 +71,13 @@ <dependency> <groupId>org.ow2.asm</groupId> <artifactId>asm</artifactId> - <version>9.9.1</version> + <version>9.10</version> <scope>compile</scope> </dependency> <dependency> <groupId>org.ow2.asm</groupId> <artifactId>asm-tree</artifactId> - <version>9.9.1</version> + <version>9.10</version> <scope>compile</scope> </dependency> </dependencies> ++++++ asm-test-9.9.1.pom -> asm-test-9.10.pom ++++++ --- /work/SRC/openSUSE:Factory/objectweb-asm/asm-test-9.9.1.pom 2025-12-18 18:29:13.371996238 +0100 +++ /work/SRC/openSUSE:Factory/.objectweb-asm.new.1966/asm-test-9.10.pom 2026-05-20 15:23:53.888600645 +0200 @@ -3,7 +3,7 @@ <modelVersion>4.0.0</modelVersion> <groupId>org.ow2.asm</groupId> <artifactId>asm-test</artifactId> - <version>9.9.1</version> + <version>9.10</version> <name>asm-test</name> <description>Utilities for testing ASM, a very small and fast Java bytecode manipulation framework</description> <url>http://asm.ow2.io/</url> ++++++ asm-tree-9.9.1.pom -> asm-tree-9.10.pom ++++++ --- /work/SRC/openSUSE:Factory/objectweb-asm/asm-tree-9.9.1.pom 2025-12-18 18:29:13.399997413 +0100 +++ /work/SRC/openSUSE:Factory/.objectweb-asm.new.1966/asm-tree-9.10.pom 2026-05-20 15:23:54.024606238 +0200 @@ -3,7 +3,7 @@ <modelVersion>4.0.0</modelVersion> <groupId>org.ow2.asm</groupId> <artifactId>asm-tree</artifactId> - <version>9.9.1</version> + <version>9.10</version> <name>asm-tree</name> <description>Tree API of ASM, a very small and fast Java bytecode manipulation framework</description> <url>http://asm.ow2.io/</url> @@ -71,7 +71,7 @@ <dependency> <groupId>org.ow2.asm</groupId> <artifactId>asm</artifactId> - <version>9.9.1</version> + <version>9.10</version> <scope>compile</scope> </dependency> </dependencies> ++++++ asm-util-9.9.1.pom -> asm-util-9.10.pom ++++++ --- /work/SRC/openSUSE:Factory/objectweb-asm/asm-util-9.9.1.pom 2025-12-18 18:29:13.411997917 +0100 +++ /work/SRC/openSUSE:Factory/.objectweb-asm.new.1966/asm-util-9.10.pom 2026-05-20 15:23:54.116610023 +0200 @@ -3,7 +3,7 @@ <modelVersion>4.0.0</modelVersion> <groupId>org.ow2.asm</groupId> <artifactId>asm-util</artifactId> - <version>9.9.1</version> + <version>9.10</version> <name>asm-util</name> <description>Utilities for ASM, a very small and fast Java bytecode manipulation framework</description> <url>http://asm.ow2.io/</url> @@ -71,19 +71,19 @@ <dependency> <groupId>org.ow2.asm</groupId> <artifactId>asm</artifactId> - <version>9.9.1</version> + <version>9.10</version> <scope>compile</scope> </dependency> <dependency> <groupId>org.ow2.asm</groupId> <artifactId>asm-tree</artifactId> - <version>9.9.1</version> + <version>9.10</version> <scope>compile</scope> </dependency> <dependency> <groupId>org.ow2.asm</groupId> <artifactId>asm-analysis</artifactId> - <version>9.9.1</version> + <version>9.10</version> <scope>compile</scope> </dependency> </dependencies> ++++++ build.specials.obscpio ++++++ ++++++ build.specials.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/.gitignore new/.gitignore --- old/.gitignore 1970-01-01 01:00:00.000000000 +0100 +++ new/.gitignore 2026-05-18 12:01:17.000000000 +0200 @@ -0,0 +1 @@ +.osc ++++++ objectweb-asm-9.9.1.tar.xz -> objectweb-asm-9.10.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/objectweb-asm-9.9.1/.gitlab-ci.yml new/objectweb-asm-9.10/.gitlab-ci.yml --- old/objectweb-asm-9.9.1/.gitlab-ci.yml 2025-12-06 16:06:06.000000000 +0100 +++ new/objectweb-asm-9.10/.gitlab-ci.yml 2026-03-07 18:24:14.000000000 +0100 @@ -1,4 +1,4 @@ -image: gradle:8.3-jdk11 +image: gradle:9.3.0-jdk17 variables: # Set the location of the dependency cache to a local directory, so that it @@ -17,7 +17,8 @@ script: - $GRADLE build artifacts: - untracked: true + paths: + - '**/build/' expire_in: 1 hour test-job: @@ -25,7 +26,8 @@ script: - $GRADLE --info test jacocoTestCoverageVerification jacocoTestReport artifacts: - untracked: true + paths: + - '**/build/' expire_in: 1 hour deploy-job: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/objectweb-asm-9.9.1/asm/src/main/java/org/objectweb/asm/ClassReader.java new/objectweb-asm-9.10/asm/src/main/java/org/objectweb/asm/ClassReader.java --- old/objectweb-asm-9.9.1/asm/src/main/java/org/objectweb/asm/ClassReader.java 2025-12-06 16:06:06.000000000 +0100 +++ new/objectweb-asm-9.10/asm/src/main/java/org/objectweb/asm/ClassReader.java 2026-03-07 18:24:14.000000000 +0100 @@ -195,7 +195,7 @@ this.b = classFileBuffer; // Check the class' major_version. This field is after the magic and minor_version fields, which // use 4 and 2 bytes respectively. - if (checkClassVersion && readShort(classFileOffset + 6) > Opcodes.V26) { + if (checkClassVersion && readShort(classFileOffset + 6) > Opcodes.V27) { throw new IllegalArgumentException( "Unsupported class file major version " + readShort(classFileOffset + 6)); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/objectweb-asm-9.9.1/asm/src/main/java/org/objectweb/asm/Frame.java new/objectweb-asm-9.10/asm/src/main/java/org/objectweb/asm/Frame.java --- old/objectweb-asm-9.9.1/asm/src/main/java/org/objectweb/asm/Frame.java 2025-12-06 16:06:06.000000000 +0100 +++ new/objectweb-asm-9.10/asm/src/main/java/org/objectweb/asm/Frame.java 2026-03-07 18:24:14.000000000 +0100 @@ -577,7 +577,8 @@ return outputStack[--outputStackTop]; } else { // If the output frame stack is empty, pop from the input stack. - return STACK_KIND | -(--outputStackStart); + --outputStackStart; + return STACK_KIND | -outputStackStart; } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/objectweb-asm-9.9.1/asm/src/main/java/org/objectweb/asm/Opcodes.java new/objectweb-asm-9.10/asm/src/main/java/org/objectweb/asm/Opcodes.java --- old/objectweb-asm-9.9.1/asm/src/main/java/org/objectweb/asm/Opcodes.java 2025-12-06 16:06:06.000000000 +0100 +++ new/objectweb-asm-9.10/asm/src/main/java/org/objectweb/asm/Opcodes.java 2026-03-07 18:24:14.000000000 +0100 @@ -293,6 +293,7 @@ int V24 = 0 << 16 | 68; int V25 = 0 << 16 | 69; int V26 = 0 << 16 | 70; + int V27 = 0 << 16 | 71; /** * Version flag indicating that the class is using 'preview' features. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/objectweb-asm-9.9.1/asm/src/main/java/org/objectweb/asm/signature/SignatureWriter.java new/objectweb-asm-9.10/asm/src/main/java/org/objectweb/asm/signature/SignatureWriter.java --- old/objectweb-asm-9.9.1/asm/src/main/java/org/objectweb/asm/signature/SignatureWriter.java 2025-12-06 16:06:06.000000000 +0100 +++ new/objectweb-asm-9.10/asm/src/main/java/org/objectweb/asm/signature/SignatureWriter.java 2026-03-07 18:24:14.000000000 +0100 @@ -89,8 +89,7 @@ hasFormals = true; stringBuilder.append('<'); } - stringBuilder.append(name); - stringBuilder.append(':'); + stringBuilder.append(name).append(':'); } @Override @@ -148,9 +147,7 @@ @Override public void visitTypeVariable(final String name) { - stringBuilder.append('T'); - stringBuilder.append(name); - stringBuilder.append(';'); + stringBuilder.append('T').append(name).append(';'); } @Override @@ -161,8 +158,7 @@ @Override public void visitClassType(final String name) { - stringBuilder.append('L'); - stringBuilder.append(name); + stringBuilder.append('L').append(name); // Pushes 'false' on the stack, meaning that this type does not have type arguments (as far as // we can tell at this point). argumentStack <<= 1; @@ -171,8 +167,7 @@ @Override public void visitInnerClassType(final String name) { endArguments(); - stringBuilder.append('.'); - stringBuilder.append(name); + stringBuilder.append('.').append(name); // Pushes 'false' on the stack, meaning that this type does not have type arguments (as far as // we can tell at this point). argumentStack <<= 1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/objectweb-asm-9.9.1/asm/src/test/java/org/objectweb/asm/ConstantsTest.java new/objectweb-asm-9.10/asm/src/test/java/org/objectweb/asm/ConstantsTest.java --- old/objectweb-asm-9.9.1/asm/src/test/java/org/objectweb/asm/ConstantsTest.java 2025-12-06 16:06:06.000000000 +0100 +++ new/objectweb-asm-9.10/asm/src/test/java/org/objectweb/asm/ConstantsTest.java 2026-03-07 18:24:14.000000000 +0100 @@ -259,6 +259,7 @@ case "V24": case "V25": case "V26": + case "V27": return ConstantType.CLASS_VERSION; case "ACC_PUBLIC": case "ACC_PRIVATE": diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/objectweb-asm-9.9.1/asm-analysis/src/main/java/org/objectweb/asm/tree/analysis/Analyzer.java new/objectweb-asm-9.10/asm-analysis/src/main/java/org/objectweb/asm/tree/analysis/Analyzer.java --- old/objectweb-asm-9.9.1/asm-analysis/src/main/java/org/objectweb/asm/tree/analysis/Analyzer.java 2025-12-06 16:06:06.000000000 +0100 +++ new/objectweb-asm-9.10/asm-analysis/src/main/java/org/objectweb/asm/tree/analysis/Analyzer.java 2026-03-07 18:24:14.000000000 +0100 @@ -119,15 +119,14 @@ // For each exception handler, and each instruction within its range, record in 'handlers' the // fact that execution can flow from this instruction to the exception handler. - for (int i = 0; i < method.tryCatchBlocks.size(); ++i) { - TryCatchBlockNode tryCatchBlock = method.tryCatchBlocks.get(i); + for (TryCatchBlockNode tryCatchBlock : method.tryCatchBlocks) { int startIndex = insnList.indexOf(tryCatchBlock.start); int endIndex = insnList.indexOf(tryCatchBlock.end); - for (int j = startIndex; j < endIndex; ++j) { - List<TryCatchBlockNode> insnHandlers = handlers[j]; + for (int i = startIndex; i < endIndex; ++i) { + List<TryCatchBlockNode> insnHandlers = handlers[i]; if (insnHandlers == null) { insnHandlers = new ArrayList<>(); - handlers[j] = insnHandlers; + handlers[i] = insnHandlers; } insnHandlers.add(tryCatchBlock); } @@ -197,8 +196,7 @@ currentFrame.initJumpTarget(insnOpcode, lookupSwitchInsn.dflt); merge(targetInsnIndex, currentFrame, subroutine); newControlFlowEdge(insnIndex, targetInsnIndex); - for (int i = 0; i < lookupSwitchInsn.labels.size(); ++i) { - LabelNode label = lookupSwitchInsn.labels.get(i); + for (LabelNode label : lookupSwitchInsn.labels) { targetInsnIndex = insnList.indexOf(label); currentFrame.initJumpTarget(insnOpcode, label); merge(targetInsnIndex, currentFrame, subroutine); @@ -210,8 +208,7 @@ currentFrame.initJumpTarget(insnOpcode, tableSwitchInsn.dflt); merge(targetInsnIndex, currentFrame, subroutine); newControlFlowEdge(insnIndex, targetInsnIndex); - for (int i = 0; i < tableSwitchInsn.labels.size(); ++i) { - LabelNode label = tableSwitchInsn.labels.get(i); + for (LabelNode label : tableSwitchInsn.labels) { currentFrame.initJumpTarget(insnOpcode, label); targetInsnIndex = insnList.indexOf(label); merge(targetInsnIndex, currentFrame, subroutine); @@ -221,8 +218,7 @@ if (subroutine == null) { throw new AnalyzerException(insnNode, "RET instruction outside of a subroutine"); } - for (int i = 0; i < subroutine.callers.size(); ++i) { - JumpInsnNode caller = subroutine.callers.get(i); + for (JumpInsnNode caller : subroutine.callers) { int jsrInsnIndex = insnList.indexOf(caller); if (frames[jsrInsnIndex] != null) { merge( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/objectweb-asm-9.9.1/asm-analysis/src/main/java/org/objectweb/asm/tree/analysis/Subroutine.java new/objectweb-asm-9.10/asm-analysis/src/main/java/org/objectweb/asm/tree/analysis/Subroutine.java --- old/objectweb-asm-9.9.1/asm-analysis/src/main/java/org/objectweb/asm/tree/analysis/Subroutine.java 2025-12-06 16:06:06.000000000 +0100 +++ new/objectweb-asm-9.10/asm-analysis/src/main/java/org/objectweb/asm/tree/analysis/Subroutine.java 2026-03-07 18:24:14.000000000 +0100 @@ -93,8 +93,7 @@ } } if (subroutine.start == start) { - for (int i = 0; i < subroutine.callers.size(); ++i) { - JumpInsnNode caller = subroutine.callers.get(i); + for (JumpInsnNode caller : subroutine.callers) { if (!callers.contains(caller)) { callers.add(caller); changed = true; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/objectweb-asm-9.9.1/asm-analysis/src/main/java/org/objectweb/asm/tree/analysis/Value.java new/objectweb-asm-9.10/asm-analysis/src/main/java/org/objectweb/asm/tree/analysis/Value.java --- old/objectweb-asm-9.9.1/asm-analysis/src/main/java/org/objectweb/asm/tree/analysis/Value.java 2025-12-06 16:06:06.000000000 +0100 +++ new/objectweb-asm-9.10/asm-analysis/src/main/java/org/objectweb/asm/tree/analysis/Value.java 2026-03-07 18:24:14.000000000 +0100 @@ -32,6 +32,7 @@ * * @author Eric Bruneton */ +@FunctionalInterface public interface Value { /** diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/objectweb-asm-9.9.1/asm-commons/src/test/java/org/objectweb/asm/commons/LambdaRemapTest.java new/objectweb-asm-9.10/asm-commons/src/test/java/org/objectweb/asm/commons/LambdaRemapTest.java --- old/objectweb-asm-9.9.1/asm-commons/src/test/java/org/objectweb/asm/commons/LambdaRemapTest.java 2025-12-06 16:06:06.000000000 +0100 +++ new/objectweb-asm-9.10/asm-commons/src/test/java/org/objectweb/asm/commons/LambdaRemapTest.java 2026-03-07 18:24:14.000000000 +0100 @@ -63,11 +63,9 @@ "metafactory", LAMBDA_FACTORY_METAFACTORY, false), - new Object[] { - Type.getType("()V"), - new Handle(Opcodes.H_INVOKESTATIC, "java/lang/Thread", "dumpStack", "()V", false), - Type.getType("()V") - }); + Type.getType("()V"), + new Handle(Opcodes.H_INVOKESTATIC, "java/lang/Thread", "dumpStack", "()V", false), + Type.getType("()V")); } void func_serializableLambda(final MethodVisitor methodVisitor) { @@ -80,13 +78,11 @@ "altMetafactory", LAMBDA_FACTORY_ALTMETAFACTORY, false), - new Object[] { - Type.getType("()V"), - new Handle(Opcodes.H_INVOKESTATIC, "java/lang/Thread", "dumpStack", "()V", false), - Type.getType("()V"), - Integer.valueOf(5), - Integer.valueOf(0) - }); + Type.getType("()V"), + new Handle(Opcodes.H_INVOKESTATIC, "java/lang/Thread", "dumpStack", "()V", false), + Type.getType("()V"), + Integer.valueOf(5), + Integer.valueOf(0)); } void func_advancedLambda(final MethodVisitor methodVisitor) { @@ -99,15 +95,13 @@ "altMetafactory", LAMBDA_FACTORY_ALTMETAFACTORY, false), - new Object[] { - Type.getType("()V"), - new Handle(Opcodes.H_INVOKESTATIC, "java/lang/Thread", "dumpStack", "()V", false), - Type.getType("()V"), - Integer.valueOf(7), - Integer.valueOf(1), - Type.getType("Lpkg/LambdaTest$TestInterface;"), - Integer.valueOf(0) - }); + Type.getType("()V"), + new Handle(Opcodes.H_INVOKESTATIC, "java/lang/Thread", "dumpStack", "()V", false), + Type.getType("()V"), + Integer.valueOf(7), + Integer.valueOf(1), + Type.getType("Lpkg/LambdaTest$TestInterface;"), + Integer.valueOf(0)); } public static Stream<Remapper> remappersLatest() { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/objectweb-asm-9.9.1/asm-commons/src/test/java/org/objectweb/asm/commons/MethodNodeBuilder.java new/objectweb-asm-9.10/asm-commons/src/test/java/org/objectweb/asm/commons/MethodNodeBuilder.java --- old/objectweb-asm-9.9.1/asm-commons/src/test/java/org/objectweb/asm/commons/MethodNodeBuilder.java 2025-12-06 16:06:06.000000000 +0100 +++ new/objectweb-asm-9.10/asm-commons/src/test/java/org/objectweb/asm/commons/MethodNodeBuilder.java 2026-03-07 18:24:14.000000000 +0100 @@ -191,7 +191,7 @@ MethodNodeBuilder switchto( final Label defaultLabel, final int key, final Label target, final boolean useTableSwitch) { if (useTableSwitch) { - methodNode.visitTableSwitchInsn(key, key, defaultLabel, new Label[] {target}); + methodNode.visitTableSwitchInsn(key, key, defaultLabel, target); } else { methodNode.visitLookupSwitchInsn(defaultLabel, new int[] {key}, new Label[] {target}); } @@ -200,7 +200,7 @@ MethodNodeBuilder switchto(final Label label0, final Label label1, final boolean useTableSwitch) { if (useTableSwitch) { - methodNode.visitTableSwitchInsn(0, 1, label0, new Label[] {label0, label1}); + methodNode.visitTableSwitchInsn(0, 1, label0, label0, label1); } else { methodNode.visitLookupSwitchInsn(label0, new int[] {1}, new Label[] {label1}); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/objectweb-asm-9.9.1/asm-test/src/main/java/org/objectweb/asm/test/ClassFile.java new/objectweb-asm-9.10/asm-test/src/main/java/org/objectweb/asm/test/ClassFile.java --- old/objectweb-asm-9.9.1/asm-test/src/main/java/org/objectweb/asm/test/ClassFile.java 2025-12-06 16:06:06.000000000 +0100 +++ new/objectweb-asm-9.10/asm-test/src/main/java/org/objectweb/asm/test/ClassFile.java 2026-03-07 18:24:14.000000000 +0100 @@ -2356,11 +2356,13 @@ } /** A context to lookup constant pool items from their index. */ + @FunctionalInterface private interface ClassContext { <C extends CpInfo> C getCpInfo(int cpIndex, Class<C> cpInfoType); } /** A context to lookup instruction indices from their bytecode offset. */ + @FunctionalInterface private interface MethodContext { int getInsnIndex(int bytecodeOffset); } @@ -2526,6 +2528,7 @@ * @param opcode a bytecode instruction opcode. * @param arguments the bytecode instruction arguments. */ + @SuppressWarnings("PMD.UseArraysAsList") // false positive void addInsn(final int insnIndex, final int opcode, final Object... arguments) { children.add(insnIndex); children.add(": "); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/objectweb-asm-9.9.1/asm-test/src/main/java/org/objectweb/asm/test/Util.java new/objectweb-asm-9.10/asm-test/src/main/java/org/objectweb/asm/test/Util.java --- old/objectweb-asm-9.9.1/asm-test/src/main/java/org/objectweb/asm/test/Util.java 2025-12-06 16:06:06.000000000 +0100 +++ new/objectweb-asm-9.10/asm-test/src/main/java/org/objectweb/asm/test/Util.java 2026-03-07 18:24:14.000000000 +0100 @@ -26,6 +26,7 @@ return Integer.parseInt(javaMajorVersionText); } + @SuppressWarnings("PMD.PreserveStackTrace") static boolean previewFeatureEnabled() { try { Class<?> managementFactoryClass = Class.forName("java.lang.management.ManagementFactory"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/objectweb-asm-9.9.1/asm-test/src/test/java/org/objectweb/asm/test/ClassFileTest.java new/objectweb-asm-9.10/asm-test/src/test/java/org/objectweb/asm/test/ClassFileTest.java --- old/objectweb-asm-9.9.1/asm-test/src/test/java/org/objectweb/asm/test/ClassFileTest.java 2025-12-06 16:06:06.000000000 +0100 +++ new/objectweb-asm-9.10/asm-test/src/test/java/org/objectweb/asm/test/ClassFileTest.java 2026-03-07 18:24:14.000000000 +0100 @@ -62,6 +62,7 @@ */ @ParameterizedTest @EnumSource(InvalidClass.class) + @SuppressWarnings("PMD.ExhaustiveSwitchHasDefault") // Checkstyle complains if default is missing! void testStaticNewInstance_invalidClass(final InvalidClass invalidClass) { String className = invalidClass.toString(); byte[] classContent = invalidClass.getBytes(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/objectweb-asm-9.9.1/asm-tree/src/main/java/org/objectweb/asm/tree/InsnList.java new/objectweb-asm-9.10/asm-tree/src/main/java/org/objectweb/asm/tree/InsnList.java --- old/objectweb-asm-9.9.1/asm-tree/src/main/java/org/objectweb/asm/tree/InsnList.java 2025-12-06 16:06:06.000000000 +0100 +++ new/objectweb-asm-9.10/asm-tree/src/main/java/org/objectweb/asm/tree/InsnList.java 2026-03-07 18:24:14.000000000 +0100 @@ -226,7 +226,6 @@ ++size; if (lastInsn == null) { firstInsn = insnNode; - lastInsn = insnNode; } else { lastInsn.nextInsn = insnNode; insnNode.previousInsn = lastInsn; @@ -268,7 +267,6 @@ public void insert(final AbstractInsnNode insnNode) { ++size; if (firstInsn == null) { - firstInsn = insnNode; lastInsn = insnNode; } else { firstInsn.previousInsn = insnNode; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/objectweb-asm-9.9.1/asm-util/src/main/java/org/objectweb/asm/util/ASMifier.java new/objectweb-asm-9.10/asm-util/src/main/java/org/objectweb/asm/util/ASMifier.java --- old/objectweb-asm-9.9.1/asm-util/src/main/java/org/objectweb/asm/util/ASMifier.java 2025-12-06 16:06:06.000000000 +0100 +++ new/objectweb-asm-9.10/asm-util/src/main/java/org/objectweb/asm/util/ASMifier.java 2026-03-07 18:24:14.000000000 +0100 @@ -116,6 +116,7 @@ classVersions.put(Opcodes.V24, "V24"); classVersions.put(Opcodes.V25, "V25"); classVersions.put(Opcodes.V26, "V26"); + classVersions.put(Opcodes.V27, "V27"); CLASS_VERSIONS = Collections.unmodifiableMap(classVersions); } @@ -273,8 +274,7 @@ @Override public Printer visitModule(final String name, final int flags, final String version) { stringBuilder.setLength(0); - stringBuilder.append("{\n"); - stringBuilder.append("ModuleVisitor moduleVisitor = classWriter.visitModule("); + stringBuilder.append("{\nModuleVisitor moduleVisitor = classWriter.visitModule("); appendConstant(name); stringBuilder.append(", "); appendAccessFlags(flags | ACCESS_MODULE); @@ -364,8 +364,7 @@ public ASMifier visitRecordComponent( final String name, final String descriptor, final String signature) { stringBuilder.setLength(0); - stringBuilder.append("{\n"); - stringBuilder.append("recordComponentVisitor = classWriter.visitRecordComponent("); + stringBuilder.append("{\nrecordComponentVisitor = classWriter.visitRecordComponent("); appendConstant(name); stringBuilder.append(", "); appendConstant(descriptor); @@ -387,8 +386,7 @@ final String signature, final Object value) { stringBuilder.setLength(0); - stringBuilder.append("{\n"); - stringBuilder.append("fieldVisitor = classWriter.visitField("); + stringBuilder.append("{\nfieldVisitor = classWriter.visitField("); appendAccessFlags(access | ACCESS_FIELD); stringBuilder.append(", "); appendConstant(name); @@ -414,8 +412,7 @@ final String signature, final String[] exceptions) { stringBuilder.setLength(0); - stringBuilder.append("{\n"); - stringBuilder.append("methodVisitor = classWriter.visitMethod("); + stringBuilder.append("{\nmethodVisitor = classWriter.visitMethod("); appendAccessFlags(access); stringBuilder.append(", "); appendConstant(name); @@ -575,11 +572,11 @@ public ASMifier visitAnnotation(final String name, final String descriptor) { stringBuilder.setLength(0); stringBuilder - .append("{\n") - .append("AnnotationVisitor annotationVisitor") + .append("{\nAnnotationVisitor annotationVisitor") .append(id + 1) - .append(" = annotationVisitor"); - stringBuilder.append(id).append(".visitAnnotation("); + .append(" = annotationVisitor") + .append(id) + .append(".visitAnnotation("); appendConstant(name); stringBuilder.append(", "); appendConstant(descriptor); @@ -594,12 +591,12 @@ @Override public ASMifier visitArray(final String name) { stringBuilder.setLength(0); - stringBuilder.append("{\n"); stringBuilder - .append("AnnotationVisitor annotationVisitor") + .append("{\nAnnotationVisitor annotationVisitor") .append(id + 1) - .append(" = annotationVisitor"); - stringBuilder.append(id).append(".visitArray("); + .append(" = annotationVisitor") + .append(id) + .append(".visitArray("); appendConstant(name); stringBuilder.append(");\n"); text.add(stringBuilder.toString()); @@ -887,9 +884,7 @@ appendConstant(name); stringBuilder.append(", "); appendConstant(descriptor); - stringBuilder.append(", "); - stringBuilder.append(isInterface ? "true" : "false"); - stringBuilder.append(");\n"); + stringBuilder.append(", ").append(isInterface ? "true" : "false").append(");\n"); text.add(stringBuilder.toString()); } @@ -1244,8 +1239,7 @@ } stringBuilder.append("{\n"); ((ASMifierSupport) attribute).asmify(stringBuilder, "attribute", labelNames); - stringBuilder.append(name).append(".visitAttribute(attribute);\n"); - stringBuilder.append("}\n"); + stringBuilder.append(name).append(".visitAttribute(attribute);\n}\n"); } text.add(stringBuilder.toString()); } @@ -1449,22 +1443,30 @@ } else if (value instanceof String) { appendString(stringBuilder, (String) value); } else if (value instanceof Type) { - stringBuilder.append("Type.getType(\""); - stringBuilder.append(((Type) value).getDescriptor()); - stringBuilder.append("\")"); + stringBuilder.append("Type.getType(\"").append(((Type) value).getDescriptor()).append("\")"); } else if (value instanceof Handle) { stringBuilder.append("new Handle("); Handle handle = (Handle) value; - stringBuilder.append("Opcodes.").append(HANDLE_TAG[handle.getTag()]).append(", \""); - stringBuilder.append(handle.getOwner()).append(COMMA); - stringBuilder.append(handle.getName()).append(COMMA); - stringBuilder.append(handle.getDesc()).append("\", "); - stringBuilder.append(handle.isInterface()).append(')'); + stringBuilder + .append("Opcodes.") + .append(HANDLE_TAG[handle.getTag()]) + .append(", \"") + .append(handle.getOwner()) + .append(COMMA) + .append(handle.getName()) + .append(COMMA) + .append(handle.getDesc()) + .append("\", ") + .append(handle.isInterface()) + .append(')'); } else if (value instanceof ConstantDynamic) { stringBuilder.append("new ConstantDynamic(\""); ConstantDynamic constantDynamic = (ConstantDynamic) value; - stringBuilder.append(constantDynamic.getName()).append(COMMA); - stringBuilder.append(constantDynamic.getDescriptor()).append("\", "); + stringBuilder + .append(constantDynamic.getName()) + .append(COMMA) + .append(constantDynamic.getDescriptor()) + .append("\", "); appendConstant(constantDynamic.getBootstrapMethod()); stringBuilder.append(NEW_OBJECT_ARRAY); int bootstrapMethodArgumentCount = constantDynamic.getBootstrapMethodArgumentCount(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/objectweb-asm-9.9.1/asm-util/src/main/java/org/objectweb/asm/util/ASMifierSupport.java new/objectweb-asm-9.10/asm-util/src/main/java/org/objectweb/asm/util/ASMifierSupport.java --- old/objectweb-asm-9.9.1/asm-util/src/main/java/org/objectweb/asm/util/ASMifierSupport.java 2025-12-06 16:06:06.000000000 +0100 +++ new/objectweb-asm-9.10/asm-util/src/main/java/org/objectweb/asm/util/ASMifierSupport.java 2026-03-07 18:24:14.000000000 +0100 @@ -30,6 +30,7 @@ * * @author Eugene Kuleshov */ +@FunctionalInterface // DontCheck(AbbreviationAsWordInName): can't be renamed (for backward binary compatibility). public interface ASMifierSupport { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/objectweb-asm-9.9.1/asm-util/src/main/java/org/objectweb/asm/util/CheckFrameAnalyzer.java new/objectweb-asm-9.10/asm-util/src/main/java/org/objectweb/asm/util/CheckFrameAnalyzer.java --- old/objectweb-asm-9.9.1/asm-util/src/main/java/org/objectweb/asm/util/CheckFrameAnalyzer.java 2025-12-06 16:06:06.000000000 +0100 +++ new/objectweb-asm-9.10/asm-util/src/main/java/org/objectweb/asm/util/CheckFrameAnalyzer.java 2026-03-07 18:24:14.000000000 +0100 @@ -158,8 +158,7 @@ LookupSwitchInsnNode lookupSwitchInsn = (LookupSwitchInsnNode) insnNode; int targetInsnIndex = insnList.indexOf(lookupSwitchInsn.dflt); checkFrame(targetInsnIndex, currentFrame, /* requireFrame= */ true); - for (int i = 0; i < lookupSwitchInsn.labels.size(); ++i) { - LabelNode label = lookupSwitchInsn.labels.get(i); + for (LabelNode label : lookupSwitchInsn.labels) { targetInsnIndex = insnList.indexOf(label); currentFrame.initJumpTarget(insnOpcode, label); checkFrame(targetInsnIndex, currentFrame, /* requireFrame= */ true); @@ -171,8 +170,7 @@ currentFrame.initJumpTarget(insnOpcode, tableSwitchInsn.dflt); checkFrame(targetInsnIndex, currentFrame, /* requireFrame= */ true); newControlFlowEdge(insnIndex, targetInsnIndex); - for (int i = 0; i < tableSwitchInsn.labels.size(); ++i) { - LabelNode label = tableSwitchInsn.labels.get(i); + for (LabelNode label : tableSwitchInsn.labels) { currentFrame.initJumpTarget(insnOpcode, label); targetInsnIndex = insnList.indexOf(label); checkFrame(targetInsnIndex, currentFrame, /* requireFrame= */ true); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/objectweb-asm-9.9.1/asm-util/src/main/java/org/objectweb/asm/util/Textifier.java new/objectweb-asm-9.10/asm-util/src/main/java/org/objectweb/asm/util/Textifier.java --- old/objectweb-asm-9.9.1/asm-util/src/main/java/org/objectweb/asm/util/Textifier.java 2025-12-06 16:06:06.000000000 +0100 +++ new/objectweb-asm-9.10/asm-util/src/main/java/org/objectweb/asm/util/Textifier.java 2026-03-07 18:24:14.000000000 +0100 @@ -350,9 +350,7 @@ stringBuilder.append(tab); appendDescriptor(FIELD_DESCRIPTOR, descriptor); - stringBuilder.append(' ').append(name); - - stringBuilder.append('\n'); + stringBuilder.append(' ').append(name).append('\n'); text.add(stringBuilder.toString()); return addNewTextifier(null); } @@ -500,8 +498,7 @@ private void visitExportOrOpen( final String method, final String packaze, final int access, final String... modules) { stringBuilder.setLength(0); - stringBuilder.append(tab).append(method); - stringBuilder.append(packaze); + stringBuilder.append(tab).append(method).append(packaze); if (modules != null && modules.length > 0) { stringBuilder.append(" to"); } else { @@ -510,8 +507,10 @@ appendRawAccess(access); if (modules != null && modules.length > 0) { for (int i = 0; i < modules.length; ++i) { - stringBuilder.append(tab2).append(modules[i]); - stringBuilder.append(i != modules.length - 1 ? ",\n" : ";\n"); + stringBuilder + .append(tab2) + .append(modules[i]) + .append(i != modules.length - 1 ? ",\n" : ";\n"); } } text.add(stringBuilder.toString()); @@ -791,9 +790,11 @@ @Override public Textifier visitAnnotableParameterCount(final int parameterCount, final boolean visible) { stringBuilder.setLength(0); - stringBuilder.append(tab2).append("// annotable parameter count: "); - stringBuilder.append(parameterCount); - stringBuilder.append(visible ? " (visible)\n" : " (invisible)\n"); + stringBuilder + .append(tab2) + .append("// annotable parameter count: ") + .append(parameterCount) + .append(visible ? " (visible)\n" : " (invisible)\n"); text.add(stringBuilder.toString()); return this; } @@ -833,8 +834,7 @@ final int numStack, final Object[] stack) { stringBuilder.setLength(0); - stringBuilder.append(ltab); - stringBuilder.append("FRAME "); + stringBuilder.append(ltab).append("FRAME "); switch (type) { case Opcodes.F_NEW: case Opcodes.F_FULL: @@ -939,17 +939,13 @@ final Handle bootstrapMethodHandle, final Object... bootstrapMethodArguments) { stringBuilder.setLength(0); - stringBuilder.append(tab2).append("INVOKEDYNAMIC").append(' '); - stringBuilder.append(name); + stringBuilder.append(tab2).append("INVOKEDYNAMIC").append(' ').append(name); appendDescriptor(METHOD_DESCRIPTOR, descriptor); - stringBuilder.append(" ["); - stringBuilder.append('\n'); - stringBuilder.append(tab3); + stringBuilder.append(" [").append('\n').append(tab3); appendHandle(bootstrapMethodHandle, tab3); stringBuilder.append('\n').append(tab3); appendBoostrapMethodArgs(bootstrapMethodArguments, tab3); - stringBuilder.append('\n'); - stringBuilder.append(tab2).append("]\n"); + stringBuilder.append('\n').append(tab2).append("]\n"); text.add(stringBuilder.toString()); } @@ -1075,8 +1071,7 @@ stringBuilder.setLength(0); stringBuilder.append(") : "); appendTypeReference(typeRef); - stringBuilder.append(", ").append(typePath); - stringBuilder.append(visible ? "\n" : INVISIBLE); + stringBuilder.append(", ").append(typePath).append(visible ? "\n" : INVISIBLE); return addNewTextifier(stringBuilder.toString()); } @@ -1204,8 +1199,7 @@ stringBuilder.setLength(0); stringBuilder.append(") : "); appendTypeReference(typeRef); - stringBuilder.append(", ").append(typePath); - stringBuilder.append(visible ? "\n" : INVISIBLE); + stringBuilder.append(", ").append(typePath).append(visible ? "\n" : INVISIBLE); return addNewTextifier(stringBuilder.toString()); } @@ -1324,8 +1318,9 @@ .append(condy.getName()) .append(" : ") .append(condy.getDescriptor()) - .append(" [\n"); - stringBuilder.append(condyIndent).append(tab); + .append(" [\n") + .append(condyIndent) + .append(tab); appendHandle(condy.getBootstrapMethod(), condyIndent + tab); stringBuilder.append('\n').append(condyIndent).append(tab); Object[] bsmArgs = new Object[condy.getBootstrapMethodArgumentCount()]; @@ -1414,11 +1409,9 @@ new SignatureReader(signature).accept(traceSignatureVisitor); stringBuilder.append("// declaration: "); if (traceSignatureVisitor.getReturnType() != null) { - stringBuilder.append(traceSignatureVisitor.getReturnType()); - stringBuilder.append(' '); + stringBuilder.append(traceSignatureVisitor.getReturnType()).append(' '); } - stringBuilder.append(name); - stringBuilder.append(traceSignatureVisitor.getDeclaration()); + stringBuilder.append(name).append(traceSignatureVisitor.getDeclaration()); if (traceSignatureVisitor.getExceptions() != null) { stringBuilder.append(" throws ").append(traceSignatureVisitor.getExceptions()); } @@ -1500,11 +1493,9 @@ default: throw new IllegalArgumentException(); } - stringBuilder.append('\n'); - stringBuilder.append(afterComment); + stringBuilder.append('\n').append(afterComment); appendDescriptor(INTERNAL_NAME, handle.getOwner()); - stringBuilder.append('.'); - stringBuilder.append(handle.getName()); + stringBuilder.append('.').append(handle.getName()); if (!isMethodHandle) { stringBuilder.append('('); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/objectweb-asm-9.9.1/asm-util/src/main/java/org/objectweb/asm/util/TextifierSupport.java new/objectweb-asm-9.10/asm-util/src/main/java/org/objectweb/asm/util/TextifierSupport.java --- old/objectweb-asm-9.9.1/asm-util/src/main/java/org/objectweb/asm/util/TextifierSupport.java 2025-12-06 16:06:06.000000000 +0100 +++ new/objectweb-asm-9.10/asm-util/src/main/java/org/objectweb/asm/util/TextifierSupport.java 2026-03-07 18:24:14.000000000 +0100 @@ -29,6 +29,7 @@ * * @author Eugene Kuleshov */ +@FunctionalInterface public interface TextifierSupport { /** diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/objectweb-asm-9.9.1/asm-util/src/main/java/org/objectweb/asm/util/TraceSignatureVisitor.java new/objectweb-asm-9.10/asm-util/src/main/java/org/objectweb/asm/util/TraceSignatureVisitor.java --- old/objectweb-asm-9.9.1/asm-util/src/main/java/org/objectweb/asm/util/TraceSignatureVisitor.java 2025-12-06 16:06:06.000000000 +0100 +++ new/objectweb-asm-9.10/asm-util/src/main/java/org/objectweb/asm/util/TraceSignatureVisitor.java 2026-03-07 18:24:14.000000000 +0100 @@ -27,6 +27,7 @@ // THE POSSIBILITY OF SUCH DAMAGE. package org.objectweb.asm.util; +import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.Map; @@ -86,19 +87,17 @@ /** Whether {@link #visitInterface} has been called. */ private boolean interfaceVisited; - /** - * The stack used to keep track of class types that have arguments. Each element of this stack is - * a boolean encoded in one bit. The top of the stack is the least significant bit. Pushing false - * = *2, pushing true = *2+1, popping = /2. - */ - private int argumentStack; + /** A delayed task to perform when a type or a list of type arguments has been visited. */ + static enum Task { + END_ARRAY_TYPE, + END_EMPTY_TYPE_ARGUMENTS, + END_NON_EMPTY_TYPE_ARGUMENTS, + } /** - * The stack used to keep track of array class types. Each element of this stack is a boolean - * encoded in one bit. The top of the stack is the lowest order bit. Pushing false = *2, pushing - * true = *2+1, popping = /2. + * A stack of pending tasks to perform when a type or a list of type arguments has been visited. */ - private int arrayStack; + private ArrayList<Task> pendingTasks = new ArrayList<>(); /** The separator to append before the next visited class or inner class type. */ private String separator = ""; @@ -130,7 +129,6 @@ @Override public SignatureVisitor visitClassBound() { separator = EXTENDS_SEPARATOR; - startType(); return this; } @@ -138,7 +136,6 @@ public SignatureVisitor visitInterfaceBound() { separator = interfaceBoundVisited ? COMMA_SEPARATOR : EXTENDS_SEPARATOR; interfaceBoundVisited = true; - startType(); return this; } @@ -146,7 +143,6 @@ public SignatureVisitor visitSuperclass() { endFormals(); separator = EXTENDS_SEPARATOR; - startType(); return this; } @@ -158,7 +154,6 @@ separator = isInterface ? EXTENDS_SEPARATOR : IMPLEMENTS_SEPARATOR; interfaceVisited = true; } - startType(); return this; } @@ -171,7 +166,6 @@ declaration.append('('); parameterTypeVisited = true; } - startType(); return this; } @@ -217,8 +211,7 @@ @Override public SignatureVisitor visitArrayType() { - startType(); - arrayStack |= 1; + pendingTasks.add(Task.END_ARRAY_TYPE); return this; } @@ -227,7 +220,10 @@ if ("java/lang/Object".equals(name)) { // 'Map<java.lang.Object,java.util.List>' or 'abstract public V get(Object key);' should have // Object 'but java.lang.String extends java.lang.Object' is unnecessary. - boolean needObjectClass = argumentStack % 2 != 0 || parameterTypeVisited; + boolean needObjectClass = + (!pendingTasks.isEmpty() + && pendingTasks.get(pendingTasks.size() - 1) == Task.END_NON_EMPTY_TYPE_ARGUMENTS) + || parameterTypeVisited; if (needObjectClass) { declaration.append(separator).append(name.replace('/', '.')); } @@ -235,25 +231,22 @@ declaration.append(separator).append(name.replace('/', '.')); } separator = ""; - argumentStack *= 2; + pendingTasks.add(Task.END_EMPTY_TYPE_ARGUMENTS); } @Override public void visitInnerClassType(final String name) { - if (argumentStack % 2 != 0) { - declaration.append('>'); - } - argumentStack /= 2; - declaration.append('.'); - declaration.append(separator).append(name.replace('/', '.')); + endTypeArguments(); + declaration.append('.').append(separator).append(name.replace('/', '.')); + pendingTasks.add(Task.END_EMPTY_TYPE_ARGUMENTS); separator = ""; - argumentStack *= 2; } @Override public void visitTypeArgument() { - if (argumentStack % 2 == 0) { - ++argumentStack; + int lastTaskIndex = pendingTasks.size() - 1; + if (pendingTasks.get(lastTaskIndex) == Task.END_EMPTY_TYPE_ARGUMENTS) { + pendingTasks.set(lastTaskIndex, Task.END_NON_EMPTY_TYPE_ARGUMENTS); declaration.append('<'); } else { declaration.append(COMMA_SEPARATOR); @@ -263,29 +256,24 @@ @Override public SignatureVisitor visitTypeArgument(final char tag) { - if (argumentStack % 2 == 0) { - ++argumentStack; + int lastTaskIndex = pendingTasks.size() - 1; + if (pendingTasks.get(lastTaskIndex) == Task.END_EMPTY_TYPE_ARGUMENTS) { + pendingTasks.set(lastTaskIndex, Task.END_NON_EMPTY_TYPE_ARGUMENTS); declaration.append('<'); } else { declaration.append(COMMA_SEPARATOR); } - if (tag == EXTENDS) { declaration.append("? extends "); } else if (tag == SUPER) { declaration.append("? super "); } - - startType(); return this; } @Override public void visitEnd() { - if (argumentStack % 2 != 0) { - declaration.append('>'); - } - argumentStack /= 2; + endTypeArguments(); endType(); } @@ -327,18 +315,17 @@ } } - private void startType() { - arrayStack *= 2; + private void endTypeArguments() { + if (pendingTasks.remove(pendingTasks.size() - 1) == Task.END_NON_EMPTY_TYPE_ARGUMENTS) { + declaration.append('>'); + } } private void endType() { - if (arrayStack % 2 == 0) { - arrayStack /= 2; - } else { - while (arrayStack % 2 != 0) { - arrayStack /= 2; - declaration.append("[]"); - } + int numTasks = pendingTasks.size(); + while (numTasks > 0 && pendingTasks.get(--numTasks) == Task.END_ARRAY_TYPE) { + declaration.append("[]"); + pendingTasks.remove(numTasks); } } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/objectweb-asm-9.9.1/asm-util/src/test/java/org/objectweb/asm/util/TraceSignatureVisitorTest.java new/objectweb-asm-9.10/asm-util/src/test/java/org/objectweb/asm/util/TraceSignatureVisitorTest.java --- old/objectweb-asm-9.9.1/asm-util/src/test/java/org/objectweb/asm/util/TraceSignatureVisitorTest.java 2025-12-06 16:06:06.000000000 +0100 +++ new/objectweb-asm-9.10/asm-util/src/test/java/org/objectweb/asm/util/TraceSignatureVisitorTest.java 2026-03-07 18:24:14.000000000 +0100 @@ -88,7 +88,8 @@ { "java.util.Hashtable<java.lang.Object, java.lang.String>", "Ljava/util/Hashtable<Ljava/lang/Object;Ljava/lang/String;>;" - } + }, + {"java.util.List<java.lang.Boolean[]>[][][]", "[[[Ljava/util/List<[Ljava/lang/Boolean;>;"} }; private static final String[][] METHOD_SIGNATURES = { @@ -119,6 +120,10 @@ { "java.util.Map<java.lang.Object, java.lang.String><E, T extends java.lang.Comparable<E>>(java.lang.Object, java.util.Map<java.lang.Object, java.lang.String>, T)", "<E:Ljava/lang/Object;T::Ljava/lang/Comparable<TE;>;>(Ljava/lang/Object;Ljava/util/Map<Ljava/lang/Object;Ljava/lang/String;>;TT;)Ljava/util/Map<Ljava/lang/Object;Ljava/lang/String;>;" + }, + { + "(java.util.Map<java.util.Map<java.lang.String, ? extends java.util.List<? super java.lang.Runnable>>, java.util.List<java.lang.Boolean[]>[]>)", + "(Ljava/util/Map<Ljava/util/Map<Ljava/lang/String;+Ljava/util/List<-Ljava/lang/Runnable;>;>;[Ljava/util/List<[Ljava/lang/Boolean;>;>;)Ljava/lang/Object;" } }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/objectweb-asm-9.9.1/benchmarks/src/jmh/java/org/objectweb/asm/benchmarks/AbstractBenchmark.java new/objectweb-asm-9.10/benchmarks/src/jmh/java/org/objectweb/asm/benchmarks/AbstractBenchmark.java --- old/objectweb-asm-9.9.1/benchmarks/src/jmh/java/org/objectweb/asm/benchmarks/AbstractBenchmark.java 2025-12-06 16:06:06.000000000 +0100 +++ new/objectweb-asm-9.10/benchmarks/src/jmh/java/org/objectweb/asm/benchmarks/AbstractBenchmark.java 2026-03-07 18:24:14.000000000 +0100 @@ -81,6 +81,7 @@ ArrayList<byte[]> java8classFiles; /** The ASM versions that can be benchmarked. */ + @SuppressWarnings("PMD.ExhaustiveSwitchHasDefault") // Checkstyle complains if default is missing! public enum AsmVersion { V4_0, V5_0, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/objectweb-asm-9.9.1/build.gradle new/objectweb-asm-9.10/build.gradle --- old/objectweb-asm-9.9.1/build.gradle 2025-12-06 16:06:06.000000000 +0100 +++ new/objectweb-asm-9.10/build.gradle 2026-03-07 18:24:14.000000000 +0100 @@ -47,8 +47,8 @@ allprojects { group = 'org.ow2.asm' - version = '9.9.1' + (rootProject.hasProperty('release') ? '' : '-SNAPSHOT') - ext.osgi_version_upper_bound = '9.10' + version = '9.10' + (rootProject.hasProperty('release') ? '' : '-SNAPSHOT') + ext.osgi_version_upper_bound = '9.11' } subprojects { @@ -223,8 +223,8 @@ tasks.withType(AbstractArchiveTask).configureEach { preserveFileTimestamps = false reproducibleFileOrder = true - dirMode = 0775 - fileMode = 0664 + dirPermissions { unix("0755") } + filePermissions { unix("0664") } } } @@ -233,7 +233,7 @@ // and packaged with generated module-info classes. configure(subprojects.findAll{it.provides}) { // Code coverage configuration. - jacoco.toolVersion = '0.8.12' + jacoco.toolVersion = '0.8.14' jacocoTestReport { reports { xml.required = true } classDirectories.setFrom(sourceSets.main.output.classesDirs) @@ -253,9 +253,9 @@ // Retrofit the code in-place to Java 1.5 and generate a module-info class // from the code content, in compileJava.doLast. if (name != 'asm-test') { + def path = project(':tools:retrofitter').sourceSets.main.runtimeClasspath compileJava.dependsOn ':tools:retrofitter:classes' compileJava.doLast { - def path = project(':tools:retrofitter').sourceSets.main.runtimeClasspath def loader = new URLClassLoader(path.collect {f -> f.toURL()} as URL[]) def retrofitter = loader.loadClass('org.objectweb.asm.tools.Retrofitter').newInstance() @@ -269,6 +269,7 @@ // Create one backward compatibility checking task for each 'sigtest-*' file // in test/resources, and make the 'check' task depend on all these tasks. if (file('src/test/resources/').exists()) { + def jdk8ApiJarPath = project(':tools').file('jdk8-api.jar').path file('src/test/resources/').eachFileMatch(~/sigtest-.*/) { f -> task "${f.name}"(dependsOn: 'classes') { inputs.files(f, sourceSets.main.java) @@ -277,7 +278,7 @@ def sigtest = new com.sun.tdk.signaturetest.SignatureTest() def args = ['-ApiVersion', version, '-Backward', '-Static', '-Mode', 'bin', '-FileName', f, '-Classpath', - project(':tools').file('jdk8-api.jar').path + File.pathSeparator + + jdk8ApiJarPath + File.pathSeparator + sourceSets.main.output.classesDirs.asPath, '-Package'] + provides outputs.getFiles()[0].withPrintWriter { printWriter -> sigtest.run(args as String[], printWriter, null) @@ -294,7 +295,7 @@ doLast { def setup = new com.sun.tdk.signaturetest.Setup() def args = ['-ApiVersion', version, '-FileName', outputs.getFiles()[0], - '-Classpath', project(':tools').file('jdk8-api.jar').path + + '-Classpath', jdk8ApiJarPath + File.pathSeparator + sourceSets.main.output.classesDirs.asPath + File.pathSeparator + sourceSets.main.compileClasspath.asPath, '-Package'] + provides @@ -381,15 +382,15 @@ name = 'nexus' url = rootProject.hasProperty('release') ? releasesUrl : snapshotsUrl credentials { - username System.env.NEXUS_USER_NAME - password System.env.NEXUS_PASSWORD + username = System.env.NEXUS_USER_NAME + password = System.env.NEXUS_PASSWORD } } } publications { maven(MavenPublication) { def isRoot = project == rootProject - artifactId (isRoot ? 'asm-bom' : project.name) + artifactId = (isRoot ? 'asm-bom' : project.name) from (isRoot ? components.javaPlatform : components.java) pom.withXml { def parent = asNode().appendNode('parent') @@ -460,7 +461,7 @@ } } signing { - required rootProject.hasProperty('release') + required = rootProject.hasProperty('release') sign publishing.publications.maven } tasks.withType(GenerateModuleMetadata) { enabled = false } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/objectweb-asm-9.9.1/tools/pmd.xml new/objectweb-asm-9.10/tools/pmd.xml --- old/objectweb-asm-9.9.1/tools/pmd.xml 2025-12-06 16:06:06.000000000 +0100 +++ new/objectweb-asm-9.10/tools/pmd.xml 2026-03-07 18:24:14.000000000 +0100 @@ -20,17 +20,11 @@ <exclude name="CheckResultSet" /> <!-- Already covered with Checkstyle 'InterfaceIsType' rule. --> <exclude name="ConstantsInInterface" /> - <!-- Already covered with Checkstyle 'DefaultComesLast' rule. --> - <exclude name="DefaultLabelNotLastInSwitchStmt" /> - <!-- Not relevant for ASM (no logging and using JUnit 5). --> + <!-- Not relevant for ASM (no logging). --> <exclude name="GuardLogStatement" /> - <exclude name="JUnit4SuitesShouldUseSuiteAnnotation" /> - <exclude name="JUnit4TestShouldUseAfterAnnotation" /> - <exclude name="JUnit4TestShouldUseBeforeAnnotation" /> - <exclude name="JUnit4TestShouldUseTestAnnotation" /> <!-- Would give too verbose code. --> - <exclude name="JUnitAssertionsShouldIncludeMessage" /> - <exclude name="JUnitTestContainsTooManyAsserts" /> + <exclude name="UnitTestAssertionsShouldIncludeMessage" /> + <exclude name="UnitTestContainsTooManyAsserts" /> <!-- Not relevant for ASM (using JUnit 5). --> <exclude name="JUnitUseExpected" /> <!-- Already covered with Checkstyle 'IllegalType' rule. --> @@ -40,24 +34,20 @@ <!-- Actually not a best practice. --> <exclude name="LiteralsFirstInComparisons" /> <!-- Already covered with Checkstyle 'MissingSwitchDefault' rule. --> - <exclude name="SwitchStmtsShouldHaveDefault" /> <!-- Already covered with google-java-format. --> - <exclude name="UnusedImports" /> <!-- Too many false positives. --> <exclude name="UseVarargs" /> </rule> <rule ref="category/java/bestpractices.xml/ArrayIsStoredDirectly"> <properties> <property name="violationSuppressXPath" - value="//MethodDeclaration[@Private='true' or - @PackagePrivate='true']" /> + value="//MethodDeclaration[@Visibility!='public']" /> </properties> </rule> <rule ref="category/java/bestpractices.xml/MethodReturnsInternalArray"> <properties> <property name="violationSuppressXPath" - value="//MethodDeclaration[@Private='true' or - @PackagePrivate='true']" /> + value="//MethodDeclaration[@Visibility!='public']" /> </properties> </rule> <rule ref="category/java/bestpractices.xml/ForLoopVariableCount"> @@ -77,8 +67,6 @@ <exclude name="AvoidLiteralsInIfCondition" /> <!-- Too many false positives. --> <exclude name="CompareObjectsWithEquals" /> - <!-- Does not work, too many false positives. --> - <exclude name="DataflowAnomalyAnalysis" /> <!-- Not relevant for ASM. --> <exclude name="DoNotHardCodeSDCard" /> <exclude name="DontImportSun" /> @@ -87,11 +75,6 @@ <exclude name="FinalizeOnlyCallsSuperFinalize" /> <exclude name="FinalizeOverloaded" /> <exclude name="FinalizeShouldBeProtected" /> - <!-- Not relevant for ASM (no logging and using JUnit 5). --> - <exclude name="JUnitSpelling" /> - <exclude name="JUnitStaticSuite" /> - <exclude name="LoggerIsNotStaticFinal" /> - <exclude name="MoreThanOneLogger" /> <!-- Needed to implement custom data structures such as linked lists. --> <exclude name="NullAssignment" /> <!-- Not relevant for ASM (no logging, no dates, no EJB). --> @@ -103,15 +86,13 @@ <rule ref="category/java/errorprone.xml/ReturnEmptyCollectionRatherThanNull"> <properties> <property name="violationSuppressXPath" - value="//MethodDeclaration[@Private='true']"/> + value="//MethodDeclaration[@Visibility!='public']"/> </properties> </rule> <rule ref="category/java/performance.xml"> <!-- Too many false positives. --> <exclude name="AvoidInstantiatingObjectsInLoops" /> - <!-- Shorts can be decrease memory use, without decreasing performance. --> - <exclude name="AvoidUsingShortType" /> <!-- Not relevant for ASM (no BigInteger). --> <exclude name="BigIntegerInstantiation" /> <!-- Does not work, too many false positives. --> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/objectweb-asm-9.9.1/tools/retrofitter/src/main/java/org/objectweb/asm/tools/Retrofitter.java new/objectweb-asm-9.10/tools/retrofitter/src/main/java/org/objectweb/asm/tools/Retrofitter.java --- old/objectweb-asm-9.9.1/tools/retrofitter/src/main/java/org/objectweb/asm/tools/Retrofitter.java 2025-12-06 16:06:06.000000000 +0100 +++ new/objectweb-asm-9.10/tools/retrofitter/src/main/java/org/objectweb/asm/tools/Retrofitter.java 2026-03-07 18:24:14.000000000 +0100 @@ -58,6 +58,7 @@ import java.util.Set; import java.util.stream.Stream; import java.util.zip.GZIPInputStream; +import org.objectweb.asm.AnnotationVisitor; import org.objectweb.asm.ClassReader; import org.objectweb.asm.ClassVisitor; import org.objectweb.asm.ClassWriter; @@ -476,6 +477,28 @@ api, super.visitMethod(access, name, descriptor, signature, exceptions)) { @Override + public AnnotationVisitor visitAnnotation(final String descriptor, final boolean visible) { + AnnotationVisitor av = super.visitAnnotation(descriptor, visible); + if (descriptor.equals("Ljava/lang/FunctionalInterface;")) { + return null; + } + if (!descriptor.equals("Ljava/lang/Deprecated;")) { + return av; + } + // We use @Deprecated(forRemoval = false) instead of a plain @Deprecated + // but forRemoval was introduced in Java 9, so we need to remove it + return new AnnotationVisitor(api, av) { + @Override + public void visit(final String name, final Object value) { + if (name.equals("forRemoval")) { + return; + } + super.visit(name, value); + } + }; + } + + @Override public void visitParameter(final String name, final int access) { // Javac 21 generates a Parameter attribute for the synthetic/mandated parameters. // Remove the Parameter attribute. @@ -685,6 +708,37 @@ super.visitMethod(access, name, descriptor, signature, exceptions); return new MethodVisitor(Opcodes.ASM4, methodVisitor) { @Override + public AnnotationVisitor visitAnnotation(final String descriptor, final boolean visible) { + var av = super.visitAnnotation(descriptor, visible); + if (descriptor.equals("Ljava/lang/FunctionalInterface;")) { + throw new IllegalArgumentException( + format( + "ERROR: @FunctionalInterface in %s %s is not available in JDK 1.5", + className, currentMethodName)); + } + if (!descriptor.equals("Ljava/lang/Deprecated;")) { + return av; + } + return new AnnotationVisitor(Opcodes.ASM4, av) { + @Override + public void visit(final String name, final Object value) { + throw new IllegalArgumentException( + format( + "ERROR: @Deprecated name %s in %s %s is not available in JDK 1.5", + name, className, currentMethodName)); + } + }; + } + + @Override + public void visitParameter(final String name, final int access) { + throw new IllegalArgumentException( + format( + "ERROR: parameter %s in %s %s is not available in JDK 1.5", + name, className, currentMethodName)); + } + + @Override public void visitFieldInsn( final int opcode, final String owner, final String name, final String descriptor) { check(owner, name); ++++++ objectweb-asm-build.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/common.xml new/common.xml --- old/common.xml 2025-12-17 07:27:25.549841437 +0100 +++ new/common.xml 2026-05-18 11:56:12.009405021 +0200 @@ -3,7 +3,7 @@ <project name="common" basedir="."> <property file="build.properties"/> - <property name="project.version" value="9.9.1"/> + <property name="project.version" value="9.10"/> <property name="project.groupId" value="org.ow2.asm"/> <property name="project.organization.name" value="OW2"/> @@ -14,6 +14,6 @@ <property name="compiler.source" value="1.${compiler.release}"/> <property name="compiler.target" value="${compiler.source}"/> - <property name="bundle.version" value="${project.version}"/> + <property name="bundle.version" value="${project.version}.0"/> </project>
