Skip to content

Commit

Permalink
Fix SpotBugs error found in Travis ci
Browse files Browse the repository at this point in the history
  • Loading branch information
geowar1 committed Sep 30, 2018
1 parent 2130546 commit 1054ebc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion java/src/jmri/jmrit/beantable/MemoryTableAction.java
Expand Up @@ -246,11 +246,11 @@ void okPressed(ActionEvent e) {
if (uName != null && !uName.isEmpty() && jmri.InstanceManager.memoryManagerInstance().getByUserName(uName) != null && !p.getPreferenceState(getClassName(), "duplicateUserName")) {
jmri.InstanceManager.getDefault(jmri.UserPreferencesManager.class).
showErrorMessage(Bundle.getMessage("ErrorTitle"), Bundle.getMessage("ErrorDuplicateUserName", uName), getClassName(), "duplicateUserName", false, true);
uName = null; // new Memory objects always receive a valid system name using the next free index, but uName names must not be in use so use none in that case
// show in status bar
errorMessage = Bundle.getMessage("ErrorDuplicateUserName", uName);
statusBarLabel.setText(errorMessage);
statusBarLabel.setForeground(Color.red);
uName = null; // new Memory objects always receive a valid system name using the next free index, but uName names must not be in use so use none in that case
}
if (sName != null && !sName.isEmpty() && jmri.InstanceManager.memoryManagerInstance().getBySystemName(sName) != null && !p.getPreferenceState(getClassName(), "duplicateSystemName")) {
jmri.InstanceManager.getDefault(jmri.UserPreferencesManager.class).
Expand Down

0 comments on commit 1054ebc

Please sign in to comment.