The following document contains the results of SpotBugs
SpotBugs Version is 3.1.12
Threshold is medium
Effort is default
Classes | Bugs | Errors | Missing Classes |
---|---|---|---|
19 | 20 | 0 | 0 |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.sim0mq.demo.Client.main(String[]) invokes inefficient new Short(short) constructor; use Short.valueOf(short) instead | PERFORMANCE | DM_NUMBER_CTOR | 44 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.sim0mq.demo.RouterToReqExample$1.run() invokes System.exit(...), which shuts down the entire virtual machine | BAD_PRACTICE | DM_EXIT | 221 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Found reliance on default encoding in org.sim0mq.demo.RouterToReqExample$Worker.run(): String.getBytes() | I18N | DM_DEFAULT_ENCODING | 80 | High |
Format string should use %n rather than \n in org.sim0mq.demo.RouterToReqExample$Worker.run() | BAD_PRACTICE | VA_FORMAT_STRING_USES_NEWLINE | 135 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
new org.sim0mq.demo.mm1.MM1FederationManager20(String, int, String, int, String) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 157 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Possible null pointer dereference of stateMachine in org.sim0mq.demo.mm1.MM1FederationManager20$1.run() on exception path | CORRECTNESS | NP_NULL_ON_SOME_PATH_EXCEPTION | 142 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Found reliance on default encoding in new org.sim0mq.demo.mm1.MM1FederationManager20$StateMachine(AtomicLong, String, String, int, String, int): String.getBytes() | I18N | DM_DEFAULT_ENCODING | 219 | High |
Bad attempt to compute absolute value of signed 32-bit hashcode in org.sim0mq.demo.mm1.MM1FederationManager20$StateMachine.setParameters(String) | CORRECTNESS | RV_ABSOLUTE_VALUE_OF_HASHCODE | 380 | High |
org.sim0mq.demo.mm1.MM1FederationManager20$StateMachine.setParameters(String) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 389 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
instanceof will always return true for all non-null values in org.sim0mq.demo.mm1.MM1Queue41Application.processSimRunControl(String, FM2SimRunControlMessage), since all org.sim0mq.message.types.NumberDuration are instances of Number | STYLE | BC_VACUOUS_INSTANCEOF | 224 | Medium |
org.sim0mq.demo.mm1.MM1Queue41Application.processKillFederate() invokes System.exit(...), which shuts down the entire virtual machine | BAD_PRACTICE | DM_EXIT | 436 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
new org.sim0mq.demo.reqrep.Rep(String[]) invokes System.exit(...), which shuts down the entire virtual machine | BAD_PRACTICE | DM_EXIT | 30 | Medium |
new org.sim0mq.demo.reqrep.Rep(String[]) invokes org.sim0mq.demo.reqrep.Rep$RepThread.start() | MT_CORRECTNESS | SC_START_IN_CTOR | 41 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Should org.sim0mq.demo.reqrep.Rep$RepThread be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 70-144 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
new org.sim0mq.demo.reqrep.Req(String[]) invokes System.exit(...), which shuts down the entire virtual machine | BAD_PRACTICE | DM_EXIT | 38 | Medium |
new org.sim0mq.demo.reqrep.Req(String[]) invokes org.sim0mq.demo.reqrep.Req$ReqThread.start() | MT_CORRECTNESS | SC_START_IN_CTOR | 50 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Found reliance on default encoding in org.sim0mq.test.Tic.byte2string(byte[]): new String(byte[]) | I18N | DM_DEFAULT_ENCODING | 88 | High |
Found reliance on default encoding in org.sim0mq.test.Tic.string2byte(String): String.getBytes() | I18N | DM_DEFAULT_ENCODING | 77 | High |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Found reliance on default encoding in org.sim0mq.test.TicPush.byte2string(byte[]): new String(byte[]) | I18N | DM_DEFAULT_ENCODING | 84 | High |
Found reliance on default encoding in org.sim0mq.test.TicPush.string2byte(String): String.getBytes() | I18N | DM_DEFAULT_ENCODING | 73 | High |