Details
-
Bug
-
Status: Closed
-
Trivial
-
Resolution: Invalid
-
None
-
None
-
None
Description
Hi
In a recent Github mirror, I found conditions that are always true.
Path: jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/pool/BundleDbPersistenceManager.java
92 /** storage model modifier: binary keys */ 93 public static final int SM_BINARY_KEYS = 1; 94 ... 666 public int getStorageModel() { 667 return SM_BINARY_KEYS; 668 } ... 732 protected Object[] getKey(NodeId id) { 733 if (getStorageModel() == SM_BINARY_KEYS) { 734 return new Object[] { id.getRawBytes() }; 735 } else { 736 return new Object[] { 737 id.getMostSignificantBits(), id.getLeastSignificantBits () }; 738 } ...
The condition in Line 733 seems always return true. I've found similar lines in Line 754, 800, 852 and 1111. These are just trivial things but there are else blocks. As I thought the conditions should do something more rather than being always true, I'm reporting them just in case.
Thanks!