The following document contains the results of FindBugs
FindBugs Version is 3.0.1
Threshold is experimental
Effort is max
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Switch statement found in net.sf.mbus4j.Connection.readObject(ObjectInputStream) where default case is missing | STYLE | SF_SWITCH_NO_DEFAULT | 168-170 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Class net.sf.mbus4j.MBusAddressing implements same interface as superclass | STYLE | RI_REDUNDANT_INTERFACES | 36-56 | Low |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Found reliance on default encoding in net.sf.mbus4j.MBusUtils.man2Short(String): String.getBytes() | I18N | DM_DEFAULT_ENCODING | 68 | High |
The method name net.sf.mbus4j.MBusUtils.String2Bcd(String) doesn't start with a lower case letter | BAD_PRACTICE | NM_METHOD_NAMING_CONVENTION | 74-79 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Switch statement found in net.sf.mbus4j.SerialPortConnection.readObject(ObjectInputStream) where default case is missing | STYLE | SF_SWITCH_NO_DEFAULT | 127-132 | Medium |
SerialPortConnection.sPort not initialized in constructor and dereferenced in net.sf.mbus4j.SerialPortConnection.close() | STYLE | UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR | 98 | Low |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Switch statement found in net.sf.mbus4j.TcpIpConnection.readObject(ObjectInputStream) where default case is missing | STYLE | SF_SWITCH_NO_DEFAULT | 126-128 | Medium |
TcpIpConnection.socket not initialized in constructor and dereferenced in net.sf.mbus4j.TcpIpConnection.close() | STYLE | UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR | 79 | Low |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
net.sf.mbus4j.dataframes.ApplicationReset defines equals and uses Object.hashCode() | BAD_PRACTICE | HE_EQUALS_USE_HASHCODE | 260-266 | High |
Format string should use %n rather than \n in net.sf.mbus4j.dataframes.ApplicationReset.toString() | BAD_PRACTICE | VA_FORMAT_STRING_USES_NEWLINE | 251 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
net.sf.mbus4j.dataframes.ApplicationReset$1.next() can't throw NoSuchElementException | BAD_PRACTICE | IT_NO_SUCH_ELEMENT | 200 | Low |
The class net.sf.mbus4j.dataframes.ApplicationReset$1 could be refactored into a named _static_ inner class | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC_ANON | 192-205 | Low |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
net.sf.mbus4j.dataframes.GeneralApplicationError.RSP_UD_SUBTYPE isn't final but should be | MALICIOUS_CODE | MS_SHOULD_BE_FINAL | 43 | High |
GeneralApplicationError.error not initialized in constructor and dereferenced in net.sf.mbus4j.dataframes.GeneralApplicationError.toJSON(JsonSerializeType) | STYLE | UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR | 54 | Low |
Format string should use %n rather than \n in net.sf.mbus4j.dataframes.GeneralApplicationError.toString() | BAD_PRACTICE | VA_FORMAT_STRING_USES_NEWLINE | 238 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
net.sf.mbus4j.dataframes.GeneralApplicationError$1.next() can't throw NoSuchElementException | BAD_PRACTICE | IT_NO_SUCH_ELEMENT | 184 | Low |
The class net.sf.mbus4j.dataframes.GeneralApplicationError$1 could be refactored into a named _static_ inner class | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC_ANON | 175-189 | Low |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Format string should use %n rather than \n in net.sf.mbus4j.dataframes.RequestClassXData.toString() | BAD_PRACTICE | VA_FORMAT_STRING_USES_NEWLINE | 102 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Format string should use %n rather than \n in net.sf.mbus4j.dataframes.SelectionOfSlaves.toString() | BAD_PRACTICE | VA_FORMAT_STRING_USES_NEWLINE | 214 | Medium |
Format string should use %n rather than \n in net.sf.mbus4j.dataframes.SelectionOfSlaves.toString() | BAD_PRACTICE | VA_FORMAT_STRING_USES_NEWLINE | 215 | Medium |
Format string should use %n rather than \n in net.sf.mbus4j.dataframes.SelectionOfSlaves.toString() | BAD_PRACTICE | VA_FORMAT_STRING_USES_NEWLINE | 216 | Medium |
Format string should use %n rather than \n in net.sf.mbus4j.dataframes.SelectionOfSlaves.toString() | BAD_PRACTICE | VA_FORMAT_STRING_USES_NEWLINE | 218 | Medium |
Format string should use %n rather than \n in net.sf.mbus4j.dataframes.SelectionOfSlaves.toString() | BAD_PRACTICE | VA_FORMAT_STRING_USES_NEWLINE | 217 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Format string should use %n rather than \n in net.sf.mbus4j.dataframes.SendUserData.toString() | BAD_PRACTICE | VA_FORMAT_STRING_USES_NEWLINE | 111 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Format string should use %n rather than \n in net.sf.mbus4j.dataframes.SetBaudrate.toString() | BAD_PRACTICE | VA_FORMAT_STRING_USES_NEWLINE | 104 | Medium |
Format string should use %n rather than \n in net.sf.mbus4j.dataframes.SetBaudrate.toString() | BAD_PRACTICE | VA_FORMAT_STRING_USES_NEWLINE | 105 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Format string should use %n rather than \n in net.sf.mbus4j.dataframes.SynchronizeAction.toString() | BAD_PRACTICE | VA_FORMAT_STRING_USES_NEWLINE | 88 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
net.sf.mbus4j.dataframes.UserDataResponse.getStatus() may expose internal representation by returning UserDataResponse.status | MALICIOUS_CODE | EI_EXPOSE_REP | 291 | Medium |
net.sf.mbus4j.dataframes.UserDataResponse.setStatus(UserDataResponse$StatusCode[]) may expose internal representation by storing an externally mutable object into UserDataResponse.status | MALICIOUS_CODE | EI_EXPOSE_REP2 | 377 | Medium |
UserDataResponse.medium not initialized in constructor and dereferenced in net.sf.mbus4j.dataframes.UserDataResponse.toString() | STYLE | UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR | 398 | Low |
Format string should use %n rather than \n in net.sf.mbus4j.dataframes.UserDataResponse.toString() | BAD_PRACTICE | VA_FORMAT_STRING_USES_NEWLINE | 390 | Medium |
Format string should use %n rather than \n in net.sf.mbus4j.dataframes.UserDataResponse.toString() | BAD_PRACTICE | VA_FORMAT_STRING_USES_NEWLINE | 402 | Medium |
Format string should use %n rather than \n in net.sf.mbus4j.dataframes.UserDataResponse.toString() | BAD_PRACTICE | VA_FORMAT_STRING_USES_NEWLINE | 391 | Medium |
Format string should use %n rather than \n in net.sf.mbus4j.dataframes.UserDataResponse.toString() | BAD_PRACTICE | VA_FORMAT_STRING_USES_NEWLINE | 397 | Medium |
Format string should use %n rather than \n in net.sf.mbus4j.dataframes.UserDataResponse.toString() | BAD_PRACTICE | VA_FORMAT_STRING_USES_NEWLINE | 395 | Medium |
Format string should use %n rather than \n in net.sf.mbus4j.dataframes.UserDataResponse.toString() | BAD_PRACTICE | VA_FORMAT_STRING_USES_NEWLINE | 393 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
net.sf.mbus4j.dataframes.datablocks.BigDecimalDataBlock is Serializable; consider declaring a serialVersionUID | BAD_PRACTICE | SE_NO_SERIALVERSIONID | 43-79 | Low |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
net.sf.mbus4j.dataframes.datablocks.ByteDataBlock is Serializable; consider declaring a serialVersionUID | BAD_PRACTICE | SE_NO_SERIALVERSIONID | 46-148 | Low |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
instanceof will always return true for all non-null values in net.sf.mbus4j.dataframes.datablocks.DataBlock.vifesFromJSON(VifTypes, JSONArray), since all net.sf.json.JSONArray are instances of net.sf.json.JSONArray | STYLE | BC_VACUOUS_INSTANCEOF | 258 | Medium |
net.sf.mbus4j.dataframes.datablocks.DataBlock.getVifes() may expose internal representation by returning DataBlock.vifes | MALICIOUS_CODE | EI_EXPOSE_REP | 379 | Medium |
net.sf.mbus4j.dataframes.datablocks.DataBlock.vifesFromJSON(VifTypes, JSONArray) does an unnecessary type check using instanceof operator when it can be determined statically | CORRECTNESS | SIO_SUPERFLUOUS_INSTANCEOF | 258 | Low |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
net.sf.mbus4j.dataframes.datablocks.DateAndTimeDataBlock.getValue() may expose internal representation by returning DateAndTimeDataBlock.value | MALICIOUS_CODE | EI_EXPOSE_REP | 75 | Medium |
net.sf.mbus4j.dataframes.datablocks.DateAndTimeDataBlock.setValue(Date) may expose internal representation by storing an externally mutable object into DateAndTimeDataBlock.value | MALICIOUS_CODE | EI_EXPOSE_REP2 | 151 | Medium |
net.sf.mbus4j.dataframes.datablocks.DateAndTimeDataBlock is Serializable; consider declaring a serialVersionUID | BAD_PRACTICE | SE_NO_SERIALVERSIONID | 47-241 | Low |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
net.sf.mbus4j.dataframes.datablocks.DateDataBlock.getValue() may expose internal representation by returning DateDataBlock.value | MALICIOUS_CODE | EI_EXPOSE_REP | 70 | Medium |
net.sf.mbus4j.dataframes.datablocks.DateDataBlock.setValue(Date) may expose internal representation by storing an externally mutable object into DateDataBlock.value | MALICIOUS_CODE | EI_EXPOSE_REP2 | 82 | Medium |
net.sf.mbus4j.dataframes.datablocks.DateDataBlock is Serializable; consider declaring a serialVersionUID | BAD_PRACTICE | SE_NO_SERIALVERSIONID | 47-110 | Low |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
net.sf.mbus4j.dataframes.datablocks.EmptyDataBlock is Serializable; consider declaring a serialVersionUID | BAD_PRACTICE | SE_NO_SERIALVERSIONID | 38-48 | Low |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
net.sf.mbus4j.dataframes.datablocks.EnhancedIdentificationDataBlock is Serializable; consider declaring a serialVersionUID | BAD_PRACTICE | SE_NO_SERIALVERSIONID | 48-157 | Low |
Format string should use %n rather than \n in net.sf.mbus4j.dataframes.datablocks.EnhancedIdentificationDataBlock.toString(StringBuilder, String) | BAD_PRACTICE | VA_FORMAT_STRING_USES_NEWLINE | 118 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
net.sf.mbus4j.dataframes.datablocks.IntegerDataBlock is Serializable; consider declaring a serialVersionUID | BAD_PRACTICE | SE_NO_SERIALVERSIONID | 48-158 | Low |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
net.sf.mbus4j.dataframes.datablocks.LongDataBlock is Serializable; consider declaring a serialVersionUID | BAD_PRACTICE | SE_NO_SERIALVERSIONID | 46-151 | Low |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
net.sf.mbus4j.dataframes.datablocks.RawDataBlock.getValue() may expose internal representation by returning RawDataBlock.value | MALICIOUS_CODE | EI_EXPOSE_REP | 50 | Medium |
net.sf.mbus4j.dataframes.datablocks.RawDataBlock.setValue(byte[]) may expose internal representation by storing an externally mutable object into RawDataBlock.value | MALICIOUS_CODE | EI_EXPOSE_REP2 | 68 | Medium |
net.sf.mbus4j.dataframes.datablocks.RawDataBlock is Serializable; consider declaring a serialVersionUID | BAD_PRACTICE | SE_NO_SERIALVERSIONID | 43-108 | Low |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
net.sf.mbus4j.dataframes.datablocks.ReadOutDataBlock is Serializable; consider declaring a serialVersionUID | BAD_PRACTICE | SE_NO_SERIALVERSIONID | 38-48 | Low |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
net.sf.mbus4j.dataframes.datablocks.RealDataBlock is Serializable; consider declaring a serialVersionUID | BAD_PRACTICE | SE_NO_SERIALVERSIONID | 45-86 | Low |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
net.sf.mbus4j.dataframes.datablocks.ShortDataBlock is Serializable; consider declaring a serialVersionUID | BAD_PRACTICE | SE_NO_SERIALVERSIONID | 46-148 | Low |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
net.sf.mbus4j.dataframes.datablocks.StringDataBlock is Serializable; consider declaring a serialVersionUID | BAD_PRACTICE | SE_NO_SERIALVERSIONID | 43-74 | Low |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
net.sf.mbus4j.dataframes.datablocks.VariableLengthDataBlock is Serializable; consider declaring a serialVersionUID | BAD_PRACTICE | SE_NO_SERIALVERSIONID | 38-48 | Low |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Suspicious comparison of Integer references in net.sf.mbus4j.dataframes.datablocks.vif.VifFB.assemble(String, UnitOfMeasurement, SiPrefix, Integer) | CORRECTNESS | RC_REF_COMPARISON | 257 | Low |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Incorrect lazy initialization and update of static field net.sf.mbus4j.dataframes.datablocks.vif.VifFD.map in net.sf.mbus4j.dataframes.datablocks.vif.VifFD.valueOfTableIndex(byte) | MT_CORRECTNESS | LI_LAZY_INIT_UPDATE_STATIC | 188-189 | High |
Suspicious comparison of Integer references in net.sf.mbus4j.dataframes.datablocks.vif.VifFD.assemble(String, UnitOfMeasurement, SiPrefix, Integer) | CORRECTNESS | RC_REF_COMPARISON | 271 | Low |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Suspicious comparison of Integer references in net.sf.mbus4j.dataframes.datablocks.vif.VifPrimary.assemble(String, UnitOfMeasurement, SiPrefix, Integer) | CORRECTNESS | RC_REF_COMPARISON | 292 | Low |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
net.sf.mbus4j.decoder.Decoder.addByte(byte) uses the same code for two switch clauses | STYLE | DB_DUPLICATE_SWITCH_CLAUSES | 219-220 | Low |
Switch statement found in net.sf.mbus4j.decoder.Decoder.addByte(byte) where one case falls through to the next case | STYLE | SF_SWITCH_FALLTHROUGH | 497-501 | Medium |
Switch statement found in net.sf.mbus4j.decoder.Decoder.addByte(byte) where default case is missing | STYLE | SF_SWITCH_NO_DEFAULT | 395-409 | Medium |
Private method net.sf.mbus4j.decoder.Decoder.bcd2Int(byte[]) is never called | PERFORMANCE | UPM_UNCALLED_PRIVATE_METHOD | 516-525 | Low |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
net.sf.mbus4j.decoder.Stack.popBytes() may expose internal representation by returning Stack.data | MALICIOUS_CODE | EI_EXPOSE_REP | 185 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Possible bad parsing of shift operation in net.sf.mbus4j.decoder.VariableDataBlockDecoder.decodeDIFE(byte, int) | CORRECTNESS | BSHIFT_WRONG_ADD_PRIORITY | 332 | Low |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
net.sf.mbus4j.encoder.Encoder.encodeFrame(ControlFrame) may expose internal representation by returning Encoder.data | MALICIOUS_CODE | EI_EXPOSE_REP | 105 | Medium |
net.sf.mbus4j.encoder.Encoder.encodeFrame(LongFrame) may expose internal representation by returning Encoder.data | MALICIOUS_CODE | EI_EXPOSE_REP | 129 | Medium |
net.sf.mbus4j.encoder.Encoder.encodeFrame(ShortFrame) may expose internal representation by returning Encoder.data | MALICIOUS_CODE | EI_EXPOSE_REP | 137 | Medium |
net.sf.mbus4j.encoder.Encoder.encodeFrame(SingleCharFrame) may expose internal representation by returning Encoder.data | MALICIOUS_CODE | EI_EXPOSE_REP | 142 | Medium |
Should net.sf.mbus4j.encoder.Encoder.encode(Frame) return a zero length array rather than null? | STYLE | PZLA_PREFER_ZERO_LENGTH_ARRAYS | 95 | Low |
Switch statement found in net.sf.mbus4j.encoder.Encoder.pushCIField(ControlFrame) where default case is missing | STYLE | SF_SWITCH_NO_DEFAULT | 318-342 | Medium |
Unread field: net.sf.mbus4j.encoder.Encoder.log | PERFORMANCE | URF_UNREAD_FIELD | 83 | Low |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Exception is caught when Exception is not thrown in net.sf.mbus4j.log.LogUtils.initJul() | STYLE | REC_CATCH_EXCEPTION | 74 | |
Exception is caught when Exception is not thrown in net.sf.mbus4j.log.LogUtils.initJulFromResource(String) | STYLE | REC_CATCH_EXCEPTION | 66 |