Skip to content
Permalink
Browse files

remove unnecessary null check

  • Loading branch information...
icklesteve committed May 29, 2019
1 parent 21be989 commit 08a128c31ea73b60ce8093dd9b49fb842a432150
Showing with 17 additions and 19 deletions.
  1. +17 −19 java/src/jmri/jmrix/can/cbus/eventtable/CbusEventTableDataModel.java
@@ -727,28 +727,26 @@ public void dispose() {

public static class CbusEventTableShutdownTask extends AbstractShutDownTask {

/**
* Constructor specifies the warning message and action to take
*
* @param name the name of the task (used in logs)
*/
public CbusEventTableShutdownTask(String name) {
super(name);
}

/**
* Take the necessary action.
*
* @return true if the shutdown should continue, false to abort.
*/
@Override
public boolean execute() {
if ( jmri.InstanceManager.getDefault(jmri.jmrix.can.cbus.eventtable.CbusEventTableDataModel.class) != null ){
/**
* Constructor specifies the warning message and action to take
*
* @param name the name of the task (used in logs)
*/
public CbusEventTableShutdownTask(String name) {
super(name);
}

/**
* Checks preferences, saving Table contents if necessary
*
* @returns true as the shutdown should continue
*/
@Override
public boolean execute() {
jmri.InstanceManager.getDefault(jmri.jmrix.can.cbus.eventtable.CbusEventTableDataModel.class).dispose();
return true;
}
return true;
}
}

private final static Logger log = LoggerFactory.getLogger(CbusEventTableDataModel.class);
}

0 comments on commit 08a128c

Please sign in to comment.
You can’t perform that action at this time.