mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-25 01:19:02 +00:00
Entirely remove and ban ImmutableSet
The last usage was ImmutableMap#keySet
This commit is contained in:
parent
04c570461e
commit
65041a8121
@ -17,7 +17,18 @@
|
||||
package org.elasticsearch.common.inject.assistedinject;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import org.elasticsearch.common.inject.*;
|
||||
|
||||
import org.elasticsearch.common.inject.AbstractModule;
|
||||
import org.elasticsearch.common.inject.Binder;
|
||||
import org.elasticsearch.common.inject.Binding;
|
||||
import org.elasticsearch.common.inject.ConfigurationException;
|
||||
import org.elasticsearch.common.inject.Inject;
|
||||
import org.elasticsearch.common.inject.Injector;
|
||||
import org.elasticsearch.common.inject.Key;
|
||||
import org.elasticsearch.common.inject.Module;
|
||||
import org.elasticsearch.common.inject.Provider;
|
||||
import org.elasticsearch.common.inject.ProvisionException;
|
||||
import org.elasticsearch.common.inject.TypeLiteral;
|
||||
import org.elasticsearch.common.inject.internal.Errors;
|
||||
import org.elasticsearch.common.inject.internal.ErrorsException;
|
||||
import org.elasticsearch.common.inject.spi.Message;
|
||||
@ -31,6 +42,7 @@ import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import static org.elasticsearch.common.inject.internal.Annotations.getKey;
|
||||
|
||||
@ -78,7 +90,7 @@ public final class FactoryProvider2<F> implements InvocationHandler, Provider<F>
|
||||
* the produced type, or null if all methods return concrete types
|
||||
*/
|
||||
private final Key<?> producedType;
|
||||
private final ImmutableMap<Method, Key<?>> returnTypesByMethod;
|
||||
private final Map<Method, Key<?>> returnTypesByMethod;
|
||||
private final ImmutableMap<Method, List<Key<?>>> paramTypes;
|
||||
|
||||
/**
|
||||
|
@ -19,8 +19,6 @@
|
||||
|
||||
package org.elasticsearch.index.codec;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
|
||||
import org.apache.lucene.codecs.Codec;
|
||||
import org.apache.lucene.codecs.lucene50.Lucene50StoredFieldsFormat.Mode;
|
||||
import org.apache.lucene.codecs.lucene53.Lucene53Codec;
|
||||
@ -32,6 +30,8 @@ import org.elasticsearch.index.Index;
|
||||
import org.elasticsearch.index.mapper.MapperService;
|
||||
import org.elasticsearch.index.settings.IndexSettings;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Since Lucene 4.0 low level index segments are read and written through a
|
||||
* codec layer that allows to use use-case specific file formats &
|
||||
@ -42,7 +42,7 @@ import org.elasticsearch.index.settings.IndexSettings;
|
||||
public class CodecService extends AbstractIndexComponent {
|
||||
|
||||
private final MapperService mapperService;
|
||||
private final ImmutableMap<String, Codec> codecs;
|
||||
private final Map<String, Codec> codecs;
|
||||
|
||||
public final static String DEFAULT_CODEC = "default";
|
||||
public final static String BEST_COMPRESSION_CODEC = "best_compression";
|
||||
@ -66,9 +66,9 @@ public class CodecService extends AbstractIndexComponent {
|
||||
codecs.put(DEFAULT_CODEC, new Lucene53Codec());
|
||||
codecs.put(BEST_COMPRESSION_CODEC, new Lucene53Codec(Mode.BEST_COMPRESSION));
|
||||
} else {
|
||||
codecs.put(DEFAULT_CODEC,
|
||||
codecs.put(DEFAULT_CODEC,
|
||||
new PerFieldMappingPostingFormatCodec(Mode.BEST_SPEED, mapperService, logger));
|
||||
codecs.put(BEST_COMPRESSION_CODEC,
|
||||
codecs.put(BEST_COMPRESSION_CODEC,
|
||||
new PerFieldMappingPostingFormatCodec(Mode.BEST_COMPRESSION, mapperService, logger));
|
||||
}
|
||||
codecs.put(LUCENE_DEFAULT_CODEC, Codec.getDefault());
|
||||
|
@ -127,19 +127,7 @@ com.google.common.collect.HashMultimap
|
||||
com.google.common.collect.FluentIterable
|
||||
com.google.common.io.Files
|
||||
com.google.common.primitives.Ints
|
||||
com.google.common.collect.ImmutableMap#entrySet()
|
||||
com.google.common.collect.ImmutableSet#builder()
|
||||
com.google.common.collect.ImmutableSet#copyOf(java.lang.Iterable)
|
||||
com.google.common.collect.ImmutableSet#copyOf(java.util.Iterator)
|
||||
com.google.common.collect.ImmutableSet#copyOf(java.util.Collection)
|
||||
com.google.common.collect.ImmutableSet#copyOf(java.lang.Object[])
|
||||
com.google.common.collect.ImmutableSet#of()
|
||||
com.google.common.collect.ImmutableSet#of(java.lang.Object)
|
||||
com.google.common.collect.ImmutableSet#of(java.lang.Object, java.lang.Object)
|
||||
com.google.common.collect.ImmutableSet#of(java.lang.Object, java.lang.Object, java.lang.Object)
|
||||
com.google.common.collect.ImmutableSet#of(java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object)
|
||||
com.google.common.collect.ImmutableSet#of(java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object)
|
||||
com.google.common.collect.ImmutableSet#of(java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object[])
|
||||
com.google.common.collect.ImmutableSet
|
||||
|
||||
@defaultMessage Do not violate java's access system
|
||||
java.lang.reflect.AccessibleObject#setAccessible(boolean)
|
||||
|
Loading…
x
Reference in New Issue
Block a user