Remove lombok from the project

This commit is contained in:
Luck
2018-01-07 18:40:02 +00:00
Unverified
parent 17ff9ac328
commit f646c04d09
398 changed files with 8482 additions and 4818 deletions
@@ -25,9 +25,8 @@
package me.lucko.luckperms.api;
import com.google.common.base.Preconditions;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nonnull;
@@ -45,13 +44,13 @@ public enum ChatMetaType {
PREFIX("prefix") {
@Override
public boolean matches(@Nonnull Node node) {
return Preconditions.checkNotNull(node, "node").isPrefix();
return Objects.requireNonNull(node, "node").isPrefix();
}
@Nonnull
@Override
public Map.Entry<Integer, String> getEntry(@Nonnull Node node) {
return Preconditions.checkNotNull(node, "node").getPrefix();
return Objects.requireNonNull(node, "node").getPrefix();
}
},
@@ -61,13 +60,13 @@ public enum ChatMetaType {
SUFFIX("suffix") {
@Override
public boolean matches(@Nonnull Node node) {
return Preconditions.checkNotNull(node, "node").isSuffix();
return Objects.requireNonNull(node, "node").isSuffix();
}
@Nonnull
@Override
public Map.Entry<Integer, String> getEntry(@Nonnull Node node) {
return Preconditions.checkNotNull(node, "node").getSuffix();
return Objects.requireNonNull(node, "node").getSuffix();
}
};
@@ -107,7 +106,7 @@ public enum ChatMetaType {
@Override
public String toString() {
return str;
return this.str;
}
/**
@@ -25,11 +25,11 @@
package me.lucko.luckperms.api;
import com.google.common.base.Preconditions;
import me.lucko.luckperms.api.context.ContextSet;
import me.lucko.luckperms.api.context.ImmutableContextSet;
import java.util.Objects;
import javax.annotation.Nonnull;
import javax.annotation.concurrent.Immutable;
@@ -89,6 +89,7 @@ public class Contexts {
return GLOBAL;
}
@Nonnull
public static Contexts of(@Nonnull ContextSet context, boolean includeGlobal, boolean includeGlobalWorld, boolean applyGroups, boolean applyGlobalGroups, boolean applyGlobalWorldGroups, boolean op) {
return new Contexts(context, includeGlobal, includeGlobalWorld, applyGroups, applyGlobalGroups, applyGlobalWorldGroups, op);
}
@@ -135,7 +136,7 @@ public class Contexts {
private final int hashCode;
public Contexts(@Nonnull ContextSet context, boolean includeGlobal, boolean includeGlobalWorld, boolean applyGroups, boolean applyGlobalGroups, boolean applyGlobalWorldGroups, boolean op) {
this.context = Preconditions.checkNotNull(context, "context").makeImmutable();
this.context = Objects.requireNonNull(context, "context").makeImmutable();
this.includeGlobal = includeGlobal;
this.includeGlobalWorld = includeGlobalWorld;
this.applyGroups = applyGroups;
@@ -211,18 +212,17 @@ public class Contexts {
return this.applyGlobalWorldGroups;
}
@Override
@Nonnull
@Override
public String toString() {
return "Contexts(" +
"context=" + this.getContexts() + ", " +
"op=" + this.isOp() + ", " +
"includeGlobal=" + this.isIncludeGlobal() + ", " +
"includeGlobalWorld=" + this.isIncludeGlobalWorld() + ", " +
"applyGroups=" + this.isApplyGroups() + ", " +
"applyGlobalGroups=" + this.isApplyGlobalGroups() + ", " +
"applyGlobalWorldGroups=" + this.isApplyGlobalWorldGroups() +
")";
"context=" + this.context + ", " +
"op=" + this.op + ", " +
"includeGlobal=" + this.includeGlobal + ", " +
"includeGlobalWorld=" + this.includeGlobalWorld + ", " +
"applyGroups=" + this.applyGroups + ", " +
"applyGlobalGroups=" + this.applyGlobalGroups + ", " +
"applyGlobalWorldGroups=" + this.applyGlobalWorldGroups + ")";
}
@Override
@@ -230,33 +230,23 @@ public class Contexts {
if (o == this) return true;
if (o == allowAll()) return false;
if (!(o instanceof Contexts)) return false;
final Contexts that = (Contexts) o;
final Contexts other = (Contexts) o;
return this.getContexts().equals(other.getContexts()) &&
this.isOp() == other.isOp() &&
this.isIncludeGlobal() == other.isIncludeGlobal() &&
this.isIncludeGlobalWorld() == other.isIncludeGlobalWorld() &&
this.isApplyGroups() == other.isApplyGroups() &&
this.isApplyGlobalGroups() == other.isApplyGlobalGroups() &&
this.isApplyGlobalWorldGroups() == other.isApplyGlobalWorldGroups();
return this.context.equals(that.context) &&
this.op == that.op &&
this.includeGlobal == that.includeGlobal &&
this.includeGlobalWorld == that.includeGlobalWorld &&
this.applyGroups == that.applyGroups &&
this.applyGlobalGroups == that.applyGlobalGroups &&
this.applyGlobalWorldGroups == that.applyGlobalWorldGroups;
}
private int calculateHashCode() {
final int PRIME = 59;
int result = 1;
final Object contexts = this.getContexts();
result = result * PRIME + contexts.hashCode();
result = result * PRIME + (this.isOp() ? 79 : 97);
result = result * PRIME + (this.isIncludeGlobal() ? 79 : 97);
result = result * PRIME + (this.isIncludeGlobalWorld() ? 79 : 97);
result = result * PRIME + (this.isApplyGroups() ? 79 : 97);
result = result * PRIME + (this.isApplyGlobalGroups() ? 79 : 97);
result = result * PRIME + (this.isApplyGlobalWorldGroups() ? 79 : 97);
return result;
return Objects.hash(this.context, this.op, this.includeGlobal, this.includeGlobalWorld, this.applyGroups, this.applyGlobalGroups, this.applyGlobalWorldGroups);
}
@Override
public int hashCode() {
return hashCode;
return this.hashCode;
}
}
@@ -62,7 +62,7 @@ public enum DataMutateResult {
* @return a boolean representation
*/
public boolean asBoolean() {
return value;
return this.value;
}
/**
@@ -72,7 +72,7 @@ public enum DataMutateResult {
* @since 3.4
*/
public boolean wasSuccess() {
return value;
return this.value;
}
/**
@@ -82,7 +82,7 @@ public enum DataMutateResult {
* @since 3.4
*/
public boolean wasFailure() {
return !value;
return !this.value;
}
}
@@ -96,6 +96,6 @@ public enum Tristate {
* @return a boolean representation of the Tristate.
*/
public boolean asBoolean() {
return booleanValue;
return this.booleanValue;
}
}
@@ -25,11 +25,11 @@
package me.lucko.luckperms.api.caching;
import com.google.common.base.Preconditions;
import me.lucko.luckperms.api.Contexts;
import me.lucko.luckperms.api.metastacking.MetaStackDefinition;
import java.util.Objects;
import javax.annotation.Nonnull;
import javax.annotation.concurrent.Immutable;
@@ -71,9 +71,9 @@ public final class MetaContexts {
* @param suffixStackDefinition the suffix stack definition to be used
*/
public MetaContexts(@Nonnull Contexts contexts, @Nonnull MetaStackDefinition prefixStackDefinition, @Nonnull MetaStackDefinition suffixStackDefinition) {
this.contexts = Preconditions.checkNotNull(contexts, "contexts");
this.prefixStackDefinition = Preconditions.checkNotNull(prefixStackDefinition, "prefixStackDefinition");
this.suffixStackDefinition = Preconditions.checkNotNull(suffixStackDefinition, "suffixStackDefinition");
this.contexts = Objects.requireNonNull(contexts, "contexts");
this.prefixStackDefinition = Objects.requireNonNull(prefixStackDefinition, "prefixStackDefinition");
this.suffixStackDefinition = Objects.requireNonNull(suffixStackDefinition, "suffixStackDefinition");
this.hashCode = calculateHashCode();
}
@@ -106,23 +106,18 @@ public final class MetaContexts {
public boolean equals(Object o) {
if (o == this) return true;
if (!(o instanceof MetaContexts)) return false;
final MetaContexts other = (MetaContexts) o;
return this.getContexts().equals(other.getContexts()) &&
this.getPrefixStackDefinition().equals(other.getPrefixStackDefinition()) &&
this.getSuffixStackDefinition().equals(other.getSuffixStackDefinition());
final MetaContexts that = (MetaContexts) o;
return this.contexts.equals(that.contexts) &&
this.prefixStackDefinition.equals(that.prefixStackDefinition) &&
this.suffixStackDefinition.equals(that.suffixStackDefinition);
}
private int calculateHashCode() {
final int PRIME = 59;
int result = 1;
result = result * PRIME + this.getContexts().hashCode();
result = result * PRIME + this.getPrefixStackDefinition().hashCode();
result = result * PRIME + this.getSuffixStackDefinition().hashCode();
return result;
return Objects.hash(this.contexts, this.prefixStackDefinition, this.suffixStackDefinition);
}
@Override
public int hashCode() {
return hashCode;
return this.hashCode;
}
}
@@ -31,12 +31,11 @@ import com.google.common.collect.Multimap;
import java.util.Collection;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import javax.annotation.Nonnull;
import static com.google.common.base.Preconditions.checkNotNull;
abstract class AbstractContextSet implements ContextSet {
protected abstract Multimap<String, String> backing();
@@ -104,14 +103,14 @@ abstract class AbstractContextSet implements ContextSet {
public boolean equals(Object o) {
if (o == this) return true;
if (!(o instanceof ContextSet)) return false;
final ContextSet other = (ContextSet) o;
final ContextSet that = (ContextSet) o;
final Multimap<String, String> otherContexts;
if (other instanceof AbstractContextSet) {
otherContexts = ((AbstractContextSet) other).backing();
if (that instanceof AbstractContextSet) {
otherContexts = ((AbstractContextSet) that).backing();
} else {
otherContexts = other.toMultimap();
otherContexts = that.toMultimap();
}
return backing().equals(otherContexts);
@@ -123,11 +122,11 @@ abstract class AbstractContextSet implements ContextSet {
}
static String sanitizeKey(String key) {
return checkNotNull(key, "key is null").toLowerCase().intern();
return Objects.requireNonNull(key, "key is null").toLowerCase().intern();
}
static String sanitizeValue(String value) {
return checkNotNull(value, "value is null").intern();
return Objects.requireNonNull(value, "value is null").intern();
}
}
@@ -153,7 +153,6 @@ public interface ContextManager {
*
* @param calculator the calculator
*/
@Nonnull
void registerCalculator(@Nonnull ContextCalculator<?> calculator);
/**
@@ -163,7 +162,6 @@ public interface ContextManager {
*
* @param calculator the calculator
*/
@Nonnull
void registerStaticCalculator(@Nonnull StaticContextCalculator calculator);
/**
@@ -171,7 +169,6 @@ public interface ContextManager {
*
* @param subject the subject
*/
@Nonnull
void invalidateCache(@Nonnull Object subject);
}
@@ -25,10 +25,10 @@
package me.lucko.luckperms.api.context;
import com.google.common.base.Preconditions;
import com.google.common.collect.Multimap;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.Set;
@@ -302,7 +302,7 @@ public interface ContextSet {
* @throws NullPointerException if the key or value is null
*/
default boolean has(@Nonnull Map.Entry<String, String> entry) {
Preconditions.checkNotNull(entry, "entry");
Objects.requireNonNull(entry, "entry");
return has(entry.getKey(), entry.getValue());
}
@@ -317,7 +317,7 @@ public interface ContextSet {
* @throws NullPointerException if the key or value is null
*/
default boolean hasIgnoreCase(@Nonnull Map.Entry<String, String> entry) {
Preconditions.checkNotNull(entry, "entry");
Objects.requireNonNull(entry, "entry");
return hasIgnoreCase(entry.getKey(), entry.getValue());
}
@@ -358,7 +358,7 @@ public interface ContextSet {
return true;
}
Preconditions.checkNotNull(other, "other");
Objects.requireNonNull(other, "other");
if (this.isEmpty()) {
// this is empty, so is therefore always satisfied.
return true;
@@ -29,13 +29,12 @@ import com.google.common.collect.ImmutableSetMultimap;
import com.google.common.collect.Multimap;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import javax.annotation.Nonnull;
import javax.annotation.concurrent.Immutable;
import static com.google.common.base.Preconditions.checkNotNull;
/**
* An immutable implementation of {@link ContextSet}.
*
@@ -99,7 +98,7 @@ public final class ImmutableContextSet extends AbstractContextSet implements Con
*/
@Nonnull
public static ImmutableContextSet fromEntries(@Nonnull Iterable<? extends Map.Entry<String, String>> iterable) {
checkNotNull(iterable, "iterable");
Objects.requireNonNull(iterable, "iterable");
ImmutableContextSet.Builder builder = builder();
for (Map.Entry<String, String> entry : iterable) {
builder.add(entry);
@@ -116,7 +115,7 @@ public final class ImmutableContextSet extends AbstractContextSet implements Con
*/
@Nonnull
public static ImmutableContextSet fromMap(@Nonnull Map<String, String> map) {
return fromEntries(checkNotNull(map, "map").entrySet());
return fromEntries(Objects.requireNonNull(map, "map").entrySet());
}
/**
@@ -129,7 +128,7 @@ public final class ImmutableContextSet extends AbstractContextSet implements Con
*/
@Nonnull
public static ImmutableContextSet fromMultimap(@Nonnull Multimap<String, String> multimap) {
return fromEntries(checkNotNull(multimap, "multimap").entries());
return fromEntries(Objects.requireNonNull(multimap, "multimap").entries());
}
/**
@@ -143,7 +142,7 @@ public final class ImmutableContextSet extends AbstractContextSet implements Con
*/
@Nonnull
public static ImmutableContextSet fromSet(@Nonnull ContextSet contextSet) {
return checkNotNull(contextSet, "contextSet").makeImmutable();
return Objects.requireNonNull(contextSet, "contextSet").makeImmutable();
}
/**
@@ -161,12 +160,12 @@ public final class ImmutableContextSet extends AbstractContextSet implements Con
ImmutableContextSet(ImmutableSetMultimap<String, String> contexts) {
this.map = contexts;
this.hashCode = map.hashCode();
this.hashCode = this.map.hashCode();
}
@Override
protected Multimap<String, String> backing() {
return map;
return this.map;
}
@Override
@@ -190,18 +189,18 @@ public final class ImmutableContextSet extends AbstractContextSet implements Con
@Nonnull
@Override
public Set<Map.Entry<String, String>> toSet() {
return map.entries();
return this.map.entries();
}
@Nonnull
@Override
public Multimap<String, String> toMultimap() {
return map;
return this.map;
}
@Override
public int hashCode() {
return hashCode;
return this.hashCode;
}
@Override
@@ -222,10 +221,10 @@ public final class ImmutableContextSet extends AbstractContextSet implements Con
}
private synchronized ImmutableSetMultimap.Builder<String, String> builder() {
if (builder == null) {
builder = ImmutableSetMultimap.builder();
if (this.builder == null) {
this.builder = ImmutableSetMultimap.builder();
}
return builder;
return this.builder;
}
private void put(String key, String value) {
@@ -257,7 +256,7 @@ public final class ImmutableContextSet extends AbstractContextSet implements Con
*/
@Nonnull
public Builder add(@Nonnull Map.Entry<String, String> entry) {
checkNotNull(entry, "entry");
Objects.requireNonNull(entry, "entry");
add(entry.getKey(), entry.getValue());
return this;
}
@@ -272,7 +271,7 @@ public final class ImmutableContextSet extends AbstractContextSet implements Con
*/
@Nonnull
public Builder addAll(@Nonnull Iterable<? extends Map.Entry<String, String>> iterable) {
for (Map.Entry<String, String> e : checkNotNull(iterable, "iterable")) {
for (Map.Entry<String, String> e : Objects.requireNonNull(iterable, "iterable")) {
add(e);
}
return this;
@@ -288,7 +287,7 @@ public final class ImmutableContextSet extends AbstractContextSet implements Con
*/
@Nonnull
public Builder addAll(@Nonnull Map<String, String> map) {
addAll(checkNotNull(map, "map").entrySet());
addAll(Objects.requireNonNull(map, "map").entrySet());
return this;
}
@@ -303,7 +302,7 @@ public final class ImmutableContextSet extends AbstractContextSet implements Con
*/
@Nonnull
public Builder addAll(@Nonnull Multimap<String, String> multimap) {
addAll(checkNotNull(multimap, "multimap").entries());
addAll(Objects.requireNonNull(multimap, "multimap").entries());
return this;
}
@@ -317,7 +316,7 @@ public final class ImmutableContextSet extends AbstractContextSet implements Con
*/
@Nonnull
public Builder addAll(@Nonnull ContextSet contextSet) {
checkNotNull(contextSet, "contextSet");
Objects.requireNonNull(contextSet, "contextSet");
if (contextSet instanceof AbstractContextSet) {
AbstractContextSet other = ((AbstractContextSet) contextSet);
if (!other.isEmpty()) {
@@ -337,10 +336,10 @@ public final class ImmutableContextSet extends AbstractContextSet implements Con
*/
@Nonnull
public ImmutableContextSet build() {
if (builder == null) {
if (this.builder == null) {
return empty();
} else {
return new ImmutableContextSet(builder.build());
return new ImmutableContextSet(this.builder.build());
}
}
}
@@ -25,7 +25,6 @@
package me.lucko.luckperms.api.context;
import com.google.common.base.Preconditions;
import com.google.common.collect.HashMultimap;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.ImmutableSetMultimap;
@@ -35,12 +34,11 @@ import com.google.common.collect.SetMultimap;
import java.util.Collection;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import javax.annotation.Nonnull;
import static com.google.common.base.Preconditions.checkNotNull;
/**
* A mutable implementation of {@link ContextSet}.
*
@@ -58,8 +56,8 @@ public final class MutableContextSet extends AbstractContextSet implements Conte
*/
@Nonnull
public static MutableContextSet singleton(@Nonnull String key, @Nonnull String value) {
checkNotNull(key, "key");
checkNotNull(value, "value");
Objects.requireNonNull(key, "key");
Objects.requireNonNull(value, "value");
MutableContextSet set = MutableContextSet.create();
set.add(key, value);
return set;
@@ -78,10 +76,10 @@ public final class MutableContextSet extends AbstractContextSet implements Conte
*/
@Nonnull
public static MutableContextSet of(@Nonnull String key1, @Nonnull String value1, @Nonnull String key2, @Nonnull String value2) {
checkNotNull(key1, "key1");
checkNotNull(value1, "value1");
checkNotNull(key2, "key2");
checkNotNull(value2, "value2");
Objects.requireNonNull(key1, "key1");
Objects.requireNonNull(value1, "value1");
Objects.requireNonNull(key2, "key2");
Objects.requireNonNull(value2, "value2");
MutableContextSet set = create();
set.add(key1, value1);
set.add(key2, value2);
@@ -97,7 +95,7 @@ public final class MutableContextSet extends AbstractContextSet implements Conte
*/
@Nonnull
public static MutableContextSet fromEntries(@Nonnull Iterable<? extends Map.Entry<String, String>> iterable) {
checkNotNull(iterable, "iterable");
Objects.requireNonNull(iterable, "iterable");
MutableContextSet set = create();
set.addAll(iterable);
return set;
@@ -112,7 +110,7 @@ public final class MutableContextSet extends AbstractContextSet implements Conte
*/
@Nonnull
public static MutableContextSet fromMap(@Nonnull Map<String, String> map) {
checkNotNull(map, "map");
Objects.requireNonNull(map, "map");
MutableContextSet set = create();
set.addAll(map);
return set;
@@ -128,7 +126,7 @@ public final class MutableContextSet extends AbstractContextSet implements Conte
*/
@Nonnull
public static MutableContextSet fromMultimap(@Nonnull Multimap<String, String> multimap) {
checkNotNull(multimap, "multimap");
Objects.requireNonNull(multimap, "multimap");
MutableContextSet set = create();
set.addAll(multimap);
return set;
@@ -145,7 +143,7 @@ public final class MutableContextSet extends AbstractContextSet implements Conte
*/
@Nonnull
public static MutableContextSet fromSet(@Nonnull ContextSet contextSet) {
Preconditions.checkNotNull(contextSet, "contextSet");
Objects.requireNonNull(contextSet, "contextSet");
MutableContextSet set = create();
set.addAll(contextSet);
return set;
@@ -173,7 +171,7 @@ public final class MutableContextSet extends AbstractContextSet implements Conte
@Override
protected Multimap<String, String> backing() {
return map;
return this.map;
}
@Override
@@ -185,10 +183,10 @@ public final class MutableContextSet extends AbstractContextSet implements Conte
@Override
public ImmutableContextSet makeImmutable() {
// if the map is empty, don't create a new instance
if (map.isEmpty()) {
if (this.map.isEmpty()) {
return ImmutableContextSet.empty();
}
return new ImmutableContextSet(ImmutableSetMultimap.copyOf(map));
return new ImmutableContextSet(ImmutableSetMultimap.copyOf(this.map));
}
@Nonnull
@@ -200,13 +198,13 @@ public final class MutableContextSet extends AbstractContextSet implements Conte
@Nonnull
@Override
public Set<Map.Entry<String, String>> toSet() {
return ImmutableSet.copyOf(map.entries());
return ImmutableSet.copyOf(this.map.entries());
}
@Nonnull
@Override
public Multimap<String, String> toMultimap() {
return ImmutableSetMultimap.copyOf(map);
return ImmutableSetMultimap.copyOf(this.map);
}
/**
@@ -217,7 +215,7 @@ public final class MutableContextSet extends AbstractContextSet implements Conte
* @throws NullPointerException if the key or value is null
*/
public void add(@Nonnull String key, @Nonnull String value) {
map.put(sanitizeKey(key), sanitizeValue(value));
this.map.put(sanitizeKey(key), sanitizeValue(value));
}
/**
@@ -227,7 +225,7 @@ public final class MutableContextSet extends AbstractContextSet implements Conte
* @throws NullPointerException if the entry is null
*/
public void add(@Nonnull Map.Entry<String, String> entry) {
checkNotNull(entry, "entry");
Objects.requireNonNull(entry, "entry");
add(entry.getKey(), entry.getValue());
}
@@ -238,7 +236,7 @@ public final class MutableContextSet extends AbstractContextSet implements Conte
* @throws NullPointerException if iterable is null
*/
public void addAll(@Nonnull Iterable<? extends Map.Entry<String, String>> iterable) {
for (Map.Entry<String, String> e : checkNotNull(iterable, "iterable")) {
for (Map.Entry<String, String> e : Objects.requireNonNull(iterable, "iterable")) {
add(e);
}
}
@@ -250,7 +248,7 @@ public final class MutableContextSet extends AbstractContextSet implements Conte
* @throws NullPointerException if the map is null
*/
public void addAll(@Nonnull Map<String, String> map) {
addAll(checkNotNull(map, "map").entrySet());
addAll(Objects.requireNonNull(map, "map").entrySet());
}
/**
@@ -261,7 +259,7 @@ public final class MutableContextSet extends AbstractContextSet implements Conte
* @since 3.4
*/
public void addAll(@Nonnull Multimap<String, String> multimap) {
addAll(checkNotNull(multimap, "multimap").entries());
addAll(Objects.requireNonNull(multimap, "multimap").entries());
}
/**
@@ -271,7 +269,7 @@ public final class MutableContextSet extends AbstractContextSet implements Conte
* @throws NullPointerException if the contextSet is null
*/
public void addAll(@Nonnull ContextSet contextSet) {
checkNotNull(contextSet, "contextSet");
Objects.requireNonNull(contextSet, "contextSet");
if (contextSet instanceof AbstractContextSet) {
AbstractContextSet other = ((AbstractContextSet) contextSet);
this.map.putAll(other.backing());
@@ -288,7 +286,7 @@ public final class MutableContextSet extends AbstractContextSet implements Conte
* @throws NullPointerException if the key or value is null
*/
public void remove(@Nonnull String key, @Nonnull String value) {
map.remove(sanitizeKey(key), sanitizeValue(value));
this.map.remove(sanitizeKey(key), sanitizeValue(value));
}
/**
@@ -300,7 +298,7 @@ public final class MutableContextSet extends AbstractContextSet implements Conte
*/
public void removeIgnoreCase(@Nonnull String key, @Nonnull String value) {
String v = sanitizeValue(value);
Collection<String> strings = map.asMap().get(sanitizeKey(key));
Collection<String> strings = this.map.asMap().get(sanitizeKey(key));
if (strings != null) {
strings.removeIf(e -> e.equalsIgnoreCase(v));
}
@@ -313,14 +311,14 @@ public final class MutableContextSet extends AbstractContextSet implements Conte
* @throws NullPointerException if the key is null
*/
public void removeAll(@Nonnull String key) {
map.removeAll(sanitizeKey(key));
this.map.removeAll(sanitizeKey(key));
}
/**
* Removes all contexts from the set.
*/
public void clear() {
map.clear();
this.map.clear();
}
@Override
@@ -51,6 +51,6 @@ public enum PlatformType {
*/
@Nonnull
public String getFriendlyName() {
return friendlyName;
return this.friendlyName;
}
}