Skip to content
Permalink
Browse files
fixing spotbugs issues
  • Loading branch information
darkma773r committed Apr 30, 2022
1 parent ffc9ff9 commit 1c362b31d5c134c25a3ded73f5d1778216cc086c
Showing 2 changed files with 18 additions and 8 deletions.
@@ -103,7 +103,7 @@
/** Secondary tree root. */
private BucketNode<P, V> secondaryRoot;

/** Cached entry set instance. */
/** Cached entry set; instances are stateless so we need only one. */
private EntrySet entrySetInstance;

/** Version counter, used to track tree modifications. */
@@ -517,13 +517,6 @@ protected BucketNode(
this.entries = map.createEntryList();
}

/** Get the parent node or null if one does not exist.
* @return parent node or null if one does not exist.
*/
public BucketNode<P, V> getParent() {
return parent;
}

/** Get the index of this node in its parent, or {@code -1} if this
* node does not have a parent.
* @return index of this node in its parent, or {@code -1} if this
@@ -1007,6 +1000,13 @@ protected void splitNode() {
entries = null;
}

/** Get the parent node or null if one does not exist.
* @return parent node or null if one does not exist.
*/
protected BucketNode<P, V> getParent() {
return parent;
}

/** Get the precision context for the instance.
* @return precision context for the instance
*/
@@ -86,4 +86,14 @@
<BugPattern name="EI_EXPOSE_REP,EI_EXPOSE_REP2"/>
</Match>

<!--
AbstractBucketPointMap.entrySetInstance is stateless and can be cached and reused without
exposing implementation internals.
-->
<Match>
<Class name="org.apache.commons.geometry.core.internal.AbstractBucketPointMap" />
<Field name="entrySetInstance" />
<BugPattern name="EI_EXPOSE_REP"/>
</Match>

</FindBugsFilter>

0 comments on commit 1c362b3

Please sign in to comment.