Skip to content

Commit

Permalink
more class-no-init debug
Browse files Browse the repository at this point in the history
  • Loading branch information
bobjacobsen committed Apr 10, 2020
1 parent 9ace31d commit cbfdddb
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions java/src/jmri/jmrix/nce/NceMessage.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,16 @@
*/
public class NceMessage extends jmri.jmrix.AbstractMRMessage {

protected static final jmri.jmrix.nce.ncemon.NceMonBinary nceMon = new jmri.jmrix.nce.ncemon.NceMonBinary();

private final static org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(NceMessage.class); // called in static block
protected static final jmri.jmrix.nce.ncemon.NceMonBinary nceMon;
static {
try {
nceMon = new jmri.jmrix.nce.ncemon.NceMonBinary();
} catch (Throwable t) {
log.error("Thrown in NceMessage static init ",t);
throw t;
}
}
public static final int NOP_CMD = 0x80; //NCE NOP command
public static final int ASSIGN_CAB_CMD = 0x81; // NCE Assign loco to cab command, NCE-USB no
public static final int READ_CLOCK_CMD = 0x82; // NCE read clock command, NCE-USB no
Expand Down Expand Up @@ -619,6 +627,4 @@ public static NceMessage createAccDecoderPktOpsMode(NceTrafficController tc, int
public String toMonitorString(){
return nceMon.displayMessage(this);
}

private final static org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(NceMessage.class);
}

0 comments on commit cbfdddb

Please sign in to comment.