diff --git a/java/src/jmri/jmrix/AbstractSerialConnectionConfig.java b/java/src/jmri/jmrix/AbstractSerialConnectionConfig.java index 1317f009d1f..75cab2c6b74 100644 --- a/java/src/jmri/jmrix/AbstractSerialConnectionConfig.java +++ b/java/src/jmri/jmrix/AbstractSerialConnectionConfig.java @@ -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 entry : options.entrySet()) { adapter.setOptionState(entry.getKey(), entry.getValue().getItem()); } diff --git a/java/src/jmri/jmrix/AbstractSerialPortController.java b/java/src/jmri/jmrix/AbstractSerialPortController.java index 973a905f25f..187c67e2bcd 100644 --- a/java/src/jmri/jmrix/AbstractSerialPortController.java +++ b/java/src/jmri/jmrix/AbstractSerialPortController.java @@ -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; diff --git a/java/src/jmri/jmrix/SerialPortAdapter.java b/java/src/jmri/jmrix/SerialPortAdapter.java index 0a546e61673..b14fba3e7d8 100644 --- a/java/src/jmri/jmrix/SerialPortAdapter.java +++ b/java/src/jmri/jmrix/SerialPortAdapter.java @@ -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(); @@ -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); @@ -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); diff --git a/java/src/jmri/jmrix/cmri/serial/SerialNetworkPortAdapter.java b/java/src/jmri/jmrix/cmri/serial/SerialNetworkPortAdapter.java index 16007234e0c..b3709ed3a0f 100644 --- a/java/src/jmri/jmrix/cmri/serial/SerialNetworkPortAdapter.java +++ b/java/src/jmri/jmrix/cmri/serial/SerialNetworkPortAdapter.java @@ -16,4 +16,5 @@ protected SerialNetworkPortAdapter(CMRISystemConnectionMemo connectionMemo) { public CMRISystemConnectionMemo getSystemConnectionMemo() { return (CMRISystemConnectionMemo) super.getSystemConnectionMemo(); } + } diff --git a/java/src/jmri/jmrix/cmri/serial/SerialPortAdapter.java b/java/src/jmri/jmrix/cmri/serial/SerialPortAdapter.java index f970eae208d..f262e17ea43 100644 --- a/java/src/jmri/jmrix/cmri/serial/SerialPortAdapter.java +++ b/java/src/jmri/jmrix/cmri/serial/SerialPortAdapter.java @@ -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 */ @@ -28,4 +28,5 @@ protected SerialPortAdapter(SystemConnectionMemo connectionMemo) { // check that this object is ready to operate @Override public abstract boolean status(); + }