Skip to content

Commit

Permalink
chore: Remove unused deprecated code.
Browse files Browse the repository at this point in the history
  • Loading branch information
rhwood committed Mar 14, 2020
1 parent d5c31e5 commit ccaf22b
Show file tree
Hide file tree
Showing 34 changed files with 41 additions and 433 deletions.
5 changes: 4 additions & 1 deletion help/en/releasenotes/current-draft-note.shtml
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,9 @@
<h3>Miscellaneous</h3>
<a id="Misc" name="Misc"></a>
<ul>
<li></li>
<li>Long deprecated <code>instance()</code> methods to get the default
instance of a manager have been removed. Use
<code>InstanceManager.getDefault(NameOfManager.class)</code>
instead.</li>
</ul>

5 changes: 1 addition & 4 deletions java/src/jmri/jmris/simpleserver/SimpleOperationsServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,9 @@ public static String constructOperationsMessage(ArrayList<Attribute> contents) {
* @param message is the String received
* @return an ArrayList of Attributes of the constituent pieces of the
* message
* @deprecated since 4.7.1
*/
// This should never have been a public method, Deprecating so we can
// make it private or eliminate it later.
@Deprecated
public static ArrayList<Attribute> parseOperationsMessage(String message) {
private static ArrayList<Attribute> parseOperationsMessage(String message) {
ArrayList<Attribute> contents = new ArrayList<Attribute>();
int start;
int end;
Expand Down
12 changes: 0 additions & 12 deletions java/src/jmri/jmrit/operations/OperationsManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,6 @@ public final class OperationsManager implements InstanceManagerAutoDefault, Inst
public OperationsManager() {
}

/**
* Get the default instance of this class.
*
* @return the default instance of this class
* @deprecated since 4.9.2; use
* {@link jmri.InstanceManager#getDefault(java.lang.Class)} instead
*/
@Deprecated
public synchronized static OperationsManager getInstance() {
return InstanceManager.getDefault(OperationsManager.class);
}

/**
* Get the path to the Operations folder, rooted in the User's file path, as
* a String.
Expand Down
12 changes: 0 additions & 12 deletions java/src/jmri/jmrit/operations/automation/AutomationManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,6 @@ public class AutomationManager implements InstanceManagerAutoDefault, PropertyCh
public AutomationManager() {
}

/**
* Get the default instance of this class.
*
* @return the default instance of this class
* @deprecated since 4.9.2; use
* {@link jmri.InstanceManager#getDefault(java.lang.Class)} instead
*/
@Deprecated
public static synchronized AutomationManager instance() {
return InstanceManager.getDefault(AutomationManager.class);
}

// stores known Automation instances by id
protected Hashtable<String, Automation> _automationHashTable = new Hashtable<>();

Expand Down
12 changes: 0 additions & 12 deletions java/src/jmri/jmrit/operations/locations/LocationManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,6 @@ public LocationManager() {

private int _id = 0;

/**
* Get the default instance of this class.
*
* @return the default instance of this class
* @deprecated since 4.9.2; use
* {@link jmri.InstanceManager#getDefault(java.lang.Class)} instead
*/
@Deprecated
public static synchronized LocationManager instance() {
return InstanceManager.getDefault(LocationManager.class);
}

public void dispose() {
_locationHashTable.clear();
_id = 0;
Expand Down
12 changes: 0 additions & 12 deletions java/src/jmri/jmrit/operations/locations/LocationManagerXml.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,6 @@ public class LocationManagerXml extends OperationsXml implements InstanceManager
public LocationManagerXml() {
}

/**
* Get the default instance of this class.
*
* @return the default instance of this class
* @deprecated since 4.9.2; use
* {@link jmri.InstanceManager#getDefault(java.lang.Class)} instead
*/
@Deprecated
public static synchronized LocationManagerXml instance() {
return InstanceManager.getDefault(LocationManagerXml.class);
}

@Override
public void writeFile(String name) throws java.io.FileNotFoundException, java.io.IOException {
log.debug("writeFile {}", name);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,6 @@ public ScheduleManager() {

private int _id = 0;

/**
* Get the default instance of this class.
*
* @return the default instance of this class
* @deprecated since 4.9.2; use
* {@link jmri.InstanceManager#getDefault(java.lang.Class)} instead
*/
@Deprecated
public static synchronized ScheduleManager instance() {
return InstanceManager.getDefault(ScheduleManager.class);
}

public void dispose() {
_scheduleHashTable.clear();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,6 @@ public RollingStockLogger() {
// nothing to do
}

/**
* Get the default instance of this class.
*
* @return the default instance of this class
* @deprecated since 4.9.2; use
* {@link jmri.InstanceManager#getDefault(java.lang.Class)} instead
*/
@Deprecated
public static synchronized RollingStockLogger instance() {
return InstanceManager.getDefault(RollingStockLogger.class);
}

public void enableCarLogging(boolean enable) {
if (enable) {
addCarListeners();
Expand Down
12 changes: 0 additions & 12 deletions java/src/jmri/jmrit/operations/rollingstock/cars/CarColors.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,6 @@ public class CarColors extends RollingStockAttribute implements InstanceManagerA
public CarColors() {
}

/**
* Get the default instance of this class.
*
* @return the default instance of this class
* @deprecated since 4.9.2; use
* {@link jmri.InstanceManager#getDefault(java.lang.Class)} instead
*/
@Deprecated
public static synchronized CarColors instance() {
return InstanceManager.getDefault(CarColors.class);
}

@Override
protected String getDefaultNames() {
return COLORS;
Expand Down
12 changes: 0 additions & 12 deletions java/src/jmri/jmrit/operations/rollingstock/cars/CarLengths.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,6 @@ public class CarLengths extends RollingStockAttribute implements InstanceManager
public CarLengths() {
}

/**
* Get the default instance of this class.
*
* @return the default instance of this class
* @deprecated since 4.9.2; use
* {@link jmri.InstanceManager#getDefault(java.lang.Class)} instead
*/
@Deprecated
public static synchronized CarLengths instance() {
return InstanceManager.getDefault(CarLengths.class);
}

@Override
protected String getDefaultNames() {
return LENGTHS;
Expand Down
12 changes: 0 additions & 12 deletions java/src/jmri/jmrit/operations/rollingstock/cars/CarLoads.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,6 @@ public class CarLoads extends RollingStockAttribute implements InstanceManagerAu
public CarLoads() {
}

/**
* Get the default instance of this class.
*
* @return the default instance of this class
* @deprecated since 4.9.2; use
* {@link jmri.InstanceManager#getDefault(java.lang.Class)} instead
*/
@Deprecated
public static synchronized CarLoads instance() {
return InstanceManager.getDefault(CarLoads.class);
}

/**
* Add a car type with specific loads
*
Expand Down
12 changes: 0 additions & 12 deletions java/src/jmri/jmrit/operations/rollingstock/cars/CarManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,6 @@ public class CarManager extends RollingStockManager<Car> implements InstanceMana
public CarManager() {
}

/**
* Get the default instance of this class.
*
* @return the default instance of this class
* @deprecated since 4.9.2; use
* {@link jmri.InstanceManager#getDefault(java.lang.Class)} instead
*/
@Deprecated
public static synchronized CarManager instance() {
return InstanceManager.getDefault(CarManager.class);
}

/**
* Finds an existing Car or creates a new Car if needed requires car's road
* and number
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,6 @@ public class CarManagerXml extends OperationsXml implements InstanceManagerAutoD
public CarManagerXml() {
}

/**
* Get the default instance of this class.
*
* @return the default instance of this class
* @deprecated since 4.9.2; use
* {@link jmri.InstanceManager#getDefault(java.lang.Class)} instead
*/
@Deprecated
public static synchronized CarManagerXml instance() {
return InstanceManager.getDefault(CarManagerXml.class);
}

@Override
public void writeFile(String name) throws java.io.FileNotFoundException, java.io.IOException {
log.debug("writeFile {}", name);
Expand Down
12 changes: 0 additions & 12 deletions java/src/jmri/jmrit/operations/rollingstock/cars/CarOwners.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,6 @@ public class CarOwners extends RollingStockAttribute implements InstanceManagerA
public CarOwners() {
}

/**
* Get the default instance of this class.
*
* @return the default instance of this class
* @deprecated since 4.9.2; use
* {@link jmri.InstanceManager#getDefault(java.lang.Class)} instead
*/
@Deprecated
public static synchronized CarOwners instance() {
return InstanceManager.getDefault(CarOwners.class);
}

@Override
protected String getDefaultNames() {
return ""; // there aren't any
Expand Down
12 changes: 0 additions & 12 deletions java/src/jmri/jmrit/operations/rollingstock/cars/CarRoads.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,6 @@ public class CarRoads extends RollingStockAttribute implements InstanceManagerAu
public CarRoads() {
}

/**
* Get the default instance of this class.
*
* @return the default instance of this class
* @deprecated since 4.9.2; use
* {@link jmri.InstanceManager#getDefault(java.lang.Class)} instead
*/
@Deprecated
public static synchronized CarRoads instance() {
return InstanceManager.getDefault(CarRoads.class);
}

@Override
protected String getDefaultNames() {
return ROADS;
Expand Down
12 changes: 0 additions & 12 deletions java/src/jmri/jmrit/operations/rollingstock/cars/CarTypes.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,6 @@ public class CarTypes extends RollingStockAttribute implements InstanceManagerAu
public CarTypes() {
}

/**
* Get the default instance of this class.
*
* @return the default instance of this class
* @deprecated since 4.9.2; use
* {@link jmri.InstanceManager#getDefault(java.lang.Class)} instead
*/
@Deprecated
public static synchronized CarTypes instance() {
return InstanceManager.getDefault(CarTypes.class);
}

@Override
protected String getDefaultNames() {
if (Setup.getCarTypes().equals(Setup.AAR)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,6 @@ public class EngineLengths extends RollingStockAttribute implements InstanceMana
public EngineLengths() {
}

/**
* Get the default instance of this class.
*
* @return the default instance of this class
* @deprecated since 4.9.2; use
* {@link jmri.InstanceManager#getDefault(java.lang.Class)} instead
*/
@Deprecated
public static synchronized EngineLengths instance() {
return InstanceManager.getDefault(EngineLengths.class);
}

@Override
protected String getDefaultNames() {
return LENGTHS;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,6 @@ public class EngineManager extends RollingStockManager<Engine> implements Instan
public EngineManager() {
}

/**
* Get the default instance of this class.
*
* @return the default instance of this class
* @deprecated since 4.9.2; use
* {@link jmri.InstanceManager#getDefault(java.lang.Class)} instead
*/
@Deprecated
public static synchronized EngineManager instance() {
return InstanceManager.getDefault(EngineManager.class);
}

/**
* @return requested Engine object or null if none exists
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,6 @@ public class EngineManagerXml extends OperationsXml implements InstanceManagerAu
public EngineManagerXml() {
}

/**
* Get the default instance of this class.
*
* @return the default instance of this class
* @deprecated since 4.9.2; use
* {@link jmri.InstanceManager#getDefault(java.lang.Class)} instead
*/
@Deprecated
public static synchronized EngineManagerXml instance() {
return InstanceManager.getDefault(EngineManagerXml.class);
}

@Override
public void writeFile(String name) throws java.io.FileNotFoundException, java.io.IOException {
log.debug("writeFile {}", name);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,19 +68,6 @@ public class EngineModels extends RollingStockAttribute {
public EngineModels() {
}

/**
* Get the default instance of this class.
*
* @return the default instance of this class
* @deprecated since 4.9.2; use
* {@link jmri.InstanceManager#getDefault(java.lang.Class)}
* instead
*/
@Deprecated
public static synchronized EngineModels instance() {
return InstanceManager.getDefault(EngineModels.class);
}

@Override
protected String getDefaultNames() {
return MODELS;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,6 @@ public class EngineTypes extends RollingStockAttribute implements InstanceManage
public EngineTypes() {
}

/**
* Get the default instance of this class.
*
* @return the default instance of this class
* @deprecated since 4.9.2; use
* {@link jmri.InstanceManager#getDefault(java.lang.Class)} instead
*/
@Deprecated
public static synchronized EngineTypes instance() {
return InstanceManager.getDefault(EngineTypes.class);
}

@Override
protected String getDefaultNames() {
return TYPES;
Expand Down
Loading

0 comments on commit ccaf22b

Please sign in to comment.