mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
some nullity annos
This commit is contained in:
@@ -48,7 +48,7 @@ public class RareLogger extends Logger {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void put(Object key, Long value) {
|
||||
public void put(Object key, @NotNull Long value) {
|
||||
if (fairSynch) {
|
||||
synchronized (lock) {
|
||||
super.put(key, value);
|
||||
|
||||
@@ -21,14 +21,15 @@ package com.intellij.util.containers;
|
||||
|
||||
import com.intellij.util.Consumer;
|
||||
import com.intellij.util.containers.hash.LinkedHashMap;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
public class SLRUMap<K,V> {
|
||||
protected final Map<K,V> myProtectedQueue;
|
||||
protected final Map<K,V> myProbationalQueue;
|
||||
protected final LinkedHashMap<K,V> myProtectedQueue;
|
||||
protected final LinkedHashMap<K,V> myProbationalQueue;
|
||||
|
||||
private final int myProtectedQueueSize;
|
||||
private final int myProbationalQueueSize;
|
||||
@@ -83,7 +84,7 @@ public class SLRUMap<K,V> {
|
||||
return null;
|
||||
}
|
||||
|
||||
public void put(K key, V value) {
|
||||
public void put(K key, @NotNull V value) {
|
||||
V oldValue = myProtectedQueue.remove(key);
|
||||
if (oldValue != null) {
|
||||
onDropFromCache(key, oldValue);
|
||||
|
||||
@@ -57,7 +57,7 @@ public class ContentRevisionCache {
|
||||
myCounter = 0;
|
||||
}
|
||||
|
||||
private void put(FilePath path, VcsRevisionNumber number, @NotNull VcsKey vcsKey, @NotNull UniqueType type, final byte[] bytes) {
|
||||
private void put(FilePath path, VcsRevisionNumber number, @NotNull VcsKey vcsKey, @NotNull UniqueType type, @Nullable final byte[] bytes) {
|
||||
if (bytes == null) return;
|
||||
synchronized (myLock) {
|
||||
myCache.put(new Key(path, number, vcsKey, type), bytes);
|
||||
@@ -247,10 +247,6 @@ public class ContentRevisionCache {
|
||||
return myPath;
|
||||
}
|
||||
|
||||
public VcsKey getVcsKey() {
|
||||
return myVcsKey;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
|
||||
Reference in New Issue
Block a user