Ref: add more PMD rule: bestpractices.xml/UseCollectionIsEmpty
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
<rule ref="category/java/bestpractices.xml/UnusedLocalVariable" />
|
||||
<rule ref="category/java/bestpractices.xml/UnusedPrivateField" />
|
||||
<rule ref="category/java/bestpractices.xml/UnusedPrivateMethod" />
|
||||
<rule ref="category/java/bestpractices.xml/UseCollectionIsEmpty" />
|
||||
|
||||
<rule ref="category/java/codestyle.xml/ExtendsObject" />
|
||||
<rule ref="category/java/codestyle.xml/ForLoopShouldBeWhileLoop" />
|
||||
|
||||
@@ -271,7 +271,7 @@ public class Settings implements Activity {
|
||||
gridbag.setConstraints(useCPU, compute_devices_constraints);
|
||||
compute_devices_panel.add(useCPU);
|
||||
|
||||
if (gpus.size() > 0 || GPU.hasHIPDevices()) {
|
||||
if (gpus.isEmpty() == false || GPU.hasHIPDevices()) {
|
||||
for (GPUDevice gpu : gpus) {
|
||||
JCheckBoxGPU gpuCheckBox = new JCheckBoxGPU(gpu);
|
||||
gpuCheckBox.setToolTipText(gpu.getId());
|
||||
@@ -819,7 +819,7 @@ public class Settings implements Activity {
|
||||
changes.add("Disable large Downloads");
|
||||
}
|
||||
|
||||
if (changes.size() > 0) {
|
||||
if (changes.isEmpty() == false) {
|
||||
warning = String.format(warning, String.join(", ", changes));
|
||||
JOptionPane.showMessageDialog(null, warning);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user