Skip to content

Commit cd6a8f6

Browse files
author
Daan Hoogland
committed
Merge branch '4.20' into 4.22
2 parents b869913 + 3d7d412 commit cd6a8f6

File tree

11 files changed

+325
-74
lines changed

11 files changed

+325
-74
lines changed

api/src/main/java/org/apache/cloudstack/api/BaseUpdateTemplateOrIsoCmd.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,8 @@ public Map getDetails() {
153153
return (Map) (paramsCollection.toArray())[0];
154154
}
155155

156-
public boolean isCleanupDetails(){
157-
return cleanupDetails == null ? false : cleanupDetails.booleanValue();
156+
public boolean isCleanupDetails() {
157+
return cleanupDetails != null && cleanupDetails;
158158
}
159159

160160
public CPU.CPUArch getCPUArch() {

engine/schema/src/main/java/com/cloud/storage/dao/VMTemplateDaoImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ public void saveDetails(VMTemplateVO tmpl) {
460460
if (detailsStr == null) {
461461
return;
462462
}
463-
List<VMTemplateDetailVO> details = new ArrayList<VMTemplateDetailVO>();
463+
List<VMTemplateDetailVO> details = new ArrayList<>();
464464
for (String key : detailsStr.keySet()) {
465465
VMTemplateDetailVO detail = new VMTemplateDetailVO(tmpl.getId(), key, detailsStr.get(key), true);
466466
details.add(detail);
@@ -482,7 +482,7 @@ public long addTemplateToZone(VMTemplateVO tmplt, long zoneId) {
482482
}
483483

484484
if (tmplt.getDetails() != null) {
485-
List<VMTemplateDetailVO> details = new ArrayList<VMTemplateDetailVO>();
485+
List<VMTemplateDetailVO> details = new ArrayList<>();
486486
for (String key : tmplt.getDetails().keySet()) {
487487
details.add(new VMTemplateDetailVO(tmplt.getId(), key, tmplt.getDetails().get(key), true));
488488
}

pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,20 +63,20 @@
6363
<!-- Plugins versions -->
6464
<cs.antrun-plugin.version>1.8</cs.antrun-plugin.version>
6565
<cs.builder-helper-plugin.version>3.0.0</cs.builder-helper-plugin.version>
66-
<cs.checkstyle-plugin.version>3.1.0</cs.checkstyle-plugin.version>
66+
<cs.checkstyle-plugin.version>3.6.0</cs.checkstyle-plugin.version>
6767
<cs.jacoco-plugin.version>0.8.11</cs.jacoco-plugin.version>
6868
<cs.compiler-plugin.version>3.8.1</cs.compiler-plugin.version>
69-
<cs.dependency-plugin.version>3.1.1</cs.dependency-plugin.version>
69+
<cs.dependency-plugin.version>3.9.0</cs.dependency-plugin.version>
7070
<cs.failsafe-plugin.version>2.22.2</cs.failsafe-plugin.version>
7171
<cs.spotbugs.version>3.1.12</cs.spotbugs.version>
7272
<cs.spotbugs-maven-plugin.version>3.1.12.2</cs.spotbugs-maven-plugin.version>
7373
<cs.jar-plugin.version>3.2.0</cs.jar-plugin.version>
74-
<cs.pmd-plugin.version>3.12.0</cs.pmd-plugin.version>
74+
<cs.pmd-plugin.version>3.28.0</cs.pmd-plugin.version>
7575
<cs.project-info-plugin.version>3.0.0</cs.project-info-plugin.version>
7676
<cs.owasp.dependency-checker-plugin.version>7.4.4</cs.owasp.dependency-checker-plugin.version>
7777
<cs.release-plugin.version>2.5.3</cs.release-plugin.version>
7878
<cs.resources-plugin.version>3.1.0</cs.resources-plugin.version>
79-
<cs.site-plugin.version>3.8.2</cs.site-plugin.version>
79+
<cs.site-plugin.version>3.21.0</cs.site-plugin.version>
8080
<cs.surefire-plugin.version>2.22.2</cs.surefire-plugin.version>
8181
<cs.clover-maven-plugin.version>4.4.1</cs.clover-maven-plugin.version>
8282
<cs.exec-maven-plugin.version>3.2.0</cs.exec-maven-plugin.version>

server/src/main/java/com/cloud/template/TemplateManagerImpl.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2256,7 +2256,7 @@ private VMTemplateVO updateTemplateOrIso(BaseUpdateTemplateOrIsoCmd cmd) {
22562256
templateTag == null &&
22572257
forCks == null &&
22582258
arch == null &&
2259-
(! cleanupDetails && details == null) //update details in every case except this one
2259+
(!cleanupDetails && details == null) //update details in every case except this one
22602260
);
22612261
if (!updateNeeded) {
22622262
return template;
@@ -2360,8 +2360,7 @@ private VMTemplateVO updateTemplateOrIso(BaseUpdateTemplateOrIsoCmd cmd) {
23602360
if (cleanupDetails) {
23612361
template.setDetails(null);
23622362
_tmpltDetailsDao.removeDetails(id);
2363-
}
2364-
else if (details != null && !details.isEmpty()) {
2363+
} else if (details != null && !details.isEmpty()) {
23652364
template.setDetails(details);
23662365
_tmpltDao.saveDetails(template);
23672366
}

server/src/main/java/com/cloud/vm/snapshot/VMSnapshotManagerImpl.java

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import java.util.HashMap;
2424
import java.util.List;
2525
import java.util.Map;
26+
import java.util.Set;
2627

2728
import javax.inject.Inject;
2829
import javax.naming.ConfigurationException;
@@ -182,6 +183,11 @@ public class VMSnapshotManagerImpl extends MutualExclusiveIdsManagerBase impleme
182183
Long.class, "vm.job.check.interval", "3000",
183184
"Interval in milliseconds to check if the job is complete", false);
184185

186+
private static final Set<String> VM_SNAPSHOT_CUSTOM_SERVICE_OFFERING_DETAILS = Set.of(
187+
VmDetailConstants.CPU_NUMBER.toLowerCase(),
188+
VmDetailConstants.CPU_SPEED.toLowerCase(),
189+
VmDetailConstants.MEMORY.toLowerCase());
190+
185191
@Override
186192
public boolean configure(String name, Map<String, Object> params) throws ConfigurationException {
187193
_name = name;
@@ -471,7 +477,8 @@ public VMSnapshot doInTransaction(TransactionStatus status) {
471477
}
472478

473479
/**
474-
* Add entries on vm_snapshot_details if service offering is dynamic. This will allow setting details when revert to vm snapshot
480+
* Add entries about cpu, cpu_speed and memory in vm_snapshot_details if service offering is dynamic.
481+
* This will allow setting details when revert to vm snapshot.
475482
* @param vmId vm id
476483
* @param serviceOfferingId service offering id
477484
* @param vmSnapshotId vm snapshot id
@@ -482,7 +489,7 @@ protected void addSupportForCustomServiceOffering(long vmId, long serviceOfferin
482489
List<VMInstanceDetailVO> vmDetails = _vmInstanceDetailsDao.listDetails(vmId);
483490
List<VMSnapshotDetailsVO> vmSnapshotDetails = new ArrayList<VMSnapshotDetailsVO>();
484491
for (VMInstanceDetailVO detail : vmDetails) {
485-
if(detail.getName().equalsIgnoreCase(VmDetailConstants.CPU_NUMBER) || detail.getName().equalsIgnoreCase(VmDetailConstants.CPU_SPEED) || detail.getName().equalsIgnoreCase(VmDetailConstants.MEMORY)) {
492+
if (VM_SNAPSHOT_CUSTOM_SERVICE_OFFERING_DETAILS.contains(detail.getName().toLowerCase())) {
486493
vmSnapshotDetails.add(new VMSnapshotDetailsVO(vmSnapshotId, detail.getName(), detail.getValue(), detail.isDisplay()));
487494
}
488495
}
@@ -935,7 +942,7 @@ private UserVm orchestrateRevertToVMSnapshot(Long vmSnapshotId) throws Insuffici
935942
Transaction.execute(new TransactionCallbackWithExceptionNoReturn<CloudRuntimeException>() {
936943
@Override
937944
public void doInTransactionWithoutResult(TransactionStatus status) throws CloudRuntimeException {
938-
revertUserVmDetailsFromVmSnapshot(userVm, vmSnapshotVo);
945+
revertCustomServiceOfferingDetailsFromVmSnapshot(userVm, vmSnapshotVo);
939946
updateUserVmServiceOffering(userVm, vmSnapshotVo);
940947
}
941948
});
@@ -947,19 +954,19 @@ public void doInTransactionWithoutResult(TransactionStatus status) throws CloudR
947954
}
948955

949956
/**
950-
* Update or add user vm details from vm snapshot for vms with custom service offerings
957+
* Update or add user vm details (cpu, cpu_speed and memory) from vm snapshot for vms with custom service offerings
951958
* @param userVm user vm
952959
* @param vmSnapshotVo vm snapshot
953960
*/
954-
protected void revertUserVmDetailsFromVmSnapshot(UserVmVO userVm, VMSnapshotVO vmSnapshotVo) {
961+
protected void revertCustomServiceOfferingDetailsFromVmSnapshot(UserVmVO userVm, VMSnapshotVO vmSnapshotVo) {
955962
ServiceOfferingVO serviceOfferingVO = _serviceOfferingDao.findById(vmSnapshotVo.getServiceOfferingId());
956963
if (serviceOfferingVO.isDynamic()) {
957964
List<VMSnapshotDetailsVO> vmSnapshotDetails = _vmSnapshotDetailsDao.listDetails(vmSnapshotVo.getId());
958-
List<VMInstanceDetailVO> userVmDetails = new ArrayList<VMInstanceDetailVO>();
959965
for (VMSnapshotDetailsVO detail : vmSnapshotDetails) {
960-
userVmDetails.add(new VMInstanceDetailVO(userVm.getId(), detail.getName(), detail.getValue(), detail.isDisplay()));
966+
if (VM_SNAPSHOT_CUSTOM_SERVICE_OFFERING_DETAILS.contains(detail.getName().toLowerCase())) {
967+
_vmInstanceDetailsDao.addDetail(userVm.getId(), detail.getName(), detail.getValue(), detail.isDisplay());
968+
}
961969
}
962-
_vmInstanceDetailsDao.saveDetails(userVmDetails);
963970
}
964971
}
965972

server/src/test/java/com/cloud/vm/snapshot/VMSnapshotManagerTest.java

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
import com.cloud.vm.UserVmVO;
5252
import com.cloud.vm.VirtualMachine.State;
5353
import com.cloud.vm.VirtualMachineManager;
54+
import com.cloud.vm.VmDetailConstants;
5455
import com.cloud.vm.dao.UserVmDao;
5556
import com.cloud.vm.dao.VMInstanceDetailsDao;
5657
import com.cloud.vm.dao.VMInstanceDao;
@@ -67,7 +68,6 @@
6768
import org.junit.Test;
6869
import org.mockito.ArgumentCaptor;
6970
import org.mockito.Captor;
70-
import org.mockito.ArgumentMatchers;
7171
import org.mockito.Mock;
7272
import org.mockito.MockitoAnnotations;
7373
import org.mockito.Spy;
@@ -79,13 +79,18 @@
7979
import java.util.Map;
8080

8181
import static org.junit.Assert.assertEquals;
82+
import static org.junit.Assert.assertFalse;
83+
import static org.junit.Assert.assertTrue;
8284
import static org.mockito.ArgumentMatchers.any;
85+
import static org.mockito.ArgumentMatchers.anyBoolean;
8386
import static org.mockito.ArgumentMatchers.anyLong;
8487
import static org.mockito.ArgumentMatchers.anyString;
88+
import static org.mockito.ArgumentMatchers.eq;
8589
import static org.mockito.Mockito.doNothing;
8690
import static org.mockito.Mockito.doReturn;
8791
import static org.mockito.Mockito.mock;
8892
import static org.mockito.Mockito.never;
93+
import static org.mockito.Mockito.times;
8994
import static org.mockito.Mockito.verify;
9095
import static org.mockito.Mockito.when;
9196

@@ -225,13 +230,13 @@ public void setup() {
225230
when(_serviceOfferingDao.findById(SERVICE_OFFERING_ID)).thenReturn(serviceOffering);
226231

227232
for (ResourceDetail detail : Arrays.asList(userVmDetailCpuNumber, vmSnapshotDetailCpuNumber)) {
228-
when(detail.getName()).thenReturn("cpuNumber");
233+
when(detail.getName()).thenReturn(VmDetailConstants.CPU_NUMBER);
229234
when(detail.getValue()).thenReturn("2");
230235
when(detail.isDisplay()).thenReturn(true);
231236
}
232237

233238
for (ResourceDetail detail : Arrays.asList(userVmDetailMemory, vmSnapshotDetailMemory)) {
234-
when(detail.getName()).thenReturn("memory");
239+
when(detail.getName()).thenReturn(VmDetailConstants.MEMORY);
235240
when(detail.getValue()).thenReturn("2048");
236241
when(detail.isDisplay()).thenReturn(true);
237242
}
@@ -348,12 +353,12 @@ public void testUpdateUserVmServiceOfferingSameServiceOffering() {
348353
@Test
349354
public void testUpdateUserVmServiceOfferingDifferentServiceOffering() throws ConcurrentOperationException, ResourceUnavailableException, ManagementServerException, VirtualMachineMigrationException {
350355
when(userVm.getServiceOfferingId()).thenReturn(SERVICE_OFFERING_DIFFERENT_ID);
351-
when(_userVmManager.upgradeVirtualMachine(ArgumentMatchers.eq(TEST_VM_ID), ArgumentMatchers.eq(SERVICE_OFFERING_ID), mapDetailsCaptor.capture())).thenReturn(true);
356+
when(_userVmManager.upgradeVirtualMachine(eq(TEST_VM_ID), eq(SERVICE_OFFERING_ID), mapDetailsCaptor.capture())).thenReturn(true);
352357
_vmSnapshotMgr.updateUserVmServiceOffering(userVm, vmSnapshotVO);
353358

354359
verify(_vmSnapshotMgr).changeUserVmServiceOffering(userVm, vmSnapshotVO);
355360
verify(_vmSnapshotMgr).getVmMapDetails(userVm);
356-
verify(_vmSnapshotMgr).upgradeUserVmServiceOffering(ArgumentMatchers.eq(userVm), ArgumentMatchers.eq(SERVICE_OFFERING_ID), mapDetailsCaptor.capture());
361+
verify(_vmSnapshotMgr).upgradeUserVmServiceOffering(eq(userVm), eq(SERVICE_OFFERING_ID), mapDetailsCaptor.capture());
357362
}
358363

359364
@Test
@@ -368,18 +373,18 @@ public void testGetVmMapDetails() {
368373

369374
@Test
370375
public void testChangeUserVmServiceOffering() throws ConcurrentOperationException, ResourceUnavailableException, ManagementServerException, VirtualMachineMigrationException {
371-
when(_userVmManager.upgradeVirtualMachine(ArgumentMatchers.eq(TEST_VM_ID), ArgumentMatchers.eq(SERVICE_OFFERING_ID), mapDetailsCaptor.capture())).thenReturn(true);
376+
when(_userVmManager.upgradeVirtualMachine(eq(TEST_VM_ID), eq(SERVICE_OFFERING_ID), mapDetailsCaptor.capture())).thenReturn(true);
372377
_vmSnapshotMgr.changeUserVmServiceOffering(userVm, vmSnapshotVO);
373378
verify(_vmSnapshotMgr).getVmMapDetails(userVm);
374-
verify(_vmSnapshotMgr).upgradeUserVmServiceOffering(ArgumentMatchers.eq(userVm), ArgumentMatchers.eq(SERVICE_OFFERING_ID), mapDetailsCaptor.capture());
379+
verify(_vmSnapshotMgr).upgradeUserVmServiceOffering(eq(userVm), eq(SERVICE_OFFERING_ID), mapDetailsCaptor.capture());
375380
}
376381

377382
@Test(expected=CloudRuntimeException.class)
378383
public void testChangeUserVmServiceOfferingFailOnUpgradeVMServiceOffering() throws ConcurrentOperationException, ResourceUnavailableException, ManagementServerException, VirtualMachineMigrationException {
379-
when(_userVmManager.upgradeVirtualMachine(ArgumentMatchers.eq(TEST_VM_ID), ArgumentMatchers.eq(SERVICE_OFFERING_ID), mapDetailsCaptor.capture())).thenReturn(false);
384+
when(_userVmManager.upgradeVirtualMachine(eq(TEST_VM_ID), eq(SERVICE_OFFERING_ID), mapDetailsCaptor.capture())).thenReturn(false);
380385
_vmSnapshotMgr.changeUserVmServiceOffering(userVm, vmSnapshotVO);
381386
verify(_vmSnapshotMgr).getVmMapDetails(userVm);
382-
verify(_vmSnapshotMgr).upgradeUserVmServiceOffering(ArgumentMatchers.eq(userVm), ArgumentMatchers.eq(SERVICE_OFFERING_ID), mapDetailsCaptor.capture());
387+
verify(_vmSnapshotMgr).upgradeUserVmServiceOffering(eq(userVm), eq(SERVICE_OFFERING_ID), mapDetailsCaptor.capture());
383388
}
384389

385390
@Test
@@ -396,16 +401,27 @@ public void testUpgradeUserVmServiceOffering() throws ConcurrentOperationExcepti
396401

397402
@Test
398403
public void testRevertUserVmDetailsFromVmSnapshotNotDynamicServiceOffering() {
399-
_vmSnapshotMgr.revertUserVmDetailsFromVmSnapshot(vmMock, vmSnapshotVO);
404+
_vmSnapshotMgr.revertCustomServiceOfferingDetailsFromVmSnapshot(vmMock, vmSnapshotVO);
400405
verify(_vmSnapshotDetailsDao, never()).listDetails(anyLong());
401406
}
402407

403408
@Test
404409
public void testRevertUserVmDetailsFromVmSnapshotDynamicServiceOffering() {
405410
when(serviceOffering.isDynamic()).thenReturn(true);
406-
_vmSnapshotMgr.revertUserVmDetailsFromVmSnapshot(vmMock, vmSnapshotVO);
411+
VMSnapshotDetailsVO uefiSnapshotDetail = new VMSnapshotDetailsVO(VM_SNAPSHOT_ID, "UEFI", "SECURE", true);
412+
List<VMSnapshotDetailsVO> snapshotDetailsWithUefi = Arrays.asList(
413+
vmSnapshotDetailCpuNumber, vmSnapshotDetailMemory, uefiSnapshotDetail);
414+
when(_vmSnapshotDetailsDao.listDetails(VM_SNAPSHOT_ID)).thenReturn(snapshotDetailsWithUefi);
415+
416+
_vmSnapshotMgr.revertCustomServiceOfferingDetailsFromVmSnapshot(vmMock, vmSnapshotVO);
417+
407418
verify(_vmSnapshotDetailsDao).listDetails(VM_SNAPSHOT_ID);
408-
verify(_vmInstanceDetailsDao).saveDetails(listUserVmDetailsCaptor.capture());
419+
verify(_vmInstanceDetailsDao, never()).saveDetails(any());
420+
ArgumentCaptor<String> detailNameCaptor = ArgumentCaptor.forClass(String.class);
421+
verify(_vmInstanceDetailsDao, times(2)).addDetail(eq(TEST_VM_ID), detailNameCaptor.capture(), anyString(), anyBoolean());
422+
List<String> appliedNames = detailNameCaptor.getAllValues();
423+
assertTrue(appliedNames.contains(VmDetailConstants.CPU_NUMBER));
424+
assertTrue(appliedNames.contains(VmDetailConstants.MEMORY));
425+
assertFalse("UEFI must not be applied from snapshot so that existing UEFI setting is preserved", appliedNames.contains("UEFI"));
409426
}
410-
411427
}

tools/checkstyle/src/main/resources/cloud-pmd.xml

Lines changed: 25 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -19,28 +19,25 @@
1919
under the License.
2020
2121
-->
22-
<ruleset name="Maven Ruleset"
23-
xmlns="http://pmd.sf.net/ruleset/1.0.0"
24-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
25-
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
26-
xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
22+
<ruleset name="CloudStack PMD Ruleset"
23+
xmlns="http://pmd.sourceforge.net/ruleset/2.0.0">
2724

2825
<description>
2926
Ruleset that brings all the rulesets we want from the pmd jar, because
3027
the maven-pmd-plugin doesn't find them otherwise. This is also the place
3128
to add our own future rulesets, if any.
3229
</description>
3330

34-
<rule ref="rulesets/java/basic.xml"/>
35-
<rule ref="rulesets/java/braces.xml"/>
36-
<rule ref="rulesets/java/clone.xml"/>
37-
<rule ref="rulesets/java/codesize.xml"/>
38-
<rule ref="rulesets/java/comments.xml">
31+
<rule ref="category/java/basic.xml"/>
32+
<rule ref="category/java/braces.xml"/>
33+
<rule ref="category/java/clone.xml"/>
34+
<rule ref="category/java/codesize.xml"/>
35+
<rule ref="category/java/comments.xml">
3936
<!-- We shouldn't limit the number of lines in the header of a class -->
4037
<exclude name="CommentSize"/>
4138
<exclude name="CommentRequired" />
4239
</rule>
43-
<rule ref="rulesets/java/controversial.xml">
40+
<rule ref="category/java/controversial.xml">
4441
<!-- The rule is good, but is not properly applied. It forces you to statically declare it as ConcurrentHashMap -->
4542
<exclude name="UseConcurrentHashMap"/>
4643
<exclude name="CallSuperInConstructor"/>
@@ -50,35 +47,35 @@
5047
<exclude name="DataflowAnomalyAnalysis" />
5148
<exclude name="UseObjectForClearerAPI" />
5249
</rule>
53-
<rule ref="rulesets/java/coupling.xml">
50+
<rule ref="category/java/coupling.xml">
5451
<exclude name="ExcessiveImports" />
5552
<exclude name="LawOfDemeter"/>
5653
</rule>
57-
<rule ref="rulesets/java/design.xml">
54+
<rule ref="category/java/design.xml">
5855
<exclude name="ConstructorCallsOverridableMethod"/>
5956
<exclude name="AbstractClassWithoutAbstractMethod"/>
6057
<exclude name="AvoidSynchronizedAtMethodLevel"/>
6158
</rule>
62-
<rule ref="rulesets/java/empty.xml"/>
63-
<rule ref="rulesets/java/finalizers.xml"/>
64-
<rule ref="rulesets/java/imports.xml"/>
65-
<rule ref="rulesets/java/j2ee.xml"/>
66-
<rule ref="rulesets/java/junit.xml"/>
67-
<rule ref="rulesets/java/logging-java.xml"/>
68-
<rule ref="rulesets/java/naming.xml">
59+
<rule ref="category/java/empty.xml"/>
60+
<rule ref="category/java/finalizers.xml"/>
61+
<rule ref="category/java/imports.xml"/>
62+
<rule ref="category/java/j2ee.xml"/>
63+
<rule ref="category/java/junit.xml"/>
64+
<rule ref="category/java/logging-java.xml"/>
65+
<rule ref="category/java/naming.xml">
6966
<exclude name="ShortVariable"/>
7067
<exclude name="AbstractNaming"/>
7168
</rule>
72-
<rule ref="rulesets/java/naming.xml/LongVariable">
69+
<rule ref="category/java/naming.xml/LongVariable">
7370
<properties>
7471
<property name="minimum" value="32"/>
7572
</properties>
7673
</rule>
77-
<rule ref="rulesets/java/optimizations.xml"/>
78-
<rule ref="rulesets/java/strictexception.xml"/>
79-
<rule ref="rulesets/java/strings.xml"/>
80-
<rule ref="rulesets/java/sunsecure.xml"/>
81-
<rule ref="rulesets/java/typeresolution.xml"/>
82-
<rule ref="rulesets/java/unnecessary.xml"/>
83-
<rule ref="rulesets/java/unusedcode.xml"/>
74+
<rule ref="category/java/optimizations.xml"/>
75+
<rule ref="category/java/strictexception.xml"/>
76+
<rule ref="category/java/strings.xml"/>
77+
<rule ref="category/java/sunsecure.xml"/>
78+
<rule ref="category/java/typeresolution.xml"/>
79+
<rule ref="category/java/unnecessary.xml"/>
80+
<rule ref="category/java/unusedcode.xml"/>
8481
</ruleset>

0 commit comments

Comments
 (0)