Project: JSword/BibleDesktop
FindBugs version: 2.0.0
Code analyzed:
31828 lines of code analyzed, in 816 classes, in 51 packages.
| Metric | Total | Density* |
|---|---|---|
| High Priority Warnings | 8 | 0.25 |
| Medium Priority Warnings | 3 | 0.09 |
| Total Warnings | 11 | 0.35 |
(* Defects per Thousand lines of non-commenting source statements)
| Warning Type | Number |
|---|---|
| Bad practice Warnings | 2 |
| Internationalization Warnings | 8 |
| Performance Warnings | 1 |
| Total | 11 |
Click on a warning row to see full context information.
| Code | Warning |
|---|---|
| FS | Format string should use %n rather than \n in org.crosswire.jsword.book.sword.RawFileBackend.updateDataFile(long, File) |
| Se | The field org.crosswire.jsword.book.basic.DefaultBookmark.books is transient but isn't set by deserialization |
| Code | Warning |
|---|---|
| Dm | Found reliance on default encoding in org.crosswire.bibledesktop.book.BibleViewPane.open(): new java.io.FileReader(File) |
| Dm | Found reliance on default encoding in org.crosswire.bibledesktop.book.BibleViewPane.saveKey(Key): new java.io.FileWriter(File) |
| Dm | Found reliance on default encoding in org.crosswire.common.swing.ExceptionPane$CustomLister.valueChanged(ListSelectionEvent): new java.io.FileReader(File) |
| Dm | Found reliance on default encoding in org.crosswire.common.util.NetUtil.listByIndexFile(URI, URIFilter): new java.io.InputStreamReader(InputStream) |
| Dm | Found reliance on default encoding in org.crosswire.jsword.book.sword.AbstractBackend.decipher(byte[]): String.getBytes() |
| Dm | Found reliance on default encoding in org.crosswire.jsword.book.sword.RawFileBackend.getTextFilename(RandomAccessFile, DataIndex): new String(byte[], int, int) |
| Dm | Found reliance on default encoding in org.crosswire.jsword.book.sword.RawLDBackend.getRawText(DataEntry): String.getBytes() |
| Dm | Found reliance on default encoding in org.crosswire.jsword.book.sword.SwordUtil.decode(String, byte[], int, int, String): new String(byte[], int, int) |
| Code | Warning |
|---|---|
| SIC | Should org.crosswire.bibledesktop.passage.WholeBibleTreeNode$WholeBibleEnumeration be a _static_ inner class? |
Found a call to a method which will perform a byte to String (or String to byte) conversion, and will assume that the default platform encoding is suitable. This will cause the application behaviour to vary between platforms. Use an alternative API and specify a charset name or Charset object explicitly.
This format string include a newline character (\n). In format strings, it is generally preferable better to use %n, which will produce the platform-specific line separator.
This class contains a field that is updated at multiple places in the class, thus it seems to be part of the state of the class. However, since the field is marked as transient and not set in readObject or readResolve, it will contain the default value in any deserialized instance of the class.
This class is an inner class, but does not use its embedded reference to the object which created it. This reference makes the instances of the class larger, and may keep the reference to the creator object alive longer than necessary. If possible, the class should be made static.