Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
rhwood committed Aug 29, 2019
2 parents 7cd9d64 + b124fa0 commit 6b4e769
Show file tree
Hide file tree
Showing 582 changed files with 2,971 additions and 2,539 deletions.
5 changes: 1 addition & 4 deletions .classpath
Expand Up @@ -93,10 +93,7 @@
<classpathentry kind="lib" path="lib/websocket-common-9.4.7.v20170914.jar"/>
<classpathentry kind="lib" path="lib/websocket-server-9.4.7.v20170914.jar"/>
<classpathentry kind="lib" path="lib/websocket-servlet-9.4.7.v20170914.jar"/>
<classpathentry kind="lib" path="lib/pi4j-core.jar"/>
<classpathentry kind="lib" path="lib/pi4j-device.jar"/>
<classpathentry kind="lib" path="lib/pi4j-gpio-extension.jar"/>
<classpathentry kind="lib" path="lib/pi4j-service.jar"/>
<classpathentry kind="lib" path="lib/pi4j-core-1.2.jar"/>
<classpathentry kind="lib" path="lib/beansbinding-1.2.1.jar"/>
<classpathentry kind="lib" path="lib/hamcrest-core-1.3.jar"/>
<classpathentry kind="lib" path="lib/mockito-core-2.13.0.jar"/>
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -56,6 +56,7 @@ local.properties
*.original~
.metadata
RemoteSystemsTempFiles
.idea/libraries/**

# user-installed components
/web/TrainCrew
Expand Down
7 changes: 0 additions & 7 deletions .spotbugs-check.xml
Expand Up @@ -12,8 +12,6 @@
<Or>
<Bug pattern="IS2_INCONSISTENT_SYNC" />
<Bug pattern="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE" />
<Bug pattern="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD" />
<Bug pattern="WMI_WRONG_MAP_ITERATOR" />
</Or>
</Match>

Expand All @@ -23,16 +21,11 @@
<Or>
<Bug pattern="BC_UNCONFIRMED_CAST" />
<Bug pattern="BC_UNCONFIRMED_CAST_OF_RETURN_VALUE" />
<Bug pattern="DB_DUPLICATE_SWITCH_CLAUSES" />
<Bug pattern="IS2_INCONSISTENT_SYNC" />
<Bug pattern="LI_LAZY_INIT_STATIC" />
<Bug pattern="NO_NOTIFY_NOT_NOTIFYALL" />
<Bug pattern="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE" />
<Bug pattern="PZLA_PREFER_ZERO_LENGTH_ARRAYS" />
<Bug pattern="RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE" />
<Bug pattern="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD" />
<Bug pattern="UCF_USELESS_CONTROL_FLOW" />
<Bug pattern="UC_USELESS_CONDITION" />
<Bug pattern="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" />
<Bug pattern="UW_UNCOND_WAIT" />
<Bug pattern="WA_NOT_IN_LOOP" />
Expand Down
4 changes: 3 additions & 1 deletion .travis.yml
Expand Up @@ -18,6 +18,8 @@ services:
- xvfb

before_install:
# uncomment next line dump Travis CI environment variables into log
# - set | grep '^[A-Z].*='
# ensure no unwanted defaults are set
# see https://github.com/travis-ci/travis-ci/issues/4613#issuecomment-181845546
- export MAVEN_SKIP_RC="true"
Expand Down Expand Up @@ -61,7 +63,7 @@ env:
- MAVEN_OPTS=-Xmx1536m
# see http://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#runOrder for valid values
- RUN_ORDER=filesystem
- CC_TEST_REPORTER_ID=b584d95af6e0716d39b5117f5cbd365af573363628a7848b92b297a93c55fa42
- CC_TEST_REPORTER_ID=1d1326c4dfaeede878b46588cda440432d1dd6ec605d2c99af7b240ac7db0477
matrix:
- HEADLESS=false STATIC=false
- HEADLESS=true STATIC=false
Expand Down
5 changes: 1 addition & 4 deletions build.xml
Expand Up @@ -201,10 +201,7 @@
<pathelement location="${libdir}/slf4j-log4j12-1.7.25.jar"/>
<pathelement location="${libdir}/jul-to-slf4j-1.7.25.jar"/>
<pathelement location="${libdir}/xbee-java-library-1.2.1.jar"/>
<pathelement location="${libdir}/pi4j-core.jar"/>
<pathelement location="${libdir}/pi4j-device.jar"/>
<pathelement location="${libdir}/pi4j-gpio-extension.jar"/>
<pathelement location="${libdir}/pi4j-service.jar"/>
<pathelement location="${libdir}/pi4j-core-1.2.jar"/>
<pathelement location="${libdir}/commons-io-2.6.jar"/>
<pathelement location="${libdir}/bluecove-2.1.1-SNAPSHOT.jar"/>
<pathelement location="${libdir}/bluecove-bluez-2.1.1-SNAPSHOT.jar"/>
Expand Down
27 changes: 14 additions & 13 deletions help/en/html/doc/Technical/SpotBugs.shtml
Expand Up @@ -351,21 +351,22 @@ scanning through the code.
</dl>

<h4>Status and Counts</h4>
<p>Running this on JMRI 2.5.4 produced the following:</p>
<p>We've been making slow but continuous progress on removing these:</p>

<table border="1">
<tr><th>Category</th><th>JMRI 2.5.4</th><th>JMRI 4.13.3</th></tr>
<tr><td>Bad practice Warnings</td><td>164</td><td>13</td></tr>
<tr><td>Correctness Warnings</td><td>77</td><td></td></tr>
<tr><td>Experimental Warnings</td><td>7</td><td></td></tr>
<tr><td>Malicious code vulnerability Warnings</td><td>221</td><td>(disabled)</td></tr>
<tr><td>Multithreaded correctness Warnings</td><td>90</td><td>175</td></tr>
<tr><td>Performance Warnings</td><td>459</td><td>15</td></tr>
<tr><td>Style / Dodgy Code Warnings</td><td>304</td><td>406</td></tr>

<tr><th>Total</th><th>1322</th><th>636</th></tr>
<tr><th>Medium Priority</th><th></th><th>199</th></tr>
<tr><th>Low Priority</th><th></th><th>437</th></tr>
<tr><th>Category</th><th>JMRI 2.5.4</th><th>JMRI 4.13.3</th><th>JMRI 4.17.3</th></tr>
<tr><td>Bad practice Warnings</td><td>164</td><td>13</td><td></td></tr>
<tr><td>Correctness Warnings</td><td>77</td><td></td><td></td></tr>
<tr><td>Experimental Warnings</td><td>7</td><td></td><td></td></tr>
<tr><td>Malicious code vulnerability Warnings</td><td>221</td><td>(disabled)</td><td></td></tr>
<tr><td>Multithreaded correctness Warnings</td><td>90</td><td>175</td><td>165</td></tr>
<tr><td>Performance Warnings</td><td>459</td><td>15</td><td>1</td></tr>
<tr><td>Style / Dodgy Code Warnings</td><td>304</td><td>406</td><td>127</td></tr>

<tr><th>Total</th><th>1322</th><th>636</th><th>293</th></tr>
<tr><th>Medium Priority</th><th></th><th>199</th><th>79</th></tr>
<tr><th>Low Priority</th><th></th><th>437</th><th>214</th></tr>
<tr><th>@SuppressFBWarnings<br>Lines</th><th></th><th></th><th>868</th></tr>
</table>

<p>A lot of work has gone into JMRI
Expand Down
17 changes: 15 additions & 2 deletions help/en/html/hardware/loconet/PR4.shtml
Expand Up @@ -258,17 +258,30 @@
<img src="images/PR4LocoNetInterfaceConnProfile.png" alt="Sample configuration profile with PR4 as a LocoNet Interface" width="500">

<h2> PR4 as an interface to a Standalone LocoNet</h2>
<img src="images/PR4StandConnections.png" alt="Connections for PR4 connected to a Standalone LocoNet" width="350">

<p>The PR4 can also be used to connect JMRI to a <a href=
"StandaloneLocoNet.shtml">"standalone LocoNet"</a>, which may
"StandaloneLocoNet.shtml">"Standalone LocoNet"</a>, which may
be useful when LocoNet is used for some aspects of layout
control while some other control system is use for other
aspects. An example may be track occupancy detection and
signaling using Digitrax BDL168 and SE8C boards while
locomotive control is provided by a non-LocoNet DCC system.
More information on this advanced topic is available on the
<a href="StandaloneLocoNet.shtml">"Standalone LocoNet"</a>
<a href="StandaloneLocoNet.shtml">Standalone LocoNet</a>
page.</p>

<p>Note that the PR4 is unable to provide either
<a href="StandaloneLocoNet.shtml#railsyncgen">RailSync power</a> or
<a href="StandaloneLocoNet.shtml#dataterm">LocoNet data signal termination</a>
to the Standalone LocoNet. This is a significant departure from the PR3
design. If you replace a PR3 with a PR4 in a Standalone LocoNet
application, you will need to provide some other source of RailSync power and
LocoNet data termination the <a href="StandaloneLocoNet.shtml">
Standalone LocoNet</a> page for more details.</p>

<p>To set up JMRI to use the PR4 to connect to a Standalone LocoNet:</p>


<ul>
<li>Start the program.</li>
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
65 changes: 46 additions & 19 deletions help/en/package/jmri/jmrit/operations/Operations.shtml
Expand Up @@ -182,6 +182,8 @@
<li><a href="#TrackDestinations">Track Destinations</a></li>

<li><a href="#CreateClassificationYard">How to Create a Classification Yard</a></li>

<li><a href="#ExchangeBetweenFreightAndLocal">How to Exchange Cars Between Through Freight and Local Switcher</a></li>
</ul></li>

<li><a href="#Staging">Staging Tracks</a>
Expand Down Expand Up @@ -353,7 +355,7 @@
<li><a href="#SetupExcelProgram">Setup Excel Program (Manifest Creator)</a></li>
</ul></li>

<li><a href="#SwitcherService">Switcher Service</a></li>
<li><a href="#SwitcherService">Switcher Service (Local)</a></li>

<li><a href="#BuildingTrains">Building Trains</a></li>

Expand Down Expand Up @@ -1065,7 +1067,7 @@
longer since each pass by the program is documented.</p>

<a name="AllowLocalCarMovements" id="AllowLocalCarMovements"></a>
<h3>Switcher Service</h3>
<h3>Switcher Service (Local)</h3>
The next set of options control local car movements when using a <a href="#SwitcherService">switcher</a>
to service a location. A switcher only services one location. Normally it is better not to allow
a car to move from one spur directly to another spur at the same location when using a switcher.
Expand Down Expand Up @@ -2536,12 +2538,17 @@
The easiest way to create the exchange of cars between trains is to use a
classification/interchange track. A classification/interchange (C/I) track can be used for
classification, the movement of cars within the same railroad, and an interchange, the movement
of cars between railroads. Cars dropped off to a classification/interchange track by a train on a
given route will not be picked up by any train using that same route. Another train with a
different route is required to pick up the cars. For example, you might have a branch line that
picks up and set out cars from a terminal. By defining the track as a classification/interchange
track, once the branch line train delivers the cars, they will remain there until the main line
train stops to service the classification/interchange track.
of cars between railroads. Cars dropped off to a C/I track by a train on a given route will not
be picked up by any train using that same route. Another train with a different route is required
to pick up the cars. This includes transferring cars from a through freight to a local switcher.
For example, you might have a branch line that picks up and set out cars from a terminal. By
defining the track as a classification/interchange track, once the branch line train delivers the
cars, they will remain there until the main line train stops to service the
classification/interchange track. Same goes for a
<a href="#SwitcherService">local switcher</a>, cars dropped off at a location with a C/I track
will remain there until the local moves them to the spur tracks. When the local pulls cars for
the spur and places them on the C/I track, they will remain there until the main line train pulls
them.

<p>The car's load status does not change when placed at a classification/interchange track.</p>

Expand Down Expand Up @@ -2594,6 +2601,30 @@
href="#Pools">Track Pools</a> feature to share the track space in your yard.
</p>

<a name="ExchangeBetweenFreightAndLocal" id="ExchangeBetweenFreightAndLocal"></a>
<h3>How to Exchange Cars Between Through Freight and Local Switcher</h3>

If you would like your through freight to set out and pull cars to a track and have a local move
them to and from the various industries at that location, you would use an
classification/interchange (C/I) track to make the exchange. Create a C/I track that only
services the type of cars that the local industries can use when delivering cars to the spur
tracks. Deselect all the track direction controls for the tracks that will only be serviced by
the
<a href="#SwitcherService">local switcher</a>. Now when you build the through freight, you should
see that the manifest only shows cars being pulled or set out to the C/I track for that location.
One issue if you not using schedules and customs loads, is that cars are randomly placed on the
C/I track, meaning that if an industry need a certain type of car it might not be delivered to
the C/I track. One way to fix this problem is to create multiple C/I tracks for that location,
and restrict them to certain types of cars. For example, say a location's industries could use
two boxcars, and one tankcar. You would create two C/I tracks, one would be the length of two
boxcars, and only allow boxcars, the other would only allow tankcars, and would be the length of
one tankcar. Each C/I track could have the "same" name using the hyphen feature, for example you
could name the C/I boxcar track "Yard-(boxcars)", and the tankcar track "Yard-(tankcars)". Both
tracks would print as "Yard" on Manifests and switch lists. And finally to facilitate the
exchange of cars from the spur tracks to the through freight, create another C/I track that only
accepts set outs from the local switcher. The other solution is to use the
<a href="#PlannedPickUps">Planned Pick Ups</a> feature for both spur tracks.

<a name="Staging" id="Staging"></a>
<h3>Staging Tracks</h3>
Staging tracks are normally used to represent locations that generate traffic to and from your
Expand Down Expand Up @@ -4936,25 +4967,21 @@
</p>

<a name="SwitcherService" id="SwitcherService"></a>
<h3>Switcher Service</h3>
<h3>Switcher Service (Local)</h3>
Many operators assign a locomotive to a location to do the local switching. Using the location's
switch list allows the person assigned to the location to service all trains that stop at that
location. However, there can be locations that don't get enough work servicing through or local
location. However, there can be locations that don't get enough work servicing through
trains and it would be nice to create some additional work for the crew member assigned to that
location. To create a "switcher" job, create a route with just one location, the location that
location. To create a local "switcher" job, create a route with just one location, the location that
the switcher will service, and assign that route to a train. The "train" now becomes a switcher
that will only service that location. Adjust the "Move" count in the route to control how many
cars the switcher will service.

<p>Since a switcher only services a single location, the program ignores the train direction
<p>Since a local switcher only services a single location, the program ignores the train direction
control in the switcher's route, and therefore the location and track service direction controls
for a train are also ignored by the program.</p>

<p>Some operators like to produce a train Manifest that only shows set outs or pick ups from
a yard or interchange, and then have a switch list that shows moves between the yard and spurs.
To eliminate tracks from showing up on a train's Manifest, deselect all of the direction control
boxes for that track. Only a switcher will service a track that doesn't have any direction boxes
selected.</p>
for a train are also ignored by the program. If you only want a track to be serviced by a
switcher, deselect all the train direction controls for that track. Only a switcher will service
a track that doesn't have any direction boxes selected.</p>

<h4>Switcher Restrictions</h4>
<p>
Expand Down
6 changes: 3 additions & 3 deletions java/src/apps/Bundle.java
Expand Up @@ -3,7 +3,7 @@
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.util.Locale;
import javax.annotation.CheckReturnValue;
import javax.annotation.Nullable;
import javax.annotation.CheckForNull;
import javax.annotation.ParametersAreNonnullByDefault;

@ParametersAreNonnullByDefault
Expand All @@ -23,7 +23,7 @@
*/
public class Bundle extends jmri.Bundle {

@Nullable
@CheckForNull
private static final String name = "apps.AppsBundle"; // NOI18N

//
Expand Down Expand Up @@ -80,7 +80,7 @@ static String getMessage(Locale locale, String key, Object... subs) {
private final static Bundle b = new Bundle();

@Override
@Nullable
@CheckForNull
protected String bundleName() {
return name;
}
Expand Down
4 changes: 2 additions & 2 deletions java/src/apps/ConfigBundle.java
Expand Up @@ -2,7 +2,7 @@

import java.util.Locale;
import javax.annotation.CheckReturnValue;
import javax.annotation.Nullable;
import javax.annotation.CheckForNull;
import javax.annotation.ParametersAreNonnullByDefault;

@ParametersAreNonnullByDefault
Expand Down Expand Up @@ -78,7 +78,7 @@ static String getMessage(Locale locale, String key, Object... subs) {
private final static ConfigBundle b = new ConfigBundle();

@Override
@Nullable
@CheckForNull
protected String bundleName() {
return name;
}
Expand Down
6 changes: 3 additions & 3 deletions java/src/apps/DecoderPro/Bundle.java
Expand Up @@ -3,7 +3,7 @@
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.util.Locale;
import javax.annotation.CheckReturnValue;
import javax.annotation.Nullable;
import javax.annotation.CheckForNull;
import javax.annotation.ParametersAreNonnullByDefault;

@ParametersAreNonnullByDefault
Expand All @@ -23,7 +23,7 @@
*/
public class Bundle extends apps.Bundle {

@Nullable
@CheckForNull
private static final String name = null; // no local resources

//
Expand Down Expand Up @@ -62,7 +62,7 @@ static String getMessage(String key, Object... subs) {
private final static Bundle b = new Bundle();

@Override
@Nullable
@CheckForNull
protected String bundleName() {
return name;
}
Expand Down
6 changes: 3 additions & 3 deletions java/src/apps/DispatcherPro/Bundle.java
Expand Up @@ -3,7 +3,7 @@
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.util.Locale;
import javax.annotation.CheckReturnValue;
import javax.annotation.Nullable;
import javax.annotation.CheckForNull;
import javax.annotation.ParametersAreNonnullByDefault;

@ParametersAreNonnullByDefault
Expand All @@ -23,7 +23,7 @@
*/
public class Bundle extends apps.Bundle {

@Nullable
@CheckForNull
private static final String name = null; // no local resources

//
Expand Down Expand Up @@ -80,7 +80,7 @@ static String getMessage(String key, Object... subs) {
private final static Bundle b = new Bundle();

@Override
@Nullable
@CheckForNull
protected String bundleName() {
return name;
}
Expand Down
6 changes: 3 additions & 3 deletions java/src/apps/InstallTest/Bundle.java
Expand Up @@ -3,7 +3,7 @@
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.util.Locale;
import javax.annotation.CheckReturnValue;
import javax.annotation.Nullable;
import javax.annotation.CheckForNull;
import javax.annotation.ParametersAreNonnullByDefault;

@ParametersAreNonnullByDefault
Expand All @@ -23,7 +23,7 @@
*/
public class Bundle extends apps.Bundle {

@Nullable
@CheckForNull
private static final String name = null; // no local resources

//
Expand Down Expand Up @@ -80,7 +80,7 @@ static String getMessage(Locale locale, String key, Object... subs) {
private final static Bundle b = new Bundle();

@Override
@Nullable
@CheckForNull
protected String bundleName() {
return name;
}
Expand Down

0 comments on commit 6b4e769

Please sign in to comment.