Fix codacy errors

This commit is contained in:
Joe Ho 2019-06-05 15:32:07 -04:00
parent 23384c3904
commit d8b0e9a1a6
2 changed files with 3 additions and 5 deletions

View File

@ -529,7 +529,7 @@ public final class ConfigVisualPanel2 extends JPanel {
ImmutablePair<String, LogicalImagerRule> ruleMap = editPanel.toRule();
appendRow(ruleMap);
break;
} catch (Exception ex) {
} catch (IOException | NumberFormatException ex) {
JOptionPane.showMessageDialog(this,
ex.getMessage(),
Bundle.ConfigVisualPanel2_editRuleError(),
@ -929,10 +929,8 @@ public final class ConfigVisualPanel2 extends JPanel {
@Override
public Object getValueAt(int rowIndex, int columnIndex) {
Object ret = null;
if (columnIndex == 0) {
ret = list.get(rowIndex);
return ret;
return list.get(rowIndex);
} else {
throw new UnsupportedOperationException("Invalid table column index: " + columnIndex); //NON-NLS
}

View File

@ -35,7 +35,7 @@ public final class EncryptionProgramsRule {
private static final String ENCRYPTION_PROGRAMS_RULE_DESCRIPTION = Bundle.EncryptionProgramsRule_encryptionProgramsRuleDescription();
private static final List<String> FILENAMES = new ArrayList<>();
private void EncryptionProgramsRule() {}
private EncryptionProgramsRule() {}
// TODO: Add more files here
static {