SonarCloud Java analyzer: AssertionError in CodeStream.arraylength on full PR scan since ~2026-07-09

ALM: GitHub
CI: GitHub Actions
Scanner: sonarqube-scan-action@v8.1.0 / sonar-scanner-cli 8.1.0.6389
Language: Java (multi-module Gradle project, ~5k files)

Problem

Since approximately 2026-07-09, the SonarCloud Java analyzer crashes on PR/feature branch builds with exit code 3. Base branch scans (main, release/*) pass without issue.

Signature:

Load sensor cache (404) → full analysis of all ~5k files
java.lang.AssertionError: Unexpected non-array type
  at org.eclipse.jdt.internal.compiler.codegen.CodeStream.arraylength
sonar-scanner-cli 8.1.0.6389 → exit code 3

Root cause (as we understand it)

On SonarCloud, PR branches never persist their own sensor cache — they read the target branch cache. A server-side analyzer update around 2026-07-09 invalidated that cache, forcing a full re-scan of all files. The ECJ codegen bug is then triggered on pre-existing code (not introduced by any PR diff), but only surfaces when the full scan runs. Base branches pass because their cache is warm.

Reference

This appears related to the analogous ECJ issue reported for SonarQube Server LTA 2025.1: Update for ECJ required: “array store with invalid types”

Question

Is this a known regression in the SonarJava analyzer shipped around 2026-07-09? Is there a fix in progress, or is there a workaround on the scanner side (e.g. sonar.java.skipUnchanged=true) that would avoid the full ECJ scan on PR branches until a server-side fix is deployed?

Hey @qa-joerg, would you be able to share debug-level logs from the scanner?

So far I can’t tell if sonar.java.skipUnchanged=true would help or not, but perhaps you could give it a try and let me know?

I’m also thinking that perhaps the crash is not related to the incremental analysis mechanism, but instead, it could be related to a file that is only present in the branch/PR but not in the main branch. Could you try running with sonar.java.fileByFile=true to isolate the file causing the crash?