Skip to content

Fix KvmFileBasedStorageVmSnapshotStrategy unit test failures - #14135

Merged
weizhouapache merged 1 commit into
mainfrom
fix-test-failure
Sep 10, 2026
Merged

weizhouapache merged 1 commit into
mainfrom
fix-test-failure

Fix KvmFileBasedStorageVmSnapshotStrategy unit test failures

cfdd378
Select commit
Loading
Failed to load commit list.
SonarQubeCloud / SonarCloud Code Analysis failed Sep 10, 2026 in 5m 41s

Quality Gate failed

Failed conditions
E Maintainability Rating on New Code (required ≥ B)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Annotations

Check failure on line 655 in engine/storage/snapshot/src/main/java/org/apache/cloudstack/storage/vmsnapshot/KvmFileBasedStorageVmSnapshotStrategy.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use static access with "org.apache.commons.lang3.StringUtils" for "isNotBlank".

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AaCMflqZiGrYjGtJQG-p&open=AaCMflqZiGrYjGtJQG-p&pullRequest=14135

Check warning on line 123 in engine/storage/snapshot/src/main/java/org/apache/cloudstack/storage/vmsnapshot/KvmFileBasedStorageVmSnapshotStrategy.java

See this annotation in the file changed.

@sonarqubecloud 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=AaCMflqZiGrYjGtJQG-m&open=AaCMflqZiGrYjGtJQG-m&pullRequest=14135

Check failure on line 159 in engine/storage/snapshot/src/main/java/org/apache/cloudstack/storage/vmsnapshot/KvmFileBasedStorageVmSnapshotStrategy.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal "delete" 3 times.

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AaCMflqZiGrYjGtJQG-k&open=AaCMflqZiGrYjGtJQG-k&pullRequest=14135

Check failure on line 962 in engine/storage/snapshot/src/main/java/org/apache/cloudstack/storage/vmsnapshot/KvmFileBasedStorageVmSnapshotStrategy.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use static access with "org.apache.commons.lang3.StringUtils" for "isBlank".

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AaCMflqZiGrYjGtJQG-s&open=AaCMflqZiGrYjGtJQG-s&pullRequest=14135

Check failure on line 578 in engine/storage/snapshot/src/main/java/org/apache/cloudstack/storage/vmsnapshot/KvmFileBasedStorageVmSnapshotStrategy.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal "create" 3 times.

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AaCMflqZiGrYjGtJQG-j&open=AaCMflqZiGrYjGtJQG-j&pullRequest=14135

Check warning on line 126 in engine/storage/snapshot/src/main/java/org/apache/cloudstack/storage/vmsnapshot/KvmFileBasedStorageVmSnapshotStrategy.java

See this annotation in the file changed.

@sonarqubecloud 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=AaCMflqZiGrYjGtJQG-n&open=AaCMflqZiGrYjGtJQG-n&pullRequest=14135

Check failure on line 867 in engine/storage/snapshot/src/main/java/org/apache/cloudstack/storage/vmsnapshot/KvmFileBasedStorageVmSnapshotStrategy.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use static access with "org.apache.commons.lang3.StringUtils" for "isBlank".

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AaCMflqZiGrYjGtJQG-q&open=AaCMflqZiGrYjGtJQG-q&pullRequest=14135

Check failure on line 441 in engine/storage/snapshot/src/main/java/org/apache/cloudstack/storage/vmsnapshot/KvmFileBasedStorageVmSnapshotStrategy.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use static access with "org.apache.commons.lang3.StringUtils" for "isBlank".

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AaCMflqZiGrYjGtJQG-o&open=AaCMflqZiGrYjGtJQG-o&pullRequest=14135

Check warning on line 120 in engine/storage/snapshot/src/main/java/org/apache/cloudstack/storage/vmsnapshot/KvmFileBasedStorageVmSnapshotStrategy.java

See this annotation in the file changed.

@sonarqubecloud 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=AaCMflqZiGrYjGtJQG-l&open=AaCMflqZiGrYjGtJQG-l&pullRequest=14135

Check failure on line 971 in engine/storage/snapshot/src/main/java/org/apache/cloudstack/storage/vmsnapshot/KvmFileBasedStorageVmSnapshotStrategy.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use static access with "org.apache.cloudstack.alert.AlertService" for "AlertType".

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AaCMflqZiGrYjGtJQG-t&open=AaCMflqZiGrYjGtJQG-t&pullRequest=14135

Check failure on line 950 in engine/storage/snapshot/src/main/java/org/apache/cloudstack/storage/vmsnapshot/KvmFileBasedStorageVmSnapshotStrategy.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use static access with "org.apache.commons.lang3.StringUtils" for "isBlank".

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AaCMflqZiGrYjGtJQG-r&open=AaCMflqZiGrYjGtJQG-r&pullRequest=14135

Check warning on line 101 in engine/storage/snapshot/src/test/java/org/apache/cloudstack/storage/vmsnapshot/KvmFileBasedStorageVmSnapshotStrategyTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use a static import for "spy".

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AaCMflu3iGrYjGtJQG-u&open=AaCMflu3iGrYjGtJQG-u&pullRequest=14135