mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 22:51:17 +07:00
33 lines
1.0 KiB
Java
33 lines
1.0 KiB
Java
// "Fix all 'Redundant usage of unmodifiable collection wrappers' problems in file" "true"
|
|
|
|
import java.util.*;
|
|
|
|
class Main {
|
|
|
|
public static void main(String[] args) {
|
|
Collection unmodifiableCollection = Collections.unmodifiableCollecti<caret>on(getEmptyList());
|
|
|
|
List unmodifiableList = Collections.unmodifiableList(getEmptyList());
|
|
Set unmodifiableSet = Collections.unmodifiableSet(getEmptySet());
|
|
Map unmodifiableMap = Collections.unmodifiableMap(getEmptyMap());
|
|
|
|
SortedSet unmodifiableSortedSet = Collections.unmodifiableSortedSet(getEmptySet());
|
|
SortedMap unmodifiableSortedMap = Collections.unmodifiableSortedMap(getEmptyMap());
|
|
|
|
NavigableSet unmodifiableNavigableSet = Collections.unmodifiableNavigableSet(getEmptySet());
|
|
NavigableMap unmodifiableNavigableMap = Collections.unmodifiableNavigableMap(getEmptyMap());
|
|
}
|
|
|
|
static List getEmptyList() {
|
|
return Collections.emptyList();
|
|
}
|
|
|
|
static Set getEmptySet() {
|
|
return Collections.emptySet();
|
|
}
|
|
|
|
static Map getEmptyMap() {
|
|
return Collections.emptyMap();
|
|
}
|
|
}
|