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(); ImmutablePair<String, LogicalImagerRule> ruleMap = editPanel.toRule();
appendRow(ruleMap); appendRow(ruleMap);
break; break;
} catch (Exception ex) { } catch (IOException | NumberFormatException ex) {
JOptionPane.showMessageDialog(this, JOptionPane.showMessageDialog(this,
ex.getMessage(), ex.getMessage(),
Bundle.ConfigVisualPanel2_editRuleError(), Bundle.ConfigVisualPanel2_editRuleError(),
@ -929,10 +929,8 @@ public final class ConfigVisualPanel2 extends JPanel {
@Override @Override
public Object getValueAt(int rowIndex, int columnIndex) { public Object getValueAt(int rowIndex, int columnIndex) {
Object ret = null;
if (columnIndex == 0) { if (columnIndex == 0) {
ret = list.get(rowIndex); return list.get(rowIndex);
return ret;
} else { } else {
throw new UnsupportedOperationException("Invalid table column index: " + columnIndex); //NON-NLS 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 String ENCRYPTION_PROGRAMS_RULE_DESCRIPTION = Bundle.EncryptionProgramsRule_encryptionProgramsRuleDescription();
private static final List<String> FILENAMES = new ArrayList<>(); private static final List<String> FILENAMES = new ArrayList<>();
private void EncryptionProgramsRule() {} private EncryptionProgramsRule() {}
// TODO: Add more files here // TODO: Add more files here
static { static {