Project: JSword/BibleDesktop
FindBugs version: 1.3.9
Code analyzed:
31791 lines of code analyzed, in 816 classes, in 51 packages.
| Metric | Total | Density* |
|---|---|---|
| High Priority Warnings | 2 | 0.06 |
| Medium Priority Warnings | 2 | 0.06 |
| Low Priority Warnings | 7 | 0.22 |
| Total Warnings | 11 | 0.35 |
(* Defects per Thousand lines of non-commenting source statements)
| Warning Type | Number |
|---|---|
| Bad practice Warnings | 1 |
| Correctness Warnings | 2 |
| Performance Warnings | 1 |
| Dodgy Warnings | 7 |
| Total | 11 |
Click on a warning row to see full context information.
| Code | Warning |
|---|---|
| Se | Class org.crosswire.bibledesktop.desktop.Desktop defines non-transient non-serializable instance field actions |
| Code | Warning |
|---|---|
| NP | Non-virtual method call in new org.crosswire.jsword.versification.system.SystemLeningrad() passes null for nonnull parameter of new org.crosswire.jsword.versification.Versification(String, BibleBook[], BibleBook[], int[][], int[][]) |
| NP | Non-virtual method call in new org.crosswire.jsword.versification.system.SystemMT() passes null for nonnull parameter of new org.crosswire.jsword.versification.Versification(String, BibleBook[], BibleBook[], int[][], int[][]) |
| Code | Warning |
|---|---|
| SIC | Should org.crosswire.bibledesktop.passage.WholeBibleTreeNode$WholeBibleEnumeration be a _static_ inner class? |
| Code | Warning |
|---|---|
| ICAST | Result of integer multiplication cast to long in org.crosswire.jsword.book.sword.ZVerseBackend.contains(Key) |
| ICAST | Result of integer multiplication cast to long in org.crosswire.jsword.book.sword.ZVerseBackend.getRawText(Key) |
| NP | Load of known null value in org.crosswire.bibledesktop.passage.WholeBibleTreeNode.getNode(TreeNode, BibleBook, int, int) |
| RCN | Redundant nullcheck of loc, which is known to be non-null in org.crosswire.jsword.book.sword.AbstractBackend.getExpandedDataPath() |
| RCN | Redundant nullcheck of loc, which is known to be non-null in org.crosswire.jsword.book.sword.TreeKeyIndex.getExpandedDataPath() |
| UwF | ViewManager.contextActions not initialized in constructor |
| UwF | ViewManager.panel not initialized in constructor |
This code performs integer multiply and then converts the result to a long,
as in:
If the multiplication is done using long arithmetic, you can avoid
the possibility that the result will overflow. For example, you
could fix the above code to:
long convertDaysToMilliseconds(int days) { return 1000*3600*24*days; }
or
long convertDaysToMilliseconds(int days) { return 1000L*3600*24*days; }
static final long MILLISECONDS_PER_DAY = 24L*3600*1000;
long convertDaysToMilliseconds(int days) { return days * MILLISECONDS_PER_DAY; }
The variable referenced at this point is known to be null due to an earlier check against null. Although this is valid, it might be a mistake (perhaps you intended to refer to a different variable, or perhaps the earlier check to see if the variable is null should have been a check to see if it was nonnull).
A possibly-null value is passed to a nonnull method parameter. Either the parameter is annotated as a parameter that should always be nonnull, or analysis has shown that it will always be dereferenced.
This method contains a redundant check of a known non-null value against the constant null.
This Serializable class defines a non-primitive instance field which is neither transient,
Serializable, or java.lang.Object, and does not appear to implement
the Externalizable interface or the
readObject() and writeObject() methods.
Objects of this class will not be deserialized correctly if a non-Serializable
object is stored in this field.
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.
This field is never initialized within any constructor, and is therefore could be null after the object is constructed. This could be a either an error or a questionable design, since it means a null pointer exception will be generated if that field is dereferenced before being initialized.