Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
remove unneeded cast, javadoc
  • Loading branch information
silverailscolo committed Jun 18, 2019
1 parent 32d5d90 commit d73a8a0
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion java/src/jmri/jmrix/AbstractSerialConnectionConfig.java
Expand Up @@ -159,7 +159,7 @@ public void focusLost(FocusEvent e) {
public void updateAdapter() {
log.debug("updateAdapter() to {}", systemPrefixField.getText());
adapter.setPort(PortNameMapper.getPortFromName((String) portBox.getSelectedItem()));
adapter.configureBaudIndex((int) baudBox.getSelectedIndex()); // manage by index, not item value
adapter.configureBaudIndex(baudBox.getSelectedIndex()); // manage by index, not item value
for (Map.Entry<String, Option> entry : options.entrySet()) {
adapter.setOptionState(entry.getKey(), entry.getValue().getItem());
}
Expand Down
2 changes: 1 addition & 1 deletion java/src/jmri/jmrix/AbstractSerialPortController.java
Expand Up @@ -152,7 +152,7 @@ public void configureBaudNumber(String indexString) {
int index = 0;
String[] rates = validBaudRates();
int[] numbers = validBaudNumbers();
if (numbers == null || numbers.length == 0) { // simulators return null TODO for SpotBugs make that into an empty array
if ((numbers == null) || (numbers.length == 0)) { // simulators return null TODO for SpotBugs make that into an empty array
mBaudRate = null;
log.debug("no serial port speed values received (OK for simulator)");
return;
Expand Down
14 changes: 7 additions & 7 deletions java/src/jmri/jmrix/SerialPortAdapter.java
Expand Up @@ -27,7 +27,7 @@ public interface SerialPortAdapter extends PortAdapter {
public String openPort(String portName, String appName);

/**
* Configure all of the other jmrix widgets needed to work with this adapter
* Configure all of the other jmrix widgets needed to work with this adapter.
*/
@Override
public void configure();
Expand Down Expand Up @@ -86,28 +86,28 @@ public interface SerialPortAdapter extends PortAdapter {

/**
* Set the first port option. Only to be used after construction, but before
* the openPort call
* the openPort call.
*/
@Override
public void configureOption1(String value);

/**
* Set the second port option. Only to be used after construction, but
* before the openPort call
* before the openPort call.
*/
@Override
public void configureOption2(String value);

/**
* Set the third port option. Only to be used after construction, but before
* the openPort call
* the openPort call.
*/
@Override
public void configureOption3(String value);

/**
* Set the fourth port option. Only to be used after construction, but
* before the openPort call
* before the openPort call.
*/
@Override
public void configureOption4(String value);
Expand All @@ -120,13 +120,13 @@ public interface SerialPortAdapter extends PortAdapter {
public String handlePortBusy(PortInUseException p, String portName, Logger log);

/**
* Return the System Manufacturers Name
* Get the System Manufacturers Name.
*/
@Override
public String getManufacturer();

/**
* Set the System Manufacturers Name
* Set the System Manufacturers Name.
*/
@Override
public void setManufacturer(String Manufacturer);
Expand Down
Expand Up @@ -16,4 +16,5 @@ protected SerialNetworkPortAdapter(CMRISystemConnectionMemo connectionMemo) {
public CMRISystemConnectionMemo getSystemConnectionMemo() {
return (CMRISystemConnectionMemo) super.getSystemConnectionMemo();
}

}
3 changes: 2 additions & 1 deletion java/src/jmri/jmrix/cmri/serial/SerialPortAdapter.java
Expand Up @@ -5,7 +5,7 @@
import jmri.jmrix.SystemConnectionMemo;

/**
* Abstract base for classes representing a CMRI communications port
* Abstract base for classes representing a CMRI communications port.
*
* @author Bob Jacobsen Copyright (C) 2001
*/
Expand All @@ -28,4 +28,5 @@ protected SerialPortAdapter(SystemConnectionMemo connectionMemo) {
// check that this object is ready to operate
@Override
public abstract boolean status();

}

0 comments on commit d73a8a0

Please sign in to comment.