Ref: add more PMD rule: bestpractices.xml/UseCollectionIsEmpty
This commit is contained in:
@@ -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