Skip to content

GROOVY-12162: Harden and extend bytecode peephole optimization#2707

Merged
paulk-asert merged 3 commits into
masterfrom
GROOVY-12162
Jul 23, 2026
Merged

GROOVY-12162: Harden and extend bytecode peephole optimization#2707
paulk-asert merged 3 commits into
masterfrom
GROOVY-12162

rewrite box+mismatched unbox to primitive conversion

cc7a492
Select commit
Loading
Failed to load commit list.
SonarQubeCloud / SonarCloud Code Analysis succeeded Jul 19, 2026 in 2m 16s

Annotations

Check warning on line 357 in src/main/java/org/codehaus/groovy/classgen/AsmClassGenerator.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

A "Brain Method" was detected. Refactor it to reduce at least one of the following metrics: LOC from 104 to 64, Complexity from 20 to 14, Nesting Level from 4 to 2, Number of Variables from 20 to 6.

See more on https://sonarcloud.io/project/issues?id=apache_groovy&issues=AZ9wyLB0qTBLjhhDAyR0&open=AZ9wyLB0qTBLjhhDAyR0&pullRequest=2707

Check failure on line 1318 in src/main/java/org/codehaus/groovy/classgen/asm/PeepholeOptimizingMethodVisitor.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this method to reduce its Cognitive Complexity from 17 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=apache_groovy&issues=AZ9wyK9TqTBLjhhDAyRz&open=AZ9wyK9TqTBLjhhDAyRz&pullRequest=2707

Check warning on line 1985 in src/main/java/org/codehaus/groovy/classgen/AsmClassGenerator.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

A "Brain Method" was detected. Refactor it to reduce at least one of the following metrics: LOC from 106 to 64, Complexity from 19 to 14, Nesting Level from 3 to 2, Number of Variables from 14 to 6.

See more on https://sonarcloud.io/project/issues?id=apache_groovy&issues=AZ9wyLB0qTBLjhhDAyR2&open=AZ9wyLB0qTBLjhhDAyR2&pullRequest=2707

Check failure on line 1163 in src/main/java/org/codehaus/groovy/classgen/asm/PeepholeOptimizingMethodVisitor.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use already-defined constant 'BOOLEAN_OWNER' instead of duplicating its value here.

See more on https://sonarcloud.io/project/issues?id=apache_groovy&issues=AZ948jGBq4IVm24_KXKd&open=AZ948jGBq4IVm24_KXKd&pullRequest=2707

Check warning on line 622 in src/main/java/org/codehaus/groovy/classgen/AsmClassGenerator.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

A "Brain Method" was detected. Refactor it to reduce at least one of the following metrics: LOC from 79 to 64, Complexity from 21 to 14, Nesting Level from 3 to 2, Number of Variables from 19 to 6.

See more on https://sonarcloud.io/project/issues?id=apache_groovy&issues=AZ9wyLB0qTBLjhhDAyR1&open=AZ9wyLB0qTBLjhhDAyR1&pullRequest=2707

Check failure on line 1140 in src/main/java/org/codehaus/groovy/classgen/asm/PeepholeOptimizingMethodVisitor.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this method to reduce its Cognitive Complexity from 16 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=apache_groovy&issues=AZ948jGBq4IVm24_KXKe&open=AZ948jGBq4IVm24_KXKe&pullRequest=2707