Ref: add more PMD rule: bestpractices.xml/UseCollectionIsEmpty

This commit is contained in:
Laurent Clouet
2024-06-06 02:54:51 +02:00
parent b943bd8821
commit a0e4f6b348
2 changed files with 3 additions and 2 deletions

View File

@@ -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);
}