Skip to content

Fix issues reported by Errorprone static analysis tool - #12419

Merged
DaanHoogland merged 35 commits into
4.20from
ghi11438-errorprone-fixes
Sep 2, 2026
Merged

DaanHoogland merged 35 commits into
4.20from
ghi11438-errorprone-fixes

log warning as opposed to throwing exception

276916a
Select commit
Loading
Failed to load commit list.
This check has been archived and is scheduled for deletion. Learn more about checks retention
SonarQubeCloud / SonarCloud Code Analysis failed Mar 10, 2026 in 9m 32s

Quality Gate failed

Annotations

Check warning on line 284 in plugins/hypervisors/hyperv/src/test/java/com/cloud/hypervisor/hyperv/test/HypervDirectConnectResourceTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Either add an explanation about why this test is skipped or remove the "@Ignore" annotation.

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZu9pydrtO4BVYOIsYtk&open=AZu9pydrtO4BVYOIsYtk&pullRequest=12419

Check warning on line 163 in plugins/user-authenticators/ldap/src/test/java/org/apache/cloudstack/ldap/LdapDirectoryServerConnectionTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Either add an explanation about why this test is skipped or remove the "@Ignore" annotation.

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZu9pyhptO4BVYOIsYto&open=AZu9pyhptO4BVYOIsYto&pullRequest=12419

Check failure on line 617 in server/src/main/java/org/apache/cloudstack/region/gslb/GlobalLoadBalancingRulesServiceImpl.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_cloudstack&issues=AZwpi7ILZEm6eBsZcT4k&open=AZwpi7ILZEm6eBsZcT4k&pullRequest=12419

Check warning on line 63 in engine/orchestration/src/test/java/com/cloud/agent/manager/ConnectedAgentAttacheTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove the declaration of thrown exception 'java.lang.Exception', as it cannot be thrown from method's body.

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZwpi62dZEm6eBsZcT4j&open=AZwpi62dZEm6eBsZcT4j&pullRequest=12419

Check warning on line 300 in plugins/hypervisors/vmware/src/test/java/com/cloud/hypervisor/vmware/VmwareDatacenterApiUnitTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Either add an explanation about why this test is skipped or remove the "@Ignore" annotation.

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZu9pyX9tO4BVYOIsYtf&open=AZu9pyX9tO4BVYOIsYtf&pullRequest=12419

Check warning on line 84 in plugins/network-elements/cisco-vnmc/src/test/java/com/cloud/network/resource/CiscoVnmcResourceTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Either add an explanation about why this test is skipped or remove the "@Ignore" annotation.

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZu9pygntO4BVYOIsYtl&open=AZu9pygntO4BVYOIsYtl&pullRequest=12419

Check warning on line 336 in engine/schema/src/main/java/com/cloud/upgrade/SystemVmTemplateRegistration.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Make this "public static hypervisorGuestOsMap" field final

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZu9pyODtO4BVYOIsYtT&open=AZu9pyODtO4BVYOIsYtT&pullRequest=12419

Check warning on line 47 in plugins/hypervisors/ovm3/src/test/java/com/cloud/hypervisor/ovm3/objects/NtpTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Either add an explanation about why this test is skipped or remove the "@Ignore" annotation.

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZu9pyXWtO4BVYOIsYtX&open=AZu9pyXWtO4BVYOIsYtX&pullRequest=12419

Check warning on line 145 in plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/storage/ScaleIOStoragePoolTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Either add an explanation about why this test is skipped or remove the "@Ignore" annotation.

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZu9pyc-tO4BVYOIsYti&open=AZu9pyc-tO4BVYOIsYti&pullRequest=12419

Check warning on line 259 in server/src/test/java/com/cloud/template/HypervisorTemplateAdapterTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Either add an explanation about why this test is skipped or remove the "@Ignore" annotation.

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZu9py0LtO4BVYOIsYtr&open=AZu9py0LtO4BVYOIsYtr&pullRequest=12419

Check warning on line 259 in server/src/test/java/com/cloud/template/TemplateManagerImplTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Either add an explanation about why this test is skipped or remove the "@Ignore" annotation.

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZu9py0ttO4BVYOIsYts&open=AZu9py0ttO4BVYOIsYts&pullRequest=12419

Check warning on line 395 in server/src/test/java/com/cloud/vm/UserVmManagerTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Either add an explanation about why this test is skipped or remove the "@Ignore" annotation.

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZu9pyzBtO4BVYOIsYtq&open=AZu9pyzBtO4BVYOIsYtq&pullRequest=12419

Check warning on line 128 in plugins/hypervisors/xenserver/src/test/java/com/cloud/hypervisor/xenserver/resource/CitrixResourceBaseTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Either add an explanation about why this test is skipped or remove the "@Ignore" annotation.

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZu9pyXKtO4BVYOIsYtW&open=AZu9pyXKtO4BVYOIsYtW&pullRequest=12419

Check warning on line 253 in plugins/hypervisors/hyperv/src/test/java/com/cloud/hypervisor/hyperv/test/HypervDirectConnectResourceTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Either add an explanation about why this test is skipped or remove the "@Ignore" annotation.

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZu9pydqtO4BVYOIsYtj&open=AZu9pydqtO4BVYOIsYtj&pullRequest=12419

Check warning on line 100 in engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade41500to41510.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZu9pyJetO4BVYOIsYtR&open=AZu9pyJetO4BVYOIsYtR&pullRequest=12419

Check warning on line 336 in engine/schema/src/main/java/com/cloud/upgrade/SystemVmTemplateRegistration.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Make this member "protected".

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZu9pyODtO4BVYOIsYtU&open=AZu9pyODtO4BVYOIsYtU&pullRequest=12419

Check warning on line 336 in engine/schema/src/main/java/com/cloud/upgrade/SystemVmTemplateRegistration.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Make hypervisorGuestOsMap a static final constant or non-public and provide accessors if needed.

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZu9pyODtO4BVYOIsYtS&open=AZu9pyODtO4BVYOIsYtS&pullRequest=12419

Check warning on line 5612 in plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResourceTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Either add an explanation about why this test is skipped or remove the "@Ignore" annotation.

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZu9pycltO4BVYOIsYtg&open=AZu9pycltO4BVYOIsYtg&pullRequest=12419

Check warning on line 92 in plugins/network-elements/cisco-vnmc/src/test/java/com/cloud/network/resource/CiscoVnmcResourceTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Either add an explanation about why this test is skipped or remove the "@Ignore" annotation.

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZu9pygntO4BVYOIsYtm&open=AZu9pygntO4BVYOIsYtm&pullRequest=12419

Check warning on line 141 in plugins/user-authenticators/ldap/src/test/java/org/apache/cloudstack/ldap/LdapDirectoryServerConnectionTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Either add an explanation about why this test is skipped or remove the "@Ignore" annotation.

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZu9pyhptO4BVYOIsYtn&open=AZu9pyhptO4BVYOIsYtn&pullRequest=12419

Check warning on line 353 in server/src/test/java/com/cloud/vm/UserVmManagerTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Either add an explanation about why this test is skipped or remove the "@Ignore" annotation.

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZu9pyzBtO4BVYOIsYtp&open=AZu9pyzBtO4BVYOIsYtp&pullRequest=12419

Check warning on line 117 in plugins/hypervisors/xenserver/src/test/java/com/cloud/hypervisor/xenserver/resource/CitrixResourceBaseTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Either add an explanation about why this test is skipped or remove the "@Ignore" annotation.

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZu9pyXKtO4BVYOIsYtV&open=AZu9pyXKtO4BVYOIsYtV&pullRequest=12419

Check warning on line 5698 in plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResourceTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Either add an explanation about why this test is skipped or remove the "@Ignore" annotation.

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZu9pycltO4BVYOIsYth&open=AZu9pycltO4BVYOIsYth&pullRequest=12419

Check warning on line 269 in plugins/hypervisors/vmware/src/test/java/com/cloud/hypervisor/vmware/VmwareDatacenterApiUnitTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Either add an explanation about why this test is skipped or remove the "@Ignore" annotation.

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZu9pyX9tO4BVYOIsYta&open=AZu9pyX9tO4BVYOIsYta&pullRequest=12419