mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-12-19 07:00:35 +08:00
style: include RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE (#6559)
This commit is contained in:
@@ -80,9 +80,6 @@
|
||||
<Match>
|
||||
<Bug pattern="SA_FIELD_SELF_ASSIGNMENT" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="AT_STALE_THREAD_WRITE_OF_PRIMITIVE" />
|
||||
</Match>
|
||||
|
||||
@@ -132,7 +132,7 @@ public class LFUCache<K, V> {
|
||||
private void addNodeWithUpdatedFrequency(Node node) {
|
||||
if (tail != null && head != null) {
|
||||
Node temp = this.head;
|
||||
while (temp != null) {
|
||||
while (true) {
|
||||
if (temp.frequency > node.frequency) {
|
||||
if (temp == head) {
|
||||
node.next = temp;
|
||||
|
||||
Reference in New Issue
Block a user