CLVM enhancements and fixes#12617
Quality Gate failed
Failed conditions
1 Security Hotspot
33.6% Coverage on New Code (required ≥ 40%)
Annotations
sonarqubecloud / SonarCloud Code Analysis
Remove this use of "Script"; it is deprecated.
See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZ6opSWO-GQEym9Vaokf&open=AZ6opSWO-GQEym9Vaokf&pullRequest=12617
Check warning on line 2500 in server/src/test/java/com/cloud/storage/VolumeApiServiceImplTest.java
sonarqubecloud / SonarCloud Code Analysis
Remove this unused "vm" local variable.
See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZ6uXxbix20R8avXDebp&open=AZ6uXxbix20R8avXDebp&pullRequest=12617
sonarqubecloud / SonarCloud Code Analysis
Remove this hard-coded path-delimiter.
See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZ6opSWO-GQEym9VaokZ&open=AZ6opSWO-GQEym9VaokZ&pullRequest=12617
sonarqubecloud / SonarCloud Code Analysis
Invoke method(s) only conditionally.
See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZ6opSWO-GQEym9VaokD&open=AZ6opSWO-GQEym9VaokD&pullRequest=12617
sonarqubecloud / SonarCloud Code Analysis
Add at least one assertion to this test case.
See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZ6opSek-GQEym9Vaoln&open=AZ6opSek-GQEym9Vaoln&pullRequest=12617
sonarqubecloud / SonarCloud Code Analysis
Add at least one assertion to this test case.
See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZ6opSea-GQEym9Vaolf&open=AZ6opSea-GQEym9Vaolf&pullRequest=12617
sonarqubecloud / SonarCloud Code Analysis
Remove this field injection and use constructor injection instead.
See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZ6opR7h-GQEym9VaojJ&open=AZ6opR7h-GQEym9VaojJ&pullRequest=12617
Check warning on line 1148 in server/src/main/java/com/cloud/storage/StorageManagerImpl.java
sonarqubecloud / SonarCloud Code Analysis
Merge this if statement with the enclosing one.
See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZ6opSjZ-GQEym9VaomJ&open=AZ6opSjZ-GQEym9VaomJ&pullRequest=12617
sonarqubecloud / SonarCloud Code Analysis
Remove this useless assignment to local variable "nfsPool".
See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZ6opSFq-GQEym9Vaoji&open=AZ6opSFq-GQEym9Vaoji&pullRequest=12617
sonarqubecloud / SonarCloud Code Analysis
Remove the declaration of thrown exception 'org.libvirt.LibvirtException', as it cannot be thrown from method's body.
See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZ6opSZ6-GQEym9VaolC&open=AZ6opSZ6-GQEym9VaolC&pullRequest=12617
Check warning on line 2550 in server/src/test/java/com/cloud/storage/VolumeApiServiceImplTest.java
sonarqubecloud / SonarCloud Code Analysis
Remove this and every subsequent useless "eq(...)" invocation; pass the values directly.
See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZ6opSuk-GQEym9Vaom2&open=AZ6opSuk-GQEym9Vaom2&pullRequest=12617
Check warning on line 32 in core/src/main/java/com/cloud/agent/api/PreMigrationCommand.java
sonarqubecloud / SonarCloud Code Analysis
Override the "equals" method in this class.
See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZ6opSQP-GQEym9Vaojz&open=AZ6opSQP-GQEym9Vaojz&pullRequest=12617
sonarqubecloud / SonarCloud Code Analysis
Remove this field injection and use constructor injection instead.
See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZ6opSfI-GQEym9VaomE&open=AZ6opSfI-GQEym9VaomE&pullRequest=12617
sonarqubecloud / SonarCloud Code Analysis
Refactor this method to reduce its Cognitive Complexity from 19 to the 15 allowed.
See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZ6opSWO-GQEym9Vaokm&open=AZ6opSWO-GQEym9Vaokm&pullRequest=12617
sonarqubecloud / SonarCloud Code Analysis
Add at least one assertion to this test case.
See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZ6opSek-GQEym9Vaolx&open=AZ6opSek-GQEym9Vaolx&pullRequest=12617
sonarqubecloud / SonarCloud Code Analysis
"logger" is the name of a field in "CommandWrapper".
See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZ6opSRu-GQEym9Vaoj7&open=AZ6opSRu-GQEym9Vaoj7&pullRequest=12617
sonarqubecloud / SonarCloud Code Analysis
Refactor this method to reduce its Cognitive Complexity from 18 to the 15 allowed.
See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZ6opSDk-GQEym9VaojY&open=AZ6opSDk-GQEym9VaojY&pullRequest=12617
sonarqubecloud / SonarCloud Code Analysis
Update this method so that its implementation is not identical to "testCLVMPoolLocalPathFormat" on line 216.
See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZ6opSea-GQEym9Vaolh&open=AZ6opSea-GQEym9Vaolh&pullRequest=12617
sonarqubecloud / SonarCloud Code Analysis
Define a constant instead of duplicating this literal "--unbuffered" 3 times.
See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZ6opSWO-GQEym9VaokM&open=AZ6opSWO-GQEym9VaokM&pullRequest=12617
sonarqubecloud / SonarCloud Code Analysis
Replace this "Map.containsKey()" with a call to "Map.computeIfAbsent()".
See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZ6opSWz-GQEym9Vaokp&open=AZ6opSWz-GQEym9Vaokp&pullRequest=12617
sonarqubecloud / SonarCloud Code Analysis
Add at least one assertion to this test case.
See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZ6opSek-GQEym9Vaol3&open=AZ6opSek-GQEym9Vaol3&pullRequest=12617
Check warning on line 5026 in server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java
sonarqubecloud / SonarCloud Code Analysis
A "Brain Method" was detected. Refactor it to reduce at least one of the following metrics: LOC from 170 to 64, Complexity from 47 to 14, Nesting Level from 4 to 2, Number of Variables from 31 to 6.
See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZ6opSlQ-GQEym9Vaoml&open=AZ6opSlQ-GQEym9Vaoml&pullRequest=12617
sonarqubecloud / SonarCloud Code Analysis
Invoke method(s) only conditionally.
See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZ6opSWO-GQEym9VaokF&open=AZ6opSWO-GQEym9VaokF&pullRequest=12617
Check warning on line 655 in server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
sonarqubecloud / SonarCloud Code Analysis
Remove this field injection and use constructor injection instead.
See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZ6opSsy-GQEym9Vaomo&open=AZ6opSsy-GQEym9Vaomo&pullRequest=12617
Check warning on line 2923 in server/src/main/java/com/cloud/storage/StorageManagerImpl.java
sonarqubecloud / SonarCloud Code Analysis
A "Brain Method" was detected. Refactor it to reduce at least one of the following metrics: LOC from 74 to 64, Complexity from 20 to 14, Nesting Level from 6 to 2, Number of Variables from 21 to 6.
See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZ6opSjZ-GQEym9VaomK&open=AZ6opSjZ-GQEym9VaomK&pullRequest=12617