mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-11-07 11:29:44 +01:00
Remove some unused code
This commit is contained in:
parent
1a690dabd7
commit
d91355e4d6
@ -25,8 +25,6 @@
|
||||
|
||||
package me.lucko.luckperms.nukkit.inject.dummy;
|
||||
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
|
||||
import cn.nukkit.permission.PermissibleBase;
|
||||
import cn.nukkit.permission.Permission;
|
||||
import cn.nukkit.permission.PermissionAttachment;
|
||||
@ -34,14 +32,11 @@ import cn.nukkit.permission.PermissionAttachmentInfo;
|
||||
import cn.nukkit.plugin.Plugin;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.AbstractList;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.RandomAccess;
|
||||
import java.util.function.BiFunction;
|
||||
import java.util.function.Function;
|
||||
|
||||
@ -119,31 +114,4 @@ public class DummyPermissibleBase extends PermissibleBase {
|
||||
@Override public void clearPermissions() {}
|
||||
@Override public Map<String, PermissionAttachmentInfo> getEffectivePermissions() { return Collections.emptyMap(); }
|
||||
|
||||
// empty list impl that doesn't throw an exception on calls to #add
|
||||
private static final List EMPTY_LIST = new EmptyList<>();
|
||||
private static class EmptyList<E> extends AbstractList<E> implements RandomAccess {
|
||||
|
||||
@Override
|
||||
public boolean add(E e) {
|
||||
// do nothing, but don't throw an exception
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addAll(@NonNull Collection<? extends E> c) {
|
||||
// do nothing
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public E get(int index) {
|
||||
throw new IndexOutOfBoundsException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int size() {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user