Apache Solr open-source search software
SOLR-16318: Use up to JDK 11 features (avoid type declaration when <> can be used) (#916)
Christine Poerschkef1f32d39ff71
diff --git a/buildSrc/src/main/java/org/apache/lucene/gradle/ProfileResults.java b/buildSrc/src/main/java/org/apache/lucene/gradle/ProfileResults.javaindex 8e6ce1f2d8d..60def1a89d1 100644--- a/buildSrc/src/main/java/org/apache/lucene/gradle/ProfileResults.java+++ b/buildSrc/src/main/java/org/apache/lucene/gradle/ProfileResults.java@@ -185,7 +185,7 @@ public class ProfileResults {stack.append(frameToString(trace.getFrames().get(i), lineNumbers));}String line = stack.toString();- SimpleEntry<String,Long> entry = histogram.computeIfAbsent(line, u -> new SimpleEntry<String, Long>(line, 0L));+ SimpleEntry<String,Long> entry = histogram.computeIfAbsent(line, u -> new SimpleEntry<>(line, 0L));long value = getValue(event);entry.setValue(entry.getValue() + value);totalEvents++;diff --git a/solr/core/src/java/org/apache/solr/cloud/ConfigSetCmds.java b/solr/core/src/java/org/apache/solr/cloud/ConfigSetCmds.javaindex e3133a4120b..cb0e62fe29f 100644--- a/solr/core/src/java/org/apache/solr/cloud/ConfigSetCmds.java+++ b/solr/core/src/java/org/apache/solr/cloud/ConfigSetCmds.java@@ -86,7 +86,7 @@ public class ConfigSetCmds {for (Map.Entry<String, Object> entry : message.getProperties().entrySet()) {if (entry.getKey().startsWith(CONFIG_SET_PROPERTY_PREFIX)) {if (properties == null) {- properties = new HashMap<String, Object>();+ properties = new HashMap<>();}properties.put(entry.getKey().substring((CONFIG_SET_PROPERTY_PREFIX).length()), entry.getValue());diff --git a/solr/core/src/java/org/apache/solr/cloud/Overseer.java b/solr/core/src/java/org/apache/solr/cloud/Overseer.javaindex 838ec5d24a7..aa1dd2253f7 100644--- a/solr/core/src/java/org/apache/solr/cloud/Overseer.java+++ b/solr/core/src/java/org/apache/solr/cloud/Overseer.java@@ -759,7 +759,7 @@ public class Overseer implements SolrCloseable {ccThread.start();systemCollectionCompatCheck(- new BiConsumer<String, Object>() {+ new BiConsumer<>() {boolean firstPair = true;@Overridediff --git a/solr/core/src/java/org/apache/solr/cloud/SizeLimitedDistributedMap.java b/solr/core/src/java/org/apache/solr/cloud/SizeLimitedDistributedMap.javaindex db57ea4980b..903fb7e8ebc 100644--- a/solr/core/src/java/org/apache/solr/cloud/SizeLimitedDistributedMap.java+++ b/solr/core/src/java/org/apache/solr/cloud/SizeLimitedDistributedMap.java@@ -70,7 +70,7 @@ public class SizeLimitedDistributedMap extends DistributedMap {int cleanupSize = maxSize / 10;final PriorityQueue<Long> priorityQueue =- new PriorityQueue<Long>(cleanupSize) {+ new PriorityQueue<>(cleanupSize) {@Overrideprotected boolean lessThan(Long a, Long b) {return (a > b);diff --git a/solr/core/src/java/org/apache/solr/cloud/api/collections/CreateCollectionCmd.java b/solr/core/src/java/org/apache/solr/cloud/api/collections/CreateCollectionCmd.javaindex 2a748fa9d30..9f082ec4521 100644--- a/solr/core/src/java/org/apache/solr/cloud/api/collections/CreateCollectionCmd.java+++ b/solr/core/src/java/org/apache/solr/cloud/api/collections/CreateCollectionCmd.java@@ -456,7 +456,7 @@ public class CreateCollectionCmd implements CollApiCmds.CollectionApiCommand {// Let's cleanup as we hit an exception// We shouldn't be passing 'results' here for the cleanup as the response would then contain// 'success' element, which may be interpreted by the user as a positive ack- CollectionHandlingUtils.cleanupCollection(collectionName, new NamedList<Object>(), ccc);+ CollectionHandlingUtils.cleanupCollection(collectionName, new NamedList<>(), ccc);log.info("Cleaned up artifacts for failed create collection for [{}]", collectionName);throw new SolrException(ErrorCode.BAD_REQUEST,diff --git a/solr/core/src/java/org/apache/solr/core/CorePropertiesLocator.java b/solr/core/src/java/org/apache/solr/core/CorePropertiesLocator.javaindex 48353fde65c..f2be093e3e9 100644--- a/solr/core/src/java/org/apache/solr/core/CorePropertiesLocator.java+++ b/solr/core/src/java/org/apache/solr/core/CorePropertiesLocator.java@@ -144,7 +144,7 @@ public class CorePropertiesLocator implements CoresLocator {this.rootDirectory,options,maxDepth,- new SimpleFileVisitor<Path>() {+ new SimpleFileVisitor<>() {@Overridepublic FileVisitResult visitFile(Path file, BasicFileAttributes attrs)throws IOException {diff --git a/solr/core/src/java/org/apache/solr/core/NodeRoles.java b/solr/core/src/java/org/apache/solr/core/NodeRoles.javaindex 6bb1e1633f1..36bfe3ea262 100644--- a/solr/core/src/java/org/apache/solr/core/NodeRoles.java+++ b/solr/core/src/java/org/apache/solr/core/NodeRoles.java@@ -36,7 +36,7 @@ public class NodeRoles {private Map<Role, String> nodeRoles;public NodeRoles(String rolesString) {- Map<Role, String> roles = new EnumMap<Role, String>(Role.class);+ Map<Role, String> roles = new EnumMap<>(Role.class);if (StringUtils.isEmpty(rolesString)) {rolesString = DEFAULT_ROLES_STRING;}diff --git a/solr/core/src/java/org/apache/solr/core/PluginBag.java b/solr/core/src/java/org/apache/solr/core/PluginBag.javaindex a25af726b9c..bdf8bfeb307 100644--- a/solr/core/src/java/org/apache/solr/core/PluginBag.java+++ b/solr/core/src/java/org/apache/solr/core/PluginBag.java@@ -137,7 +137,7 @@ public class PluginBag<T> implements AutoCloseable {if (log.isDebugEnabled()) {log.debug("{} : '{}' created with startup=lazy ", meta.getCleanTag(), info.name);}- return new LazyPluginHolder<T>(meta, info, core, core.getResourceLoader());+ return new LazyPluginHolder<>(meta, info, core, core.getResourceLoader());} else {if (info.pkgName != null) {PackagePluginHolder<T> holder = new PackagePluginHolder<>(info, core, meta);@@ -329,7 +329,7 @@ public class PluginBag<T> implements AutoCloseable {}for (Map.Entry<String, T> e : defaults.entrySet()) {if (!contains(e.getKey())) {- put(e.getKey(), new PluginHolder<T>(null, e.getValue()));+ put(e.getKey(), new PluginHolder<>(null, e.getValue()));}}}diff --git a/solr/core/src/java/org/apache/solr/core/snapshots/CollectionSnapshotMetaData.java b/solr/core/src/java/org/apache/solr/core/snapshots/CollectionSnapshotMetaData.javaindex fb2af5009dc..483170db598 100644--- a/solr/core/src/java/org/apache/solr/core/snapshots/CollectionSnapshotMetaData.java+++ b/solr/core/src/java/org/apache/solr/core/snapshots/CollectionSnapshotMetaData.java@@ -91,7 +91,7 @@ public class CollectionSnapshotMetaData implements JSONWriter.Writable {@Overridepublic void write(JSONWriter arg0) {- LinkedHashMap<String, Object> info = new LinkedHashMap<String, Object>();+ LinkedHashMap<String, Object> info = new LinkedHashMap<>();info.put(CoreAdminParams.CORE, getCoreName());info.put(SolrSnapshotManager.INDEX_DIR_PATH, getIndexDirPath());info.put(SolrSnapshotManager.GENERATION_NUM, getGenerationNumber());@@ -244,7 +244,7 @@ public class CollectionSnapshotMetaData implements JSONWriter.Writable {result.add(SolrSnapshotManager.SNAPSHOT_STATUS, this.status.toString());result.add(SolrSnapshotManager.CREATION_DATE, this.getCreationDate().getTime());- NamedList<NamedList<Object>> replicas = new NamedList<NamedList<Object>>();+ NamedList<NamedList<Object>> replicas = new NamedList<>();for (CoreSnapshotMetaData x : replicaSnapshots) {replicas.add(x.getCoreName(), x.toNamedList());}diff --git a/solr/core/src/java/org/apache/solr/handler/ClusterAPI.java b/solr/core/src/java/org/apache/solr/handler/ClusterAPI.javaindex ca3f6dd4139..a54ba441e65 100644--- a/solr/core/src/java/org/apache/solr/handler/ClusterAPI.java+++ b/solr/core/src/java/org/apache/solr/handler/ClusterAPI.java@@ -135,7 +135,7 @@ public class ClusterAPI {@SuppressWarnings("unchecked")public void rolesForNode(SolrQueryRequest req, SolrQueryResponse rsp) throws Exception {String node = req.getPathTemplateValues().get("node");- Map<String, String> ret = new HashMap<String, String>();+ Map<String, String> ret = new HashMap<>();Map<String, Map<String, Set<String>>> roles =(Map<String, Map<String, Set<String>>>)readRecursive(diff --git a/solr/core/src/java/org/apache/solr/handler/RequestHandlerUtils.java b/solr/core/src/java/org/apache/solr/handler/RequestHandlerUtils.javaindex f97aba0c126..fe873084b2b 100644--- a/solr/core/src/java/org/apache/solr/handler/RequestHandlerUtils.java+++ b/solr/core/src/java/org/apache/solr/handler/RequestHandlerUtils.java@@ -54,7 +54,7 @@ public class RequestHandlerUtils {SolrQueryRequest req, UpdateRequestProcessor processor, SolrParams params, boolean force)throws IOException {if (params == null) {- params = new MapSolrParams(new HashMap<String, String>());+ params = new MapSolrParams(new HashMap<>());}boolean optimize = params.getBool(UpdateParams.OPTIMIZE, false);@@ -115,7 +115,7 @@ public class RequestHandlerUtils {SolrQueryRequest req, UpdateRequestProcessor processor, SolrParams params, boolean force)throws IOException {if (params == null) {- params = new MapSolrParams(new HashMap<String, String>());+ params = new MapSolrParams(new HashMap<>());}boolean rollback = params.getBool(UpdateParams.ROLLBACK, false);diff --git a/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java b/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.javaindex eac72512df4..0b44aa85b9d 100644--- a/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java+++ b/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java@@ -110,9 +110,9 @@ public class CoreAdminHandler extends RequestHandlerBase implements PermissionNa// should happen in the constructor...this.coreContainer = null;HashMap<String, Map<String, TaskObject>> map = new HashMap<>(3, 1.0f);- map.put(RUNNING, Collections.synchronizedMap(new LinkedHashMap<String, TaskObject>()));- map.put(COMPLETED, Collections.synchronizedMap(new LinkedHashMap<String, TaskObject>()));- map.put(FAILED, Collections.synchronizedMap(new LinkedHashMap<String, TaskObject>()));+ map.put(RUNNING, Collections.synchronizedMap(new LinkedHashMap<>()));+ map.put(COMPLETED, Collections.synchronizedMap(new LinkedHashMap<>()));+ map.put(FAILED, Collections.synchronizedMap(new LinkedHashMap<>()));requestStatusMap = Collections.unmodifiableMap(map);}@@ -124,9 +124,9 @@ public class CoreAdminHandler extends RequestHandlerBase implements PermissionNapublic CoreAdminHandler(final CoreContainer coreContainer) {this.coreContainer = coreContainer;HashMap<String, Map<String, TaskObject>> map = new HashMap<>(3, 1.0f);- map.put(RUNNING, Collections.synchronizedMap(new LinkedHashMap<String, TaskObject>()));- map.put(COMPLETED, Collections.synchronizedMap(new LinkedHashMap<String, TaskObject>()));- map.put(FAILED, Collections.synchronizedMap(new LinkedHashMap<String, TaskObject>()));+ map.put(RUNNING, Collections.synchronizedMap(new LinkedHashMap<>()));+ map.put(COMPLETED, Collections.synchronizedMap(new LinkedHashMap<>()));+ map.put(FAILED, Collections.synchronizedMap(new LinkedHashMap<>()));requestStatusMap = Collections.unmodifiableMap(map);}diff --git a/solr/core/src/java/org/apache/solr/handler/component/PivotFacet.java b/solr/core/src/java/org/apache/solr/handler/component/PivotFacet.javaindex f7e39c5d4b0..d781fb04969 100644--- a/solr/core/src/java/org/apache/solr/handler/component/PivotFacet.java+++ b/solr/core/src/java/org/apache/solr/handler/component/PivotFacet.java@@ -66,7 +66,7 @@ public class PivotFacet extends FacetBase {public void addRefinement(int shardNumber, PivotFacetValue value) {if (!queuedRefinements.containsKey(shardNumber)) {- queuedRefinements.put(shardNumber, new ArrayList<PivotFacetValue>());+ queuedRefinements.put(shardNumber, new ArrayList<>());}queuedRefinements.get(shardNumber).add(value);diff --git a/solr/core/src/java/org/apache/solr/handler/component/SearchHandler.java b/solr/core/src/java/org/apache/solr/handler/component/SearchHandler.javaindex fb8985184f0..9bec8533335 100644--- a/solr/core/src/java/org/apache/solr/handler/component/SearchHandler.java+++ b/solr/core/src/java/org/apache/solr/handler/component/SearchHandler.java@@ -574,8 +574,8 @@ public class SearchHandler extends RequestHandlerBaseif (!rb.isDistrib&& req.getParams().getBool(ShardParams.SHARDS_INFO, false)&& rb.shortCircuitedURL != null) {- NamedList<Object> shardInfo = new SimpleOrderedMap<Object>();- SimpleOrderedMap<Object> nl = new SimpleOrderedMap<Object>();+ NamedList<Object> shardInfo = new SimpleOrderedMap<>();+ SimpleOrderedMap<Object> nl = new SimpleOrderedMap<>();if (rsp.getException() != null) {Throwable cause = rsp.getException();if (cause instanceof SolrServerException) {diff --git a/solr/core/src/java/org/apache/solr/handler/component/StatsField.java b/solr/core/src/java/org/apache/solr/handler/component/StatsField.javaindex 1aeb16d5995..c58124edaa3 100644--- a/solr/core/src/java/org/apache/solr/handler/component/StatsField.java+++ b/solr/core/src/java/org/apache/solr/handler/component/StatsField.java@@ -90,7 +90,7 @@ public class StatsField {boolean parseParams(StatsField sf) {String percentileParas = sf.localParams.get(this.name());if (percentileParas != null) {- List<Double> percentiles = new ArrayList<Double>();+ List<Double> percentiles = new ArrayList<>();try {for (String percentile : StrUtils.splitSmart(percentileParas, ',')) {percentiles.add(Double.parseDouble(percentile));@@ -149,7 +149,7 @@ public class StatsField {* @see #getDistribDeps*/Stat(boolean selfDep, Stat... deps) {- distribDeps = new ArrayList<Stat>(deps.length + 1);+ distribDeps = new ArrayList<>(deps.length + 1);distribDeps.addAll(Arrays.asList(deps));if (selfDep) {distribDeps.add(this);@@ -220,7 +220,7 @@ public class StatsField {private final List<String> excludeTagList;private final EnumSet<Stat> statsToCalculate = EnumSet.noneOf(Stat.class);private final EnumSet<Stat> statsInResponse = EnumSet.noneOf(Stat.class);- private final List<Double> percentilesList = new ArrayList<Double>();+ private final List<Double> percentilesList = new ArrayList<>();private final boolean isShard;private double tdigestCompression = 100.0D;@@ -397,7 +397,7 @@ public class StatsField {return docs;}- IdentityHashMap<Query, Boolean> excludeSet = new IdentityHashMap<Query, Boolean>();+ IdentityHashMap<Query, Boolean> excludeSet = new IdentityHashMap<>();for (String excludeTag : excludeTagList) {Object olst = tagMap.get(excludeTag);// tagMap has entries of List<String,List<QParser>>, but subject to change in the future@@ -419,7 +419,7 @@ public class StatsField {}if (excludeSet.size() == 0) return docs;- List<Query> qlist = new ArrayList<Query>();+ List<Query> qlist = new ArrayList<>();// add the base queryif (!excludeSet.containsKey(rb.getQuery())) {diff --git a/solr/core/src/java/org/apache/solr/handler/tagger/TaggerRequestHandler.java b/solr/core/src/java/org/apache/solr/handler/tagger/TaggerRequestHandler.javaindex 05b01f1800f..510be22e385 100644--- a/solr/core/src/java/org/apache/solr/handler/tagger/TaggerRequestHandler.java+++ b/solr/core/src/java/org/apache/solr/handler/tagger/TaggerRequestHandler.java@@ -324,7 +324,7 @@ public class TaggerRequestHandler extends RequestHandlerBase {final SolrIndexSearcher searcher = req.getSearcher();final Bits docBits;if (corpusFilterQueries != null && corpusFilterQueries.length > 0) {- List<Query> filterQueries = new ArrayList<Query>(corpusFilterQueries.length);+ List<Query> filterQueries = new ArrayList<>(corpusFilterQueries.length);for (String corpusFilterQuery : corpusFilterQueries) {QParser qParser = QParser.getParser(corpusFilterQuery, null, req);try {diff --git a/solr/core/src/java/org/apache/solr/highlight/SolrHighlighter.java b/solr/core/src/java/org/apache/solr/highlight/SolrHighlighter.javaindex 134175d0b02..9285804aa00 100644--- a/solr/core/src/java/org/apache/solr/highlight/SolrHighlighter.java+++ b/solr/core/src/java/org/apache/solr/highlight/SolrHighlighter.java@@ -90,7 +90,7 @@ public abstract class SolrHighlighter {protected static String[] expandWildcardsInFields(Supplier<Collection<String>> availableFieldNamesSupplier, String... inFields) {- Set<String> expandedFields = new LinkedHashSet<String>();+ Set<String> expandedFields = new LinkedHashSet<>();Collection<String> availableFieldNames = null;for (String inField : inFields) {for (String field : SolrPluginUtils.split(inField)) {diff --git a/solr/core/src/java/org/apache/solr/logging/CircularList.java b/solr/core/src/java/org/apache/solr/logging/CircularList.javaindex 8031671b1e3..1c9909fb14d 100644--- a/solr/core/src/java/org/apache/solr/logging/CircularList.java+++ b/solr/core/src/java/org/apache/solr/logging/CircularList.java@@ -126,7 +126,7 @@ public class CircularList<T> implements Iterable<T> {@Overridepublic Iterator<T> iterator() {- return new Iterator<T>() {+ return new Iterator<>() {int idx = 0;@Overridediff --git a/solr/core/src/java/org/apache/solr/packagemanager/RepositoryManager.java b/solr/core/src/java/org/apache/solr/packagemanager/RepositoryManager.javaindex d0826a30356..5b67b92c9d0 100644--- a/solr/core/src/java/org/apache/solr/packagemanager/RepositoryManager.java+++ b/solr/core/src/java/org/apache/solr/packagemanager/RepositoryManager.java@@ -252,7 +252,7 @@ public class RepositoryManager {throws SolrException {try {SolrPackageRelease release = getPackageRelease(packageName, version);- List<Path> downloadedPaths = new ArrayList<Path>(release.artifacts.size());+ List<Path> downloadedPaths = new ArrayList<>(release.artifacts.size());for (PackageRepository repo : getRepositories()) {if (repo.hasPackage(packageName)) {diff --git a/solr/core/src/java/org/apache/solr/parser/SolrQueryParserBase.java b/solr/core/src/java/org/apache/solr/parser/SolrQueryParserBase.javaindex 337bc6a330c..96bf3d51064 100644--- a/solr/core/src/java/org/apache/solr/parser/SolrQueryParserBase.java+++ b/solr/core/src/java/org/apache/solr/parser/SolrQueryParserBase.java@@ -627,7 +627,7 @@ public abstract class SolrQueryParserBase extends QueryBuilder {protected Query newSynonymQuery(TermAndBoost[] terms) {switch (synonymQueryStyle) {case PICK_BEST:- List<Query> currPosnClauses = new ArrayList<Query>(terms.length);+ List<Query> currPosnClauses = new ArrayList<>(terms.length);for (TermAndBoost term : terms) {currPosnClauses.add(newTermQuery(term.term, term.boost));}diff --git a/solr/core/src/java/org/apache/solr/pkg/PackagePluginHolder.java b/solr/core/src/java/org/apache/solr/pkg/PackagePluginHolder.javaindex ccd28f7108d..ac5ed94d63c 100644--- a/solr/core/src/java/org/apache/solr/pkg/PackagePluginHolder.java+++ b/solr/core/src/java/org/apache/solr/pkg/PackagePluginHolder.java@@ -79,15 +79,15 @@ public class PackagePluginHolder<T> extends PluginBag.PluginHolder<T> {SolrConfig.SolrPluginInfo plugin = SolrConfig.classVsSolrPluginInfo.get(type.getName());PluginInfo info =new PluginInfo(plugin.tag, Collections.singletonMap("class", inst.getClass().getName()));- return new PluginBag.PluginHolder<T>(info, inst);+ return new PluginBag.PluginHolder<>(info, inst);}public static <T> PluginBag.PluginHolder<T> createHolder(PluginInfo info, SolrCore core, Class<T> type, String msg) {if (info.cName.pkg == null) {- return new PluginBag.PluginHolder<T>(info, core.createInitInstance(info, type, msg, null));+ return new PluginBag.PluginHolder<>(info, core.createInitInstance(info, type, msg, null));} else {- return new PackagePluginHolder<T>(+ return new PackagePluginHolder<>(info, core, SolrConfig.classVsSolrPluginInfo.get(type.getName()));}}diff --git a/solr/core/src/java/org/apache/solr/request/NumericFacets.java b/solr/core/src/java/org/apache/solr/request/NumericFacets.javaindex f7789f6c5d7..698f14fa3a8 100644--- a/solr/core/src/java/org/apache/solr/request/NumericFacets.java+++ b/solr/core/src/java/org/apache/solr/request/NumericFacets.java@@ -272,7 +272,7 @@ final class NumericFacets {if (FacetParams.FACET_SORT_COUNT.equals(sort)|| FacetParams.FACET_SORT_COUNT_LEGACY.equals(sort)) {pq =- new PriorityQueue<Entry>(pqSize) {+ new PriorityQueue<>(pqSize) {@Overrideprotected boolean lessThan(Entry a, Entry b) {if (a.count < b.count || (a.count == b.count && a.bits > b.bits)) {@@ -284,7 +284,7 @@ final class NumericFacets {};} else {pq =- new PriorityQueue<Entry>(pqSize) {+ new PriorityQueue<>(pqSize) {@Overrideprotected boolean lessThan(Entry a, Entry b) {return a.bits > b.bits;@@ -518,7 +518,7 @@ final class NumericFacets {if (FacetParams.FACET_SORT_COUNT.equals(sort)|| FacetParams.FACET_SORT_COUNT_LEGACY.equals(sort)) {pq =- new PriorityQueue<Entry>(pqSize) {+ new PriorityQueue<>(pqSize) {@Overrideprotected boolean lessThan(Entry a, Entry b) {if (a.count < b.count || (a.count == b.count && a.bits > b.bits)) {@@ -531,7 +531,7 @@ final class NumericFacets {} else {// sort=indexpq =- new PriorityQueue<Entry>(pqSize) {+ new PriorityQueue<>(pqSize) {@Overrideprotected boolean lessThan(Entry a, Entry b) {return a.bits > b.bits;diff --git a/solr/core/src/java/org/apache/solr/request/PerSegmentSingleValuedFaceting.java b/solr/core/src/java/org/apache/solr/request/PerSegmentSingleValuedFaceting.javaindex 78158beaca7..ab602124137 100644--- a/solr/core/src/java/org/apache/solr/request/PerSegmentSingleValuedFaceting.java+++ b/solr/core/src/java/org/apache/solr/request/PerSegmentSingleValuedFaceting.java@@ -146,7 +146,7 @@ class PerSegmentSingleValuedFaceting {// now merge the per-segment resultsPriorityQueue<SegFacet> queue =- new PriorityQueue<SegFacet>(leaves.size()) {+ new PriorityQueue<>(leaves.size()) {@Overrideprotected boolean lessThan(SegFacet a, SegFacet b) {return a.tempBR.compareTo(b.tempBR) < 0;diff --git a/solr/core/src/java/org/apache/solr/request/json/ObjectUtil.java b/solr/core/src/java/org/apache/solr/request/json/ObjectUtil.javaindex 3ec27488321..337ce85974b 100644--- a/solr/core/src/java/org/apache/solr/request/json/ObjectUtil.java+++ b/solr/core/src/java/org/apache/solr/request/json/ObjectUtil.java@@ -104,7 +104,7 @@ public class ObjectUtil {@SuppressWarnings({"unchecked"})Map<String, Object> sub = (Map<String, Object>) outer.get(path.get(i));if (sub == null) {- sub = new LinkedHashMap<String, Object>();+ sub = new LinkedHashMap<>();outer.put(path.get(i), sub);}outer = sub;diff --git a/solr/core/src/java/org/apache/solr/response/BinaryResponseWriter.java b/solr/core/src/java/org/apache/solr/response/BinaryResponseWriter.javaindex c22835dd743..74a1f4842ae 100644--- a/solr/core/src/java/org/apache/solr/response/BinaryResponseWriter.java+++ b/solr/core/src/java/org/apache/solr/response/BinaryResponseWriter.java@@ -251,7 +251,7 @@ public class BinaryResponseWriter implements BinaryQueryResponseWriter {@Overridepublic Iterator<Entry<String, Object>> iterator() {Iterator<Entry<String, Object>> it = _fields.entrySet().iterator();- return new Iterator<Entry<String, Object>>() {+ return new Iterator<>() {@Overridepublic boolean hasNext() {return it.hasNext();diff --git a/solr/core/src/java/org/apache/solr/response/transform/SubQueryAugmenterFactory.java b/solr/core/src/java/org/apache/solr/response/transform/SubQueryAugmenterFactory.javaindex 8e6fcbf8059..12c96a2434f 100644--- a/solr/core/src/java/org/apache/solr/response/transform/SubQueryAugmenterFactory.java+++ b/solr/core/src/java/org/apache/solr/response/transform/SubQueryAugmenterFactory.java@@ -281,7 +281,7 @@ class SubQueryAugmenter extends DocTransformer {@Overridepublic Iterator<String> getParameterNamesIterator() {final Iterator<String> fieldNames = doc.getFieldNames().iterator();- return new Iterator<String>() {+ return new Iterator<>() {@Overridepublic boolean hasNext() {diff --git a/solr/core/src/java/org/apache/solr/schema/FieldTypePluginLoader.java b/solr/core/src/java/org/apache/solr/schema/FieldTypePluginLoader.javaindex c331a6b5c28..ff555d1e8bc 100644--- a/solr/core/src/java/org/apache/solr/schema/FieldTypePluginLoader.java+++ b/solr/core/src/java/org/apache/solr/schema/FieldTypePluginLoader.java@@ -239,7 +239,7 @@ public final class FieldTypePluginLoader extends AbstractPluginLoader<FieldType>final ArrayList<CharFilterFactory> charFilters = new ArrayList<>();AbstractPluginLoader<CharFilterFactory> charFilterLoader =- new AbstractPluginLoader<CharFilterFactory>(+ new AbstractPluginLoader<>("[schema.xml] analyzer/charFilter", CharFilterFactory.class, false, false) {@Override@@ -303,7 +303,7 @@ public final class FieldTypePluginLoader extends AbstractPluginLoader<FieldType>final ArrayList<TokenizerFactory> tokenizers = new ArrayList<>(1);AbstractPluginLoader<TokenizerFactory> tokenizerLoader =- new AbstractPluginLoader<TokenizerFactory>(+ new AbstractPluginLoader<>("[schema.xml] analyzer/tokenizer", TokenizerFactory.class, false, false) {@Override@@ -375,7 +375,7 @@ public final class FieldTypePluginLoader extends AbstractPluginLoader<FieldType>final ArrayList<TokenFilterFactory> filters = new ArrayList<>();AbstractPluginLoader<TokenFilterFactory> filterLoader =- new AbstractPluginLoader<TokenFilterFactory>(+ new AbstractPluginLoader<>("[schema.xml] analyzer/filter", TokenFilterFactory.class, false, false) {@Overrideprotected TokenFilterFactory create(diff --git a/solr/core/src/java/org/apache/solr/search/QueryContext.java b/solr/core/src/java/org/apache/solr/search/QueryContext.javaindex d542b14d6fb..2950aa73618 100644--- a/solr/core/src/java/org/apache/solr/search/QueryContext.java+++ b/solr/core/src/java/org/apache/solr/search/QueryContext.java@@ -77,7 +77,7 @@ public class QueryContext extends IdentityHashMap implements Closeable {public void addCloseHook(Closeable closeable) {if (closeHooks == null) {- closeHooks = new IdentityHashMap<Closeable, String>();+ closeHooks = new IdentityHashMap<>();// for now, defer closing until the end of the requestSolrRequestInfo.getRequestInfo().addCloseHook(this);}diff --git a/solr/core/src/java/org/apache/solr/search/facet/FacetDebugInfo.java b/solr/core/src/java/org/apache/solr/search/facet/FacetDebugInfo.javaindex b35315148c8..189328b0c73 100644--- a/solr/core/src/java/org/apache/solr/search/facet/FacetDebugInfo.java+++ b/solr/core/src/java/org/apache/solr/search/facet/FacetDebugInfo.java@@ -32,8 +32,8 @@ public class FacetDebugInfo {Map<String, Object> reqDescription;public FacetDebugInfo() {- children = new ArrayList<FacetDebugInfo>();- info = new LinkedHashMap<String, Object>();+ children = new ArrayList<>();+ info = new LinkedHashMap<>();}public void addChild(FacetDebugInfo child) {@@ -76,7 +76,7 @@ public class FacetDebugInfo {info.addAll(this.info);if (children != null && children.size() > 0) {- List<Object> subfacet = new ArrayList<Object>();+ List<Object> subfacet = new ArrayList<>();info.add("sub-facet", subfacet);for (FacetDebugInfo child : children) {subfacet.add(child.getFacetDebugInfo());diff --git a/solr/core/src/java/org/apache/solr/search/facet/FacetHeatmap.java b/solr/core/src/java/org/apache/solr/search/facet/FacetHeatmap.javaindex 322ecb4e8f1..d659562b862 100644--- a/solr/core/src/java/org/apache/solr/search/facet/FacetHeatmap.java+++ b/solr/core/src/java/org/apache/solr/search/facet/FacetHeatmap.java@@ -402,7 +402,7 @@ public class FacetHeatmap extends FacetRequest {static List<List<Integer>> asInts2D(final int columns, final int rows, final int[] counts) {// Returns a view versus returning a copy. This saves memory.// The data is oriented naturally for human/developer viewing: one row at a time top-down- return new AbstractList<List<Integer>>() {+ return new AbstractList<>() {@Overridepublic List<Integer> get(final int rowIdx) {// top-down remember; the heatmap.counts is bottom up check if all zeroes and return null if@@ -419,7 +419,7 @@ public class FacetHeatmap extends FacetRequest {return null;}- return new AbstractList<Integer>() {+ return new AbstractList<>() {@Overridepublic Integer get(int columnIdx) {return counts[columnIdx * rows + y];diff --git a/solr/core/src/java/org/apache/solr/search/facet/FacetQuery.java b/solr/core/src/java/org/apache/solr/search/facet/FacetQuery.javaindex 872cd8ef271..0c933725c6a 100644--- a/solr/core/src/java/org/apache/solr/search/facet/FacetQuery.java+++ b/solr/core/src/java/org/apache/solr/search/facet/FacetQuery.java@@ -38,7 +38,7 @@ public class FacetQuery extends FacetRequest {@Overridepublic Map<String, Object> getFacetDescription() {- Map<String, Object> descr = new HashMap<String, Object>();+ Map<String, Object> descr = new HashMap<>();descr.put("query", q);return descr;}diff --git a/solr/core/src/java/org/apache/solr/search/facet/LegacyFacet.java b/solr/core/src/java/org/apache/solr/search/facet/LegacyFacet.javaindex 14d81f4a744..7ba90fc36d7 100644--- a/solr/core/src/java/org/apache/solr/search/facet/LegacyFacet.java+++ b/solr/core/src/java/org/apache/solr/search/facet/LegacyFacet.java@@ -121,8 +121,8 @@ public class LegacyFacet {protected void addQueryFacet(String q) {parseParams(FacetParams.FACET_QUERY, q);- Map<String, Object> cmd = new HashMap<String, Object>(2);- Map<String, Object> type = new HashMap<String, Object>(1);+ Map<String, Object> cmd = new HashMap<>(2);+ Map<String, Object> type = new HashMap<>(1);type.put("query", cmd);cmd.put("q", q);addSub(key, type);@@ -131,8 +131,8 @@ public class LegacyFacet {protected void addRangeFacet(String field) {parseParams(FacetParams.FACET_RANGE, field);- Map<String, Object> cmd = new HashMap<String, Object>(5);- Map<String, Object> type = new HashMap<String, Object>(1);+ Map<String, Object> cmd = new HashMap<>(5);+ Map<String, Object> type = new HashMap<>(1);type.put("range", cmd);String f = key;diff --git a/solr/core/src/java/org/apache/solr/search/facet/RelatednessAgg.java b/solr/core/src/java/org/apache/solr/search/facet/RelatednessAgg.javaindex e8c24112fba..2a87adcc8fe 100644--- a/solr/core/src/java/org/apache/solr/search/facet/RelatednessAgg.java+++ b/solr/core/src/java/org/apache/solr/search/facet/RelatednessAgg.java@@ -150,7 +150,7 @@ public class RelatednessAgg extends AggValueSource {// How do we find our what key we have in the current context?// loop over all the stats in the current context until we find one that's '==' to this???- List<Query> fgFilters = new ArrayList<Query>(3);+ List<Query> fgFilters = new ArrayList<>(3);fgFilters.add(fgQ);for (FacetContext ctx = fcontext; ctx != null; ctx = ctx.parent) {if (null != ctx.filter) {diff --git a/solr/core/src/java/org/apache/solr/search/facet/UnionDISI.java b/solr/core/src/java/org/apache/solr/search/facet/UnionDISI.javaindex 51f40a9ee7f..eb568a359eb 100644--- a/solr/core/src/java/org/apache/solr/search/facet/UnionDISI.java+++ b/solr/core/src/java/org/apache/solr/search/facet/UnionDISI.java@@ -51,7 +51,7 @@ final class UnionDISI extends SweepDISI {super(size, countAccs);this.maxIdx = size - 1;queue =- new PriorityQueue<SubIterStruct>(size) {+ new PriorityQueue<>(size) {@Overrideprotected boolean lessThan(SubIterStruct a, SubIterStruct b) {return a.docId < b.docId;diff --git a/solr/core/src/java/org/apache/solr/search/facet/UnionDocIterator.java b/solr/core/src/java/org/apache/solr/search/facet/UnionDocIterator.javaindex 15fb0aa195e..69705c55015 100644--- a/solr/core/src/java/org/apache/solr/search/facet/UnionDocIterator.java+++ b/solr/core/src/java/org/apache/solr/search/facet/UnionDocIterator.java@@ -50,7 +50,7 @@ final class UnionDocIterator extends SweepDocIterator {super(subIterators.length);this.maxIdx = size - 1;queue =- new PriorityQueue<SubIterStruct>(size) {+ new PriorityQueue<>(size) {@Overrideprotected boolean lessThan(SubIterStruct a, SubIterStruct b) {return a.docId < b.docId;diff --git a/solr/core/src/java/org/apache/solr/search/join/GraphEdgeCollector.java b/solr/core/src/java/org/apache/solr/search/join/GraphEdgeCollector.javaindex 0a31d157241..9a5d8c73c60 100644--- a/solr/core/src/java/org/apache/solr/search/join/GraphEdgeCollector.java+++ b/solr/core/src/java/org/apache/solr/search/join/GraphEdgeCollector.java@@ -189,7 +189,7 @@ abstract class GraphEdgeCollector extends SimpleCollector implements Collector {/** Build an automaton to represent the frontier query */private Automaton buildAutomaton(BytesRefHash termBytesHash) {// need top pass a sorted set of terms to the autn builder (maybe a better way to avoid this?)- final TreeSet<BytesRef> terms = new TreeSet<BytesRef>();+ final TreeSet<BytesRef> terms = new TreeSet<>();for (int i = 0; i < termBytesHash.size(); i++) {BytesRef ref = new BytesRef();termBytesHash.get(i, ref);diff --git a/solr/core/src/java/org/apache/solr/search/join/GraphQuery.java b/solr/core/src/java/org/apache/solr/search/join/GraphQuery.javaindex 433d0efd36f..6ee4ec44cb4 100644--- a/solr/core/src/java/org/apache/solr/search/join/GraphQuery.java+++ b/solr/core/src/java/org/apache/solr/search/join/GraphQuery.java@@ -159,10 +159,10 @@ public class GraphQuery extends Query {final Scorer cs = scorer(context);final boolean exists = (cs != null && cs.iterator().advance(doc) == doc);if (exists) {- List<Explanation> subs = new ArrayList<Explanation>();+ List<Explanation> subs = new ArrayList<>();return Explanation.match(1.0F, "Graph Match", subs);} else {- List<Explanation> subs = new ArrayList<Explanation>();+ List<Explanation> subs = new ArrayList<>();return Explanation.noMatch("No Graph Match.", subs);}}@@ -262,7 +262,7 @@ public class GraphQuery extends Query {/** Build an automaton to represent the frontier query */private Automaton buildAutomaton(BytesRefHash termBytesHash) {// need top pass a sorted set of terms to the autn builder (maybe a better way to avoid this?)- final TreeSet<BytesRef> terms = new TreeSet<BytesRef>();+ final TreeSet<BytesRef> terms = new TreeSet<>();for (int i = 0; i < termBytesHash.size(); i++) {BytesRef ref = new BytesRef();termBytesHash.get(i, ref);diff --git a/solr/core/src/java/org/apache/solr/search/join/ScoreModeParser.java b/solr/core/src/java/org/apache/solr/search/join/ScoreModeParser.javaindex a92a637908b..5a33c6740c5 100644--- a/solr/core/src/java/org/apache/solr/search/join/ScoreModeParser.java+++ b/solr/core/src/java/org/apache/solr/search/join/ScoreModeParser.java@@ -27,7 +27,7 @@ class ScoreModeParser {@SuppressWarnings("serial")private static final Map<String, ScoreMode> lowerAndCapitalCase =Collections.unmodifiableMap(- new HashMap<String, ScoreMode>() {+ new HashMap<>() {{for (ScoreMode s : ScoreMode.values()) {put(s.name().toLowerCase(Locale.ROOT), s);diff --git a/solr/core/src/java/org/apache/solr/search/stats/StatsUtil.java b/solr/core/src/java/org/apache/solr/search/stats/StatsUtil.javaindex fe4b1d8291c..0a61b94f63e 100644--- a/solr/core/src/java/org/apache/solr/search/stats/StatsUtil.java+++ b/solr/core/src/java/org/apache/solr/search/stats/StatsUtil.java@@ -290,7 +290,7 @@ public class StatsUtil {if (data == null || data.trim().length() == 0) {return null;}- Map<String, CollectionStats> map = new HashMap<String, CollectionStats>();+ Map<String, CollectionStats> map = new HashMap<>();String[] entries = data.split(ENTRY_SEPARATOR);for (String es : entries) {CollectionStats stats = colStatsFromString(es);diff --git a/solr/core/src/java/org/apache/solr/servlet/DirectSolrConnection.java b/solr/core/src/java/org/apache/solr/servlet/DirectSolrConnection.javaindex ef0ac1e9f44..7cc7f798d57 100644--- a/solr/core/src/java/org/apache/solr/servlet/DirectSolrConnection.java+++ b/solr/core/src/java/org/apache/solr/servlet/DirectSolrConnection.java@@ -68,7 +68,7 @@ public class DirectSolrConnection {params = SolrRequestParsers.parseQueryString(pathAndParams.substring(idx + 1));} else {path = pathAndParams;- params = new MapSolrParams(new HashMap<String, String>());+ params = new MapSolrParams(new HashMap<>());}return request(path, params, body);@@ -79,7 +79,7 @@ public class DirectSolrConnection {SolrRequestHandler handler = core.getRequestHandler(path);if (handler == null) {if ("/select".equals(path) || "/select/".equalsIgnoreCase(path)) {- if (params == null) params = new MapSolrParams(new HashMap<String, String>());+ if (params == null) params = new MapSolrParams(new HashMap<>());String qt = params.get(CommonParams.QT);handler = core.getRequestHandler(qt);if (handler == null) {@@ -96,7 +96,7 @@ public class DirectSolrConnection {public String request(SolrRequestHandler handler, SolrParams params, String body)throws Exception {- if (params == null) params = new MapSolrParams(new HashMap<String, String>());+ if (params == null) params = new MapSolrParams(new HashMap<>());// Make a stream for the 'body' contentList<ContentStream> streams = new ArrayList<>(1);diff --git a/solr/core/src/java/org/apache/solr/update/SolrCmdDistributor.java b/solr/core/src/java/org/apache/solr/update/SolrCmdDistributor.javaindex 642a9b12a9f..7b5ddc2dce7 100644--- a/solr/core/src/java/org/apache/solr/update/SolrCmdDistributor.java+++ b/solr/core/src/java/org/apache/solr/update/SolrCmdDistributor.java@@ -65,7 +65,7 @@ public class SolrCmdDistributor implements Closeable {private int retryPause = 500;private final List<Error> allErrors = new ArrayList<>();- private final List<Error> errors = Collections.synchronizedList(new ArrayList<Error>());+ private final List<Error> errors = Collections.synchronizedList(new ArrayList<>());private final CompletionService<Object> completionService;private final Set<Future<Object>> pending = new HashSet<>();diff --git a/solr/core/src/java/org/apache/solr/update/StreamingSolrClients.java b/solr/core/src/java/org/apache/solr/update/StreamingSolrClients.javaindex 74a1fc4adc5..2d29e32dd00 100644--- a/solr/core/src/java/org/apache/solr/update/StreamingSolrClients.java+++ b/solr/core/src/java/org/apache/solr/update/StreamingSolrClients.java@@ -44,7 +44,7 @@ public class StreamingSolrClients {private Http2SolrClient httpClient;private Map<String, ConcurrentUpdateHttp2SolrClient> solrClients = new HashMap<>();- private List<Error> errors = Collections.synchronizedList(new ArrayList<Error>());+ private List<Error> errors = Collections.synchronizedList(new ArrayList<>());private ExecutorService updateExecutor;diff --git a/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java b/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.javaindex 8466f022368..6c75f8307f5 100644--- a/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java+++ b/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java@@ -1280,7 +1280,7 @@ public class DistributedUpdateProcessor extends UpdateRequestProcessor {this.errors = errors;// create a merged copy of the metadata from all wrapped exceptions- NamedList<String> metadata = new NamedList<String>();+ NamedList<String> metadata = new NamedList<>();for (Error error : errors) {if (error.e instanceof SolrException) {SolrException e = (SolrException) error.e;diff --git a/solr/core/src/java/org/apache/solr/update/processor/ParseDoubleFieldUpdateProcessorFactory.java b/solr/core/src/java/org/apache/solr/update/processor/ParseDoubleFieldUpdateProcessorFactory.javaindex be0c82cbeab..1899a10e31d 100644--- a/solr/core/src/java/org/apache/solr/update/processor/ParseDoubleFieldUpdateProcessorFactory.java+++ b/solr/core/src/java/org/apache/solr/update/processor/ParseDoubleFieldUpdateProcessorFactory.java@@ -71,7 +71,7 @@ public class ParseDoubleFieldUpdateProcessorFactoryprivate final Locale locale;// NumberFormat instances are not thread safeprivate final ThreadLocal<NumberFormat> numberFormat =- new ThreadLocal<NumberFormat>() {+ new ThreadLocal<>() {@Overrideprotected NumberFormat initialValue() {NumberFormat format = NumberFormat.getInstance(locale);diff --git a/solr/core/src/java/org/apache/solr/update/processor/ParseFloatFieldUpdateProcessorFactory.java b/solr/core/src/java/org/apache/solr/update/processor/ParseFloatFieldUpdateProcessorFactory.javaindex dc1462b2f56..599a5f32603 100644--- a/solr/core/src/java/org/apache/solr/update/processor/ParseFloatFieldUpdateProcessorFactory.java+++ b/solr/core/src/java/org/apache/solr/update/processor/ParseFloatFieldUpdateProcessorFactory.java@@ -71,7 +71,7 @@ public class ParseFloatFieldUpdateProcessorFactory extends ParseNumericFieldUpda// NumberFormat instances are not thread safeprivate final ThreadLocal<NumberFormat> numberFormat =- new ThreadLocal<NumberFormat>() {+ new ThreadLocal<>() {@Overrideprotected NumberFormat initialValue() {NumberFormat format = NumberFormat.getInstance(locale);diff --git a/solr/core/src/java/org/apache/solr/update/processor/ParseIntFieldUpdateProcessorFactory.java b/solr/core/src/java/org/apache/solr/update/processor/ParseIntFieldUpdateProcessorFactory.javaindex 01b50ad5c9d..9d9204e39b9 100644--- a/solr/core/src/java/org/apache/solr/update/processor/ParseIntFieldUpdateProcessorFactory.java+++ b/solr/core/src/java/org/apache/solr/update/processor/ParseIntFieldUpdateProcessorFactory.java@@ -69,7 +69,7 @@ public class ParseIntFieldUpdateProcessorFactory extends ParseNumericFieldUpdate// NumberFormat instances are not thread safeprivate final ThreadLocal<NumberFormat> numberFormat =- new ThreadLocal<NumberFormat>() {+ new ThreadLocal<>() {@Overrideprotected NumberFormat initialValue() {NumberFormat format = NumberFormat.getInstance(locale);diff --git a/solr/core/src/java/org/apache/solr/update/processor/ParseLongFieldUpdateProcessorFactory.java b/solr/core/src/java/org/apache/solr/update/processor/ParseLongFieldUpdateProcessorFactory.javaindex 02134dfed00..01b683ae6f1 100644--- a/solr/core/src/java/org/apache/solr/update/processor/ParseLongFieldUpdateProcessorFactory.java+++ b/solr/core/src/java/org/apache/solr/update/processor/ParseLongFieldUpdateProcessorFactory.java@@ -69,7 +69,7 @@ public class ParseLongFieldUpdateProcessorFactory extends ParseNumericFieldUpdat// NumberFormat instances are not thread safeprivate final ThreadLocal<NumberFormat> numberFormat =- new ThreadLocal<NumberFormat>() {+ new ThreadLocal<>() {@Overrideprotected NumberFormat initialValue() {NumberFormat format = NumberFormat.getInstance(locale);diff --git a/solr/core/src/java/org/apache/solr/update/processor/TolerantUpdateProcessor.java b/solr/core/src/java/org/apache/solr/update/processor/TolerantUpdateProcessor.javaindex 77612ffdd92..73d4fd97faa 100644--- a/solr/core/src/java/org/apache/solr/update/processor/TolerantUpdateProcessor.java+++ b/solr/core/src/java/org/apache/solr/update/processor/TolerantUpdateProcessor.java@@ -86,7 +86,7 @@ public class TolerantUpdateProcessor extends UpdateRequestProcessor {* Known errors that occurred in this batch, in order encountered (may not be the same as the* order the commands were originally executed in due to the async distributed updates).*/- private final List<ToleratedUpdateError> knownErrors = new ArrayList<ToleratedUpdateError>();+ private final List<ToleratedUpdateError> knownErrors = new ArrayList<>();// Kludge: Because deleteByQuery updates are forwarded to every leader, we can get identical// errors reported by every leader for the same underlying problem.@@ -372,7 +372,7 @@ public class TolerantUpdateProcessor extends UpdateRequestProcessor {NamedList<String> firstErrMetadata = first.getMetadata();if (null == firstErrMetadata) { // obnoxious- firstErrMetadata = new NamedList<String>();+ firstErrMetadata = new NamedList<>();first.setMetadata(firstErrMetadata);} else {// any existing metadata representing ToleratedUpdateErrors in this single exception needsdiff --git a/solr/core/src/java/org/apache/solr/util/DistanceUnits.java b/solr/core/src/java/org/apache/solr/util/DistanceUnits.javaindex bd2feae292a..8c0bc91fd24 100644--- a/solr/core/src/java/org/apache/solr/util/DistanceUnits.java+++ b/solr/core/src/java/org/apache/solr/util/DistanceUnits.java@@ -119,7 +119,7 @@ public class DistanceUnits {public static synchronized void addUnits(String strId, double earthRadius, double multiplierThisToDegrees) {// copy-on-write.- Map<String, DistanceUnits> map = new HashMap<String, DistanceUnits>(instances);+ Map<String, DistanceUnits> map = new HashMap<>(instances);map.put(strId, new DistanceUnits(strId, earthRadius, multiplierThisToDegrees));instances = ImmutableMap.copyOf(map);}diff --git a/solr/core/src/java/org/apache/solr/util/TestInjection.java b/solr/core/src/java/org/apache/solr/util/TestInjection.javaindex 80f0cd7f56b..3bae33adf7d 100644--- a/solr/core/src/java/org/apache/solr/util/TestInjection.java+++ b/solr/core/src/java/org/apache/solr/util/TestInjection.java@@ -141,7 +141,7 @@ public class TestInjection {public static volatile String wrongIndexFingerprint = null;- private static volatile Set<Timer> timers = Collections.synchronizedSet(new HashSet<Timer>());+ private static volatile Set<Timer> timers = Collections.synchronizedSet(new HashSet<>());private static volatile AtomicInteger countPrepRecoveryOpPauseForever = new AtomicInteger(0);diff --git a/solr/core/src/test/org/apache/solr/TestRandomFaceting.java b/solr/core/src/test/org/apache/solr/TestRandomFaceting.javaindex 806dd4f896c..de8505bc4d7 100644--- a/solr/core/src/test/org/apache/solr/TestRandomFaceting.java+++ b/solr/core/src/test/org/apache/solr/TestRandomFaceting.java@@ -358,7 +358,7 @@ public class TestRandomFaceting extends SolrTestCaseJ4 {e -> {List<Object> facetSortedByIndex = (List<Object>) e.getValue();Map<Integer, List<Object>> stratas =- new HashMap<Integer, List<Object>>() {+ new HashMap<>() {@Override // poor man multimap, I won't do that anymore, I swear.public List<Object> get(Object key) {if (!containsKey(key)) {diff --git a/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeyNothingIsSafeWithPullReplicasTest.java b/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeyNothingIsSafeWithPullReplicasTest.javaindex d27fbe00c1f..379345e5472 100644--- a/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeyNothingIsSafeWithPullReplicasTest.java+++ b/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeyNothingIsSafeWithPullReplicasTest.java@@ -354,7 +354,7 @@ public class ChaosMonkeyNothingIsSafeWithPullReplicasTest extends AbstractFullDi}private Set<String> getAddFails(List<StoppableIndexingThread> threads) {- Set<String> addFails = new HashSet<String>();+ Set<String> addFails = new HashSet<>();for (StoppableIndexingThread thread : threads) {addFails.addAll(thread.getAddFails());// addFails.addAll(thread.getAddFailsMinRf());@@ -363,7 +363,7 @@ public class ChaosMonkeyNothingIsSafeWithPullReplicasTest extends AbstractFullDi}private Set<String> getDeleteFails(List<StoppableIndexingThread> threads) {- Set<String> deleteFails = new HashSet<String>();+ Set<String> deleteFails = new HashSet<>();for (StoppableIndexingThread thread : threads) {deleteFails.addAll(thread.getDeleteFails());// deleteFails.addAll(thread.getDeleteFailsMinRf());diff --git a/solr/core/src/test/org/apache/solr/cloud/HttpPartitionTest.java b/solr/core/src/test/org/apache/solr/cloud/HttpPartitionTest.javaindex c7dcbc40e71..42cd7278909 100644--- a/solr/core/src/test/org/apache/solr/cloud/HttpPartitionTest.java+++ b/solr/core/src/test/org/apache/solr/cloud/HttpPartitionTest.java@@ -522,7 +522,7 @@ public class HttpPartitionTest extends AbstractFullDistribZkTestBase {}}}- List<Replica> replicas = new ArrayList<Replica>();+ List<Replica> replicas = new ArrayList<>();replicas.addAll(activeReplicas.values());return replicas;}@@ -538,7 +538,7 @@ public class HttpPartitionTest extends AbstractFullDistribZkTestBase {Replica leader =ZkStateReader.from(cloudClient).getLeaderRetry(testCollectionName, "shard1", 10000);HttpSolrClient leaderSolr = getHttpSolrClient(leader, testCollectionName);- List<HttpSolrClient> replicas = new ArrayList<HttpSolrClient>(notLeaders.size());+ List<HttpSolrClient> replicas = new ArrayList<>(notLeaders.size());for (Replica r : notLeaders) {replicas.add(getHttpSolrClient(r, testCollectionName));diff --git a/solr/core/src/test/org/apache/solr/cloud/OutOfBoxZkACLAndCredentialsProvidersTest.java b/solr/core/src/test/org/apache/solr/cloud/OutOfBoxZkACLAndCredentialsProvidersTest.javaindex 59739a19066..73b5f47c765 100644--- a/solr/core/src/test/org/apache/solr/cloud/OutOfBoxZkACLAndCredentialsProvidersTest.java+++ b/solr/core/src/test/org/apache/solr/cloud/OutOfBoxZkACLAndCredentialsProvidersTest.java@@ -120,7 +120,7 @@ public class OutOfBoxZkACLAndCredentialsProvidersTest extends SolrTestCaseJ4 {public void testOpenACLUnsafeAllover() throws Exception {SolrZkClient zkClient = new SolrZkClient(zkServer.getZkHost(), AbstractZkTestCase.TIMEOUT);try {- List<String> verifiedList = new ArrayList<String>();+ List<String> verifiedList = new ArrayList<>();assertOpenACLUnsafeAllover(zkClient, "/", verifiedList);assertTrue(verifiedList.contains("/solr"));assertTrue(verifiedList.contains("/solr/unprotectedCreateNode"));diff --git a/solr/core/src/test/org/apache/solr/cloud/OverseerSolrResponseTest.java b/solr/core/src/test/org/apache/solr/cloud/OverseerSolrResponseTest.javaindex 5caeeaef5e2..8dcdeeea8aa 100644--- a/solr/core/src/test/org/apache/solr/cloud/OverseerSolrResponseTest.java+++ b/solr/core/src/test/org/apache/solr/cloud/OverseerSolrResponseTest.java@@ -24,7 +24,7 @@ import org.apache.solr.common.util.SimpleOrderedMap;public class OverseerSolrResponseTest extends SolrTestCaseJ4 {public void testEmpty() {- assertSerializeDeserialize(new NamedList<Object>());+ assertSerializeDeserialize(new NamedList<>());}public void testWithSingleObject() {diff --git a/solr/core/src/test/org/apache/solr/cloud/ReplicationFactorTest.java b/solr/core/src/test/org/apache/solr/cloud/ReplicationFactorTest.javaindex 3a20e85d6aa..042e7293cc2 100644--- a/solr/core/src/test/org/apache/solr/cloud/ReplicationFactorTest.java+++ b/solr/core/src/test/org/apache/solr/cloud/ReplicationFactorTest.java@@ -116,7 +116,7 @@ public class ReplicationFactorTest extends AbstractFullDistribZkTestBase {ensureAllReplicasAreActive(testCollectionName, shardId, numShards, replicationFactor, 30);assertTrue("Expected active 1 replicas for " + testCollectionName, replicas.size() == 1);- List<SolrInputDocument> batch = new ArrayList<SolrInputDocument>(10);+ List<SolrInputDocument> batch = new ArrayList<>(10);for (int i = 0; i < 15; i++) {SolrInputDocument doc = new SolrInputDocument();doc.addField(id, String.valueOf(i));@@ -227,7 +227,7 @@ public class ReplicationFactorTest extends AbstractFullDistribZkTestBase {// First add the docs indicatedList<String> byIdsList = new ArrayList<>();List<String> byQueryList = new ArrayList<>();- List<SolrInputDocument> batch = new ArrayList<SolrInputDocument>(10);+ List<SolrInputDocument> batch = new ArrayList<>(10);for (int myId : byIdsSet) {SolrInputDocument doc = new SolrInputDocument();doc.addField(id, myId);@@ -322,7 +322,7 @@ public class ReplicationFactorTest extends AbstractFullDistribZkTestBase {doDBIdWithRetry(2, 5, "deletes should have propagated to 2 replicas", 1);// SOLR-13599 sanity check if problem is related to sending a batch- List<SolrInputDocument> batch = new ArrayList<SolrInputDocument>(15);+ List<SolrInputDocument> batch = new ArrayList<>(15);for (int i = 30; i < 45; i++) {SolrInputDocument doc = new SolrInputDocument();doc.addField(id, String.valueOf(i));@@ -360,7 +360,7 @@ public class ReplicationFactorTest extends AbstractFullDistribZkTestBase {doDBIdWithRetry(3, 5, "delete should have propagated to all 3 replicas", 1);// now send a batch- batch = new ArrayList<SolrInputDocument>(10);+ batch = new ArrayList<>(10);for (int i = 5; i < 15; i++) {SolrInputDocument doc = new SolrInputDocument();doc.addField(id, String.valueOf(i));@@ -386,7 +386,7 @@ public class ReplicationFactorTest extends AbstractFullDistribZkTestBase {assertRf(2, "doc should have succeeded, only one replica should be down", rf);// now send a batch (again)- batch = new ArrayList<SolrInputDocument>(10);+ batch = new ArrayList<>(10);for (int i = 15; i < 30; i++) {SolrInputDocument doc = new SolrInputDocument();doc.addField(id, String.valueOf(i));@@ -404,7 +404,7 @@ public class ReplicationFactorTest extends AbstractFullDistribZkTestBase {log.info("Closing second proxy port (again)");getProxyForReplica(replicas.get(1)).close();- batch = new ArrayList<SolrInputDocument>(10);+ batch = new ArrayList<>(10);for (int i = 30; i < 45; i++) {SolrInputDocument doc = new SolrInputDocument();doc.addField(id, String.valueOf(i));@@ -435,7 +435,7 @@ public class ReplicationFactorTest extends AbstractFullDistribZkTestBase {sendDoc(idList[0]);return;}- List<SolrInputDocument> batch = new ArrayList<SolrInputDocument>(10);+ List<SolrInputDocument> batch = new ArrayList<>(10);for (int docId : idList) {SolrInputDocument doc = new SolrInputDocument();doc.addField(id, docId);diff --git a/solr/core/src/test/org/apache/solr/cloud/TestCloudInspectUtil.java b/solr/core/src/test/org/apache/solr/cloud/TestCloudInspectUtil.javaindex b6ff6344a91..eda82a06c84 100644--- a/solr/core/src/test/org/apache/solr/cloud/TestCloudInspectUtil.java+++ b/solr/core/src/test/org/apache/solr/cloud/TestCloudInspectUtil.java@@ -53,8 +53,8 @@ public class TestCloudInspectUtil extends SolrTestCaseJ4 {// ################################- addFails = new HashSet<String>();- deleteFails = new HashSet<String>();+ addFails = new HashSet<>();+ deleteFails = new HashSet<>();a = getDocList("2", "3", "4");b = getDocList("2", "3");@@ -66,8 +66,8 @@ public class TestCloudInspectUtil extends SolrTestCaseJ4 {// ################################- addFails = new HashSet<String>();- deleteFails = new HashSet<String>();+ addFails = new HashSet<>();+ deleteFails = new HashSet<>();a = getDocList("2", "3", "4");b = getDocList("2", "3", "5");@@ -80,8 +80,8 @@ public class TestCloudInspectUtil extends SolrTestCaseJ4 {// ################################- addFails = new HashSet<String>();- deleteFails = new HashSet<String>();+ addFails = new HashSet<>();+ deleteFails = new HashSet<>();a = getDocList("2", "3", "4");b = getDocList("2", "3", "5");@@ -94,8 +94,8 @@ public class TestCloudInspectUtil extends SolrTestCaseJ4 {// ################################- final HashSet<String> addFailsExpectEx = new HashSet<String>();- final HashSet<String> deleteFailsExpectEx = new HashSet<String>();+ final HashSet<String> addFailsExpectEx = new HashSet<>();+ final HashSet<String> deleteFailsExpectEx = new HashSet<>();final SolrDocumentList aExpectEx = getDocList("2", "3", "4");final SolrDocumentList bExpectEx = getDocList("2", "3", "4");diff --git a/solr/core/src/test/org/apache/solr/cloud/TestCloudPivotFacet.java b/solr/core/src/test/org/apache/solr/cloud/TestCloudPivotFacet.javaindex babe1eac002..c4b372ceb99 100644--- a/solr/core/src/test/org/apache/solr/cloud/TestCloudPivotFacet.java+++ b/solr/core/src/test/org/apache/solr/cloud/TestCloudPivotFacet.java@@ -170,7 +170,7 @@ public class TestCloudPivotFacet extends AbstractFullDistribZkTestBase {ModifiableSolrParams pivotP = params(FACET, "true");// put our FACET_PIVOT params in a set in case we just happen to pick the same one twice- LinkedHashSet<String> pivotParamValues = new LinkedHashSet<String>();+ LinkedHashSet<String> pivotParamValues = new LinkedHashSet<>();pivotParamValues.add(buildPivotParamValue(buildRandomPivot(fieldNames)));if (random().nextBoolean()) {diff --git a/solr/core/src/test/org/apache/solr/cloud/TestConfigSetsAPIExclusivity.java b/solr/core/src/test/org/apache/solr/cloud/TestConfigSetsAPIExclusivity.javaindex 26cf55b47a4..7a2b59f8c75 100644--- a/solr/core/src/test/org/apache/solr/cloud/TestConfigSetsAPIExclusivity.java+++ b/solr/core/src/test/org/apache/solr/cloud/TestConfigSetsAPIExclusivity.java@@ -81,7 +81,7 @@ public class TestConfigSetsAPIExclusivity extends SolrTestCaseJ4 {for (ConfigSetsAPIThread thread : threads) {thread.join();}- List<Exception> exceptions = new LinkedList<Exception>();+ List<Exception> exceptions = new LinkedList<>();for (ConfigSetsAPIThread thread : threads) {exceptions.addAll(thread.getUnexpectedExceptions());}@@ -107,7 +107,7 @@ public class TestConfigSetsAPIExclusivity extends SolrTestCaseJ4 {private abstract static class ConfigSetsAPIThread extends Thread {private MiniSolrCloudCluster solrCluster;private int trials;- private List<Exception> unexpectedExceptions = new LinkedList<Exception>();+ private List<Exception> unexpectedExceptions = new LinkedList<>();private List<String> allowedExceptions =Arrays.asList(new String[] {diff --git a/solr/core/src/test/org/apache/solr/handler/component/DistributedDebugComponentTest.java b/solr/core/src/test/org/apache/solr/handler/component/DistributedDebugComponentTest.javaindex ffac0698973..a4f2e96b927 100644--- a/solr/core/src/test/org/apache/solr/handler/component/DistributedDebugComponentTest.java+++ b/solr/core/src/test/org/apache/solr/handler/component/DistributedDebugComponentTest.java@@ -199,7 +199,7 @@ public class DistributedDebugComponentTest extends SolrJettyTestBase {}q.setQuery(qs);- Set<String> shards = new HashSet<String>(Arrays.asList(shard1, shard2));+ Set<String> shards = new HashSet<>(Arrays.asList(shard1, shard2));if (random().nextBoolean()) {shards.remove(shard1);} else if (random().nextBoolean()) {@@ -207,7 +207,7 @@ public class DistributedDebugComponentTest extends SolrJettyTestBase {}q.set("shards", String.join(",", shards));- List<String> debug = new ArrayList<String>(10);+ List<String> debug = new ArrayList<>(10);boolean all = false;final boolean timing = random().nextBoolean();diff --git a/solr/core/src/test/org/apache/solr/handler/component/DistributedTermsComponentTest.java b/solr/core/src/test/org/apache/solr/handler/component/DistributedTermsComponentTest.javaindex 38574cba64f..2d3fce4a44e 100644--- a/solr/core/src/test/org/apache/solr/handler/component/DistributedTermsComponentTest.java+++ b/solr/core/src/test/org/apache/solr/handler/component/DistributedTermsComponentTest.java@@ -186,7 +186,7 @@ public class DistributedTermsComponentTest extends BaseDistributedSearchTestCase// SOLR-9243 doesn't support max/min countfor (int i = 0; i < q.length; i += 2) {if (q[i].equals("terms.sort") && q[i + 1].equals("index") || rarely()) {- List<Object> params = new ArrayList<Object>(Arrays.asList(q));+ List<Object> params = new ArrayList<>(Arrays.asList(q));if (usually()) {params.add("terms.mincount");params.add(random().nextInt(4) - 1);diff --git a/solr/core/src/test/org/apache/solr/highlight/HighlighterTest.java b/solr/core/src/test/org/apache/solr/highlight/HighlighterTest.javaindex 3d1e5c24085..73c47e14690 100644--- a/solr/core/src/test/org/apache/solr/highlight/HighlighterTest.java+++ b/solr/core/src/test/org/apache/solr/highlight/HighlighterTest.java@@ -902,13 +902,13 @@ public class HighlighterTest extends SolrTestCaseJ4 {// SOLR-5127args.put("hl.fl", (random().nextBoolean() ? "foo_*,bar_*" : "bar_*,foo_*"));// hl.fl ordering need not be preserved in output- final Set<String> highlightedSetExpected = new HashSet<String>();+ final Set<String> highlightedSetExpected = new HashSet<>();highlightedSetExpected.add("foo_s");highlightedSetExpected.add("bar_s");try (var localRequest = req(args, "q", "test")) {highlighter = getHighlighter();final Set<String> highlightedSetActual =- new HashSet<String>(+ new HashSet<>(Arrays.asList(highlighter.getHighlightFields(null, localRequest, new String[] {})));assertEquals(highlightedSetExpected, highlightedSetActual);}diff --git a/solr/core/src/test/org/apache/solr/request/macro/TestMacroExpander.java b/solr/core/src/test/org/apache/solr/request/macro/TestMacroExpander.javaindex 88e0b19efdf..680b85985b5 100644--- a/solr/core/src/test/org/apache/solr/request/macro/TestMacroExpander.java+++ b/solr/core/src/test/org/apache/solr/request/macro/TestMacroExpander.java@@ -27,7 +27,7 @@ public class TestMacroExpander extends SolrTestCase {@Testpublic void testExamples() {- final Map<String, String[]> testParams = new HashMap<String, String[]>();+ final Map<String, String[]> testParams = new HashMap<>();final MacroExpander me;// example behavior unaffected by absence or value of failOnMissingParamsif (random().nextBoolean()) {@@ -73,7 +73,7 @@ public class TestMacroExpander extends SolrTestCase {@Testpublic void testOnMissingParams() {- final Map<String, String[]> testParams = new HashMap<String, String[]>();+ final Map<String, String[]> testParams = new HashMap<>();final MacroExpander meSkipOnMissingParams = new MacroExpander(testParams);final MacroExpander meFailOnMissingParams = new MacroExpander(testParams, true);diff --git a/solr/core/src/test/org/apache/solr/schema/SpatialRPTFieldTypeTest.java b/solr/core/src/test/org/apache/solr/schema/SpatialRPTFieldTypeTest.javaindex b99555f42f3..c76a2afdbe1 100644--- a/solr/core/src/test/org/apache/solr/schema/SpatialRPTFieldTypeTest.java+++ b/solr/core/src/test/org/apache/solr/schema/SpatialRPTFieldTypeTest.java@@ -159,7 +159,7 @@ public class SpatialRPTFieldTypeTest extends AbstractBadConfigTestBase {IndexSchema oldSchema = h.getCore().getLatestSchema();SpatialRecursivePrefixTreeFieldType rptFieldType = new SpatialRecursivePrefixTreeFieldType();- Map<String, String> rptMap = new HashMap<String, String>();+ Map<String, String> rptMap = new HashMap<>();rptFieldType.setTypeName("location_rpt");rptMap.put("geo", "true");@@ -282,7 +282,7 @@ public class SpatialRPTFieldTypeTest extends AbstractBadConfigTestBase {if (fieldType == null) {fieldType = new SpatialRecursivePrefixTreeFieldType();}- Map<String, String> rptMap = new HashMap<String, String>();+ Map<String, String> rptMap = new HashMap<>();if (distanceUnits != null) rptMap.put("distanceUnits", distanceUnits);rptMap.put("geo", "true");if (format != null) {diff --git a/solr/core/src/test/org/apache/solr/search/ReturnFieldsTest.java b/solr/core/src/test/org/apache/solr/search/ReturnFieldsTest.javaindex 67c42a7e4c2..a68b5b332be 100644--- a/solr/core/src/test/org/apache/solr/search/ReturnFieldsTest.java+++ b/solr/core/src/test/org/apache/solr/search/ReturnFieldsTest.java@@ -440,7 +440,7 @@ public class ReturnFieldsTest extends SolrTestCaseJ4 {assertEquals(debug, 5, docOut.size());assertEquals(debug,- new HashSet<String>(Arrays.asList("id", "subword", "uniq", "foo_2_s1", "store")),+ new HashSet<>(Arrays.asList("id", "subword", "uniq", "foo_2_s1", "store")),docOut.getFieldNames());assertTrue(debug, docOut.get("id") instanceof StringField);assertTrue(debug, docOut.get("store") instanceof StringField);diff --git a/solr/core/src/test/org/apache/solr/search/TestComplexPhraseQParserPlugin.java b/solr/core/src/test/org/apache/solr/search/TestComplexPhraseQParserPlugin.javaindex 90f89b539dd..84d0060d9a8 100644--- a/solr/core/src/test/org/apache/solr/search/TestComplexPhraseQParserPlugin.java+++ b/solr/core/src/test/org/apache/solr/search/TestComplexPhraseQParserPlugin.java@@ -95,7 +95,7 @@ public class TestComplexPhraseQParserPlugin extends SolrTestCaseJ4 {@Testpublic void test() {- HashMap<String, String> args = new HashMap<String, String>();+ HashMap<String, String> args = new HashMap<>();args.put(QueryParsing.DEFTYPE, ComplexPhraseQParserPlugin.NAME);args.put(CommonParams.FL, "id");@@ -175,7 +175,7 @@ public class TestComplexPhraseQParserPlugin extends SolrTestCaseJ4 {@Testpublic void testPhraseHighlighter() {- HashMap<String, String> args = new HashMap<String, String>();+ HashMap<String, String> args = new HashMap<>();args.put(QueryParsing.DEFTYPE, ComplexPhraseQParserPlugin.NAME);args.put(CommonParams.FL, "id");diff --git a/solr/core/src/test/org/apache/solr/search/TestMissingGroups.java b/solr/core/src/test/org/apache/solr/search/TestMissingGroups.javaindex 2bdf1d55373..b485f0a1055 100644--- a/solr/core/src/test/org/apache/solr/search/TestMissingGroups.java+++ b/solr/core/src/test/org/apache/solr/search/TestMissingGroups.java@@ -47,7 +47,7 @@ public class TestMissingGroups extends SolrTestCaseJ4 {// setup some key values for some random docs in our index// every other doc will have no values for these fields// NOTE: special values may be randomly assigned to the *same* docs- final List<SpecialField> specials = new ArrayList<SpecialField>(7);+ final List<SpecialField> specials = new ArrayList<>(7);specials.add(new SpecialField(numDocs, "group_s1", "xxx", "yyy"));specials.add(new SpecialField(numDocs, "group_ti", "42", "24"));specials.add(new SpecialField(numDocs, "group_td", "34.56", "12.78"));diff --git a/solr/core/src/test/org/apache/solr/search/TestRandomCollapseQParserPlugin.java b/solr/core/src/test/org/apache/solr/search/TestRandomCollapseQParserPlugin.javaindex 72da402582f..62ac2b2b9b2 100644--- a/solr/core/src/test/org/apache/solr/search/TestRandomCollapseQParserPlugin.java+++ b/solr/core/src/test/org/apache/solr/search/TestRandomCollapseQParserPlugin.java@@ -70,7 +70,7 @@ public class TestRandomCollapseQParserPlugin extends SolrTestCaseJ4 {CursorPagingTest.pruneAndDeterministicallySort(h.getCore().getLatestSchema().getFields().keySet());- ALL_COLLAPSE_FIELD_NAMES = new ArrayList<String>(ALL_SORT_FIELD_NAMES.size());+ ALL_COLLAPSE_FIELD_NAMES = new ArrayList<>(ALL_SORT_FIELD_NAMES.size());for (String candidate : ALL_SORT_FIELD_NAMES) {if (candidate.startsWith("str")|| candidate.startsWith("float")diff --git a/solr/core/src/test/org/apache/solr/search/facet/TestCloudJSONFacetJoinDomain.java b/solr/core/src/test/org/apache/solr/search/facet/TestCloudJSONFacetJoinDomain.javaindex 02ef05727e4..68692e45ed7 100644--- a/solr/core/src/test/org/apache/solr/search/facet/TestCloudJSONFacetJoinDomain.java+++ b/solr/core/src/test/org/apache/solr/search/facet/TestCloudJSONFacetJoinDomain.java@@ -587,7 +587,7 @@ public class TestCloudJSONFacetJoinDomain extends SolrCloudTestCase {return "*:*";}final int numClauses = TestUtil.nextInt(random(), 3, 10);- List<String> clauses = new ArrayList<String>(numClauses);+ List<String> clauses = new ArrayList<>(numClauses);for (int c = 0; c < numClauses; c++) {final int fieldNum = random().nextInt(MAX_FIELD_NUM);// keep queries simple, just use str fields - not point of testdiff --git a/solr/core/src/test/org/apache/solr/search/function/TestMinMaxOnMultiValuedField.java b/solr/core/src/test/org/apache/solr/search/function/TestMinMaxOnMultiValuedField.javaindex 35c020625ea..374b2e510a6 100644--- a/solr/core/src/test/org/apache/solr/search/function/TestMinMaxOnMultiValuedField.java+++ b/solr/core/src/test/org/apache/solr/search/function/TestMinMaxOnMultiValuedField.java@@ -958,7 +958,7 @@ public class TestMinMaxOnMultiValuedField extends SolrTestCaseJ4 {sf.sortMissingFirst() || sf.sortMissingLast());// make a copy we can re-order later- final List<Object> vals = new ArrayList<Object>(sortedValues.length);+ final List<Object> vals = new ArrayList<>(sortedValues.length);Collections.addAll(vals, sortedValues);String minFunc = "field(" + f + ",min)";diff --git a/solr/core/src/test/org/apache/solr/security/MultiDestinationAuditLoggerTest.java b/solr/core/src/test/org/apache/solr/security/MultiDestinationAuditLoggerTest.javaindex da0c4ab286d..84f46717f51 100644--- a/solr/core/src/test/org/apache/solr/security/MultiDestinationAuditLoggerTest.java+++ b/solr/core/src/test/org/apache/solr/security/MultiDestinationAuditLoggerTest.java@@ -34,7 +34,7 @@ public class MultiDestinationAuditLoggerTest extends SolrTestCaseJ4 {config.put("class", "solr.MultiDestinationAuditLogger");config.put("async", false);config.put("eventTypes", Arrays.asList(AuditEvent.EventType.COMPLETED.name()));- ArrayList<Map<String, Object>> plugins = new ArrayList<Map<String, Object>>();+ ArrayList<Map<String, Object>> plugins = new ArrayList<>();Map<String, Object> conf1 = new HashMap<>();conf1.put("class", "solr.SolrLogAuditLoggerPlugin");diff --git a/solr/core/src/test/org/apache/solr/uninverting/TestUninvertingReader.java b/solr/core/src/test/org/apache/solr/uninverting/TestUninvertingReader.javaindex 972ebacde65..50993bd1600 100644--- a/solr/core/src/test/org/apache/solr/uninverting/TestUninvertingReader.java+++ b/solr/core/src/test/org/apache/solr/uninverting/TestUninvertingReader.java@@ -232,12 +232,12 @@ public class TestUninvertingReader extends SolrTestCase {final LegacyFieldType NO_TRIE_TYPE = new LegacyFieldType(LegacyIntField.TYPE_NOT_STORED);NO_TRIE_TYPE.setNumericPrecisionStep(Integer.MAX_VALUE);- final Map<String, Type> UNINVERT_MAP = new LinkedHashMap<String, Type>();+ final Map<String, Type> UNINVERT_MAP = new LinkedHashMap<>();UNINVERT_MAP.put("notrie_single", Type.SORTED_SET_INTEGER);UNINVERT_MAP.put("notrie_multi", Type.SORTED_SET_INTEGER);UNINVERT_MAP.put("trie_single", Type.SORTED_SET_INTEGER);UNINVERT_MAP.put("trie_multi", Type.SORTED_SET_INTEGER);- final Set<String> MULTI_VALUES = new LinkedHashSet<String>();+ final Set<String> MULTI_VALUES = new LinkedHashSet<>();MULTI_VALUES.add("trie_multi");MULTI_VALUES.add("notrie_multi");@@ -331,7 +331,7 @@ public class TestUninvertingReader extends SolrTestCase {final IndexWriter iw = new IndexWriter(dir, newIndexWriterConfig(null));iw.close();- final Map<String, Type> UNINVERT_MAP = new LinkedHashMap<String, Type>();+ final Map<String, Type> UNINVERT_MAP = new LinkedHashMap<>();for (Type t : EnumSet.allOf(Type.class)) {UNINVERT_MAP.put(t.name(), t);}diff --git a/solr/core/src/test/org/apache/solr/update/UpdateParamsTest.java b/solr/core/src/test/org/apache/solr/update/UpdateParamsTest.javaindex d0e5f10a1a2..4c87d0ad313 100644--- a/solr/core/src/test/org/apache/solr/update/UpdateParamsTest.java+++ b/solr/core/src/test/org/apache/solr/update/UpdateParamsTest.java@@ -40,7 +40,7 @@ public class UpdateParamsTest extends SolrTestCaseJ4 {UpdateRequestHandler handler = new UpdateRequestHandler();handler.init(null);- MapSolrParams params = new MapSolrParams(new HashMap<String, String>());+ MapSolrParams params = new MapSolrParams(new HashMap<>());params.getMap().put("update.processor", "nonexistent");// Add a single documentdiff --git a/solr/core/src/test/org/apache/solr/update/processor/AtomicUpdatesTest.java b/solr/core/src/test/org/apache/solr/update/processor/AtomicUpdatesTest.javaindex 1956db95684..48882ea7fd3 100644--- a/solr/core/src/test/org/apache/solr/update/processor/AtomicUpdatesTest.java+++ b/solr/core/src/test/org/apache/solr/update/processor/AtomicUpdatesTest.java@@ -79,7 +79,7 @@ public class AtomicUpdatesTest extends SolrTestCaseJ4 {doc = new SolrInputDocument();doc.setField("id", "1");- List<String> removeList = new ArrayList<String>();+ List<String> removeList = new ArrayList<>();removeList.add("bbb");removeList.add("ccc");doc.setField(@@ -95,7 +95,7 @@ public class AtomicUpdatesTest extends SolrTestCaseJ4 {doc = new SolrInputDocument();doc.setField("id", "21");- removeList = new ArrayList<String>();+ removeList = new ArrayList<>();removeList.add("bbb");removeList.add("ccc");doc.setField(@@ -150,7 +150,7 @@ public class AtomicUpdatesTest extends SolrTestCaseJ4 {doc = new SolrInputDocument();doc.setField("id", "1001");- List<Long> removeList = new ArrayList<Long>();+ List<Long> removeList = new ArrayList<>();removeList.add(222L);removeList.add(333L);doc.setField(@@ -167,7 +167,7 @@ public class AtomicUpdatesTest extends SolrTestCaseJ4 {doc = new SolrInputDocument();doc.setField("id", "1021");- removeList = new ArrayList<Long>();+ removeList = new ArrayList<>();removeList.add(222L);removeList.add(333L);doc.setField(@@ -241,7 +241,7 @@ public class AtomicUpdatesTest extends SolrTestCaseJ4 {doc = new SolrInputDocument();doc.setField("id", "1001");- List<Long> removeList = new ArrayList<Long>();+ List<Long> removeList = new ArrayList<>();removeList.add(222L);removeList.add(333L);doc.setField(@@ -258,7 +258,7 @@ public class AtomicUpdatesTest extends SolrTestCaseJ4 {doc = new SolrInputDocument();doc.setField("id", "1021");- removeList = new ArrayList<Long>();+ removeList = new ArrayList<>();removeList.add(222L);removeList.add(333L);doc.setField(@@ -330,7 +330,7 @@ public class AtomicUpdatesTest extends SolrTestCaseJ4 {doc = new SolrInputDocument();doc.setField("id", "1001");- List<String> removeList = new ArrayList<String>();+ List<String> removeList = new ArrayList<>();removeList.add("222");removeList.add("333");doc.setField(@@ -347,7 +347,7 @@ public class AtomicUpdatesTest extends SolrTestCaseJ4 {doc = new SolrInputDocument();doc.setField("id", "1021");- removeList = new ArrayList<String>();+ removeList = new ArrayList<>();removeList.add("222");removeList.add("333");doc.setField(@@ -403,7 +403,7 @@ public class AtomicUpdatesTest extends SolrTestCaseJ4 {doc = new SolrInputDocument();doc.setField("id", "1001");- List<Long> removeList = new ArrayList<Long>();+ List<Long> removeList = new ArrayList<>();removeList.add(222L);removeList.add(333L);doc.setField(@@ -420,7 +420,7 @@ public class AtomicUpdatesTest extends SolrTestCaseJ4 {doc = new SolrInputDocument();doc.setField("id", "1021");- removeList = new ArrayList<Long>();+ removeList = new ArrayList<>();removeList.add(222L);removeList.add(333L);doc.setField(@@ -495,7 +495,7 @@ public class AtomicUpdatesTest extends SolrTestCaseJ4 {doc = new SolrInputDocument();doc.setField("id", "1001");- List<Float> removeList = new ArrayList<Float>();+ List<Float> removeList = new ArrayList<>();removeList.add(222.20F);removeList.add(333.30F);doc.setField(@@ -512,7 +512,7 @@ public class AtomicUpdatesTest extends SolrTestCaseJ4 {doc = new SolrInputDocument();doc.setField("id", "1021");- removeList = new ArrayList<Float>();+ removeList = new ArrayList<>();removeList.add(222.20F);removeList.add(333.30F);doc.setField(@@ -570,7 +570,7 @@ public class AtomicUpdatesTest extends SolrTestCaseJ4 {doc = new SolrInputDocument();doc.setField("id", "1001");- List<Double> removeList = new ArrayList<Double>();+ List<Double> removeList = new ArrayList<>();removeList.add(22222222D);removeList.add(33333333D);doc.setField(@@ -587,7 +587,7 @@ public class AtomicUpdatesTest extends SolrTestCaseJ4 {doc = new SolrInputDocument();doc.setField("id", "1021");- removeList = new ArrayList<Double>();+ removeList = new ArrayList<>();removeList.add(22222222D);removeList.add(33333333D);doc.setField(@@ -673,7 +673,7 @@ public class AtomicUpdatesTest extends SolrTestCaseJ4 {doc = new SolrInputDocument();doc.setField("id", "10001");- List<String> removeList = new ArrayList<String>();+ List<String> removeList = new ArrayList<>();removeList.add("2014-09-02T12:00:00Z");removeList.add("2014-09-03T12:00:00Z");@@ -694,7 +694,7 @@ public class AtomicUpdatesTest extends SolrTestCaseJ4 {doc = new SolrInputDocument();doc.setField("id", "10021");- removeList = new ArrayList<String>();+ removeList = new ArrayList<>();removeList.add("2014-09-02T12:00:00Z");removeList.add("2014-09-03T12:00:00Z");doc.setField(@@ -801,7 +801,7 @@ public class AtomicUpdatesTest extends SolrTestCaseJ4 {doc = new SolrInputDocument();doc.setField("id", "10001");- List<Date> removeList = new ArrayList<Date>();+ List<Date> removeList = new ArrayList<>();removeList.add(DateMathParser.parseMath(null, "2014-09-02T12:00:00Z"));removeList.add(DateMathParser.parseMath(null, "2014-09-03T12:00:00Z"));@@ -821,7 +821,7 @@ public class AtomicUpdatesTest extends SolrTestCaseJ4 {doc = new SolrInputDocument();doc.setField("id", "10021");- removeList = new ArrayList<Date>();+ removeList = new ArrayList<>();removeList.add(DateMathParser.parseMath(null, "2014-09-02T12:00:00Z"));removeList.add(DateMathParser.parseMath(null, "2014-09-03T12:00:00Z"));doc.setField(@@ -885,7 +885,7 @@ public class AtomicUpdatesTest extends SolrTestCaseJ4 {doc = new SolrInputDocument();doc.setField("id", "10001");- List<Float> removeList = new ArrayList<Float>();+ List<Float> removeList = new ArrayList<>();removeList.add(222.222F);removeList.add(333.333F);@@ -900,7 +900,7 @@ public class AtomicUpdatesTest extends SolrTestCaseJ4 {doc = new SolrInputDocument();doc.setField("id", "10021");- removeList = new ArrayList<Float>();+ removeList = new ArrayList<>();removeList.add(222.222F);removeList.add(333.333F);doc.setField(@@ -959,7 +959,7 @@ public class AtomicUpdatesTest extends SolrTestCaseJ4 {doc = new SolrInputDocument();doc.setField("id", "10001");- List<String> removeList = new ArrayList<String>();+ List<String> removeList = new ArrayList<>();removeList.add("222.222");removeList.add("333.333");@@ -977,7 +977,7 @@ public class AtomicUpdatesTest extends SolrTestCaseJ4 {doc = new SolrInputDocument();doc.setField("id", "10021");- removeList = new ArrayList<String>();+ removeList = new ArrayList<>();removeList.add("222.222");removeList.add("333.333");doc.setField(diff --git a/solr/core/src/test/org/apache/solr/update/processor/IgnoreLargeDocumentProcessorFactoryTest.java b/solr/core/src/test/org/apache/solr/update/processor/IgnoreLargeDocumentProcessorFactoryTest.javaindex c84da2a84e3..e99cb770f69 100644--- a/solr/core/src/test/org/apache/solr/update/processor/IgnoreLargeDocumentProcessorFactoryTest.java+++ b/solr/core/src/test/org/apache/solr/update/processor/IgnoreLargeDocumentProcessorFactoryTest.java@@ -171,7 +171,7 @@ public class IgnoreLargeDocumentProcessorFactoryTest extends SolrTestCase {childDocument.addField(entry.getKey(), entry.getValue());}List<SolrInputDocument> childList =- new ArrayList<SolrInputDocument>() {+ new ArrayList<>() {{add(childDocument);add(new SolrInputDocument(childDocument));diff --git a/solr/core/src/test/org/apache/solr/update/processor/RecordingUpdateProcessorFactory.java b/solr/core/src/test/org/apache/solr/update/processor/RecordingUpdateProcessorFactory.javaindex 41b3e121d07..3bac27571d2 100644--- a/solr/core/src/test/org/apache/solr/update/processor/RecordingUpdateProcessorFactory.java+++ b/solr/core/src/test/org/apache/solr/update/processor/RecordingUpdateProcessorFactory.java@@ -43,7 +43,7 @@ public final class RecordingUpdateProcessorFactory extends UpdateRequestProcesso** @see #startRecording*/- public final BlockingQueue<UpdateCommand> commandQueue = new LinkedBlockingQueue<UpdateCommand>();+ public final BlockingQueue<UpdateCommand> commandQueue = new LinkedBlockingQueue<>();/*** @see #stopRecordingdiff --git a/solr/core/src/test/org/apache/solr/update/processor/TolerantUpdateProcessorTest.java b/solr/core/src/test/org/apache/solr/update/processor/TolerantUpdateProcessorTest.javaindex b3da9faf00f..7b73f9c3937 100644--- a/solr/core/src/test/org/apache/solr/update/processor/TolerantUpdateProcessorTest.java+++ b/solr/core/src/test/org/apache/solr/update/processor/TolerantUpdateProcessorTest.java@@ -407,7 +407,7 @@ public class TolerantUpdateProcessorTest extends UpdateProcessorTestBase {assertEquals("number of errors", idsShouldFail.length, errors.size());- Set<String> addErrorIdsExpected = new HashSet<String>(Arrays.asList(idsShouldFail));+ Set<String> addErrorIdsExpected = new HashSet<>(Arrays.asList(idsShouldFail));for (SimpleOrderedMap<String> err : errors) {assertEquals("this method only expects 'add' errors", "ADD", err.get("type"));@@ -432,7 +432,7 @@ public class TolerantUpdateProcessorTest extends UpdateProcessorTestBase {assertNotNull("No Chain named: " + chain, pc);SolrQueryResponse rsp = new SolrQueryResponse();- rsp.add("responseHeader", new SimpleOrderedMap<Object>());+ rsp.add("responseHeader", new SimpleOrderedMap<>());if (requestParams == null) {requestParams = new ModifiableSolrParams();diff --git a/solr/core/src/test/org/apache/solr/util/hll/ExplicitHLLTest.java b/solr/core/src/test/org/apache/solr/util/hll/ExplicitHLLTest.javaindex c7995fe4a66..c4696721433 100644--- a/solr/core/src/test/org/apache/solr/util/hll/ExplicitHLLTest.java+++ b/solr/core/src/test/org/apache/solr/util/hll/ExplicitHLLTest.java@@ -157,7 +157,7 @@ public class ExplicitHLLTest extends SolrTestCase {@Testpublic void randomValuesTest() {final int explicitThreshold = 4096;- final HashSet<Long> canonical = new HashSet<Long>();+ final HashSet<Long> canonical = new HashSet<>();final HLL hll = newHLL(explicitThreshold);for (int i = 0; i < explicitThreshold; i++) {diff --git a/solr/core/src/test/org/apache/solr/util/hll/HLLSerializationTest.java b/solr/core/src/test/org/apache/solr/util/hll/HLLSerializationTest.javaindex 0f0de77aa97..89f30a9083d 100644--- a/solr/core/src/test/org/apache/solr/util/hll/HLLSerializationTest.java+++ b/solr/core/src/test/org/apache/solr/util/hll/HLLSerializationTest.java@@ -46,7 +46,7 @@ public class HLLSerializationTest extends SolrTestCase {public void serializationSmokeTest() throws Exception {final Random random = new Random(randomLong());final int randomCount = 250;- final List<Long> randoms = new ArrayList<Long>(randomCount);+ final List<Long> randoms = new ArrayList<>(randomCount);for (int i = 0; i < randomCount; i++) {randoms.add(random.nextLong());}@@ -71,7 +71,7 @@ public class HLLSerializationTest extends SolrTestCase {public void monsterHLLSerializationTest() throws Exception {final Random random = new Random(randomLong());final int randomCount = 250;- final List<Long> randoms = new ArrayList<Long>(randomCount);+ final List<Long> randoms = new ArrayList<>(randomCount);for (int i = 0; i < randomCount; i++) {randoms.add(random.nextLong());}diff --git a/solr/modules/analytics/src/test/org/apache/solr/analytics/legacy/facet/LegacyQueryFacetCloudTest.java b/solr/modules/analytics/src/test/org/apache/solr/analytics/legacy/facet/LegacyQueryFacetCloudTest.javaindex 1febad1f926..99e7ac11187 100644--- a/solr/modules/analytics/src/test/org/apache/solr/analytics/legacy/facet/LegacyQueryFacetCloudTest.java+++ b/solr/modules/analytics/src/test/org/apache/solr/analytics/legacy/facet/LegacyQueryFacetCloudTest.java@@ -50,17 +50,17 @@ public class LegacyQueryFacetCloudTest extends LegacyAbstractAnalyticsFacetCloudpublic void beforeTest() throws Exception {// INT- int1TestStart.add(new ArrayList<Integer>());- int2TestStart.add(new ArrayList<Integer>());+ int1TestStart.add(new ArrayList<>());+ int2TestStart.add(new ArrayList<>());// LONG- longTestStart.add(new ArrayList<Long>());- longTestStart.add(new ArrayList<Long>());+ longTestStart.add(new ArrayList<>());+ longTestStart.add(new ArrayList<>());// FLOAT- floatTestStart.add(new ArrayList<Float>());- floatTestStart.add(new ArrayList<Float>());- floatTestStart.add(new ArrayList<Float>());+ floatTestStart.add(new ArrayList<>());+ floatTestStart.add(new ArrayList<>());+ floatTestStart.add(new ArrayList<>());UpdateRequest req = new UpdateRequest();diff --git a/solr/modules/analytics/src/test/org/apache/solr/analytics/legacy/facet/LegacyQueryFacetTest.java b/solr/modules/analytics/src/test/org/apache/solr/analytics/legacy/facet/LegacyQueryFacetTest.javaindex 464df571726..d665638ec9a 100644--- a/solr/modules/analytics/src/test/org/apache/solr/analytics/legacy/facet/LegacyQueryFacetTest.java+++ b/solr/modules/analytics/src/test/org/apache/solr/analytics/legacy/facet/LegacyQueryFacetTest.java@@ -42,20 +42,20 @@ public class LegacyQueryFacetTest extends LegacyAbstractAnalyticsFacetTest {h.update("<delete><query>*:*</query></delete>");// INTArrayList<ArrayList<Integer>> int1TestStart = new ArrayList<>();- int1TestStart.add(new ArrayList<Integer>());+ int1TestStart.add(new ArrayList<>());ArrayList<ArrayList<Integer>> int2TestStart = new ArrayList<>();- int2TestStart.add(new ArrayList<Integer>());+ int2TestStart.add(new ArrayList<>());// LONGArrayList<ArrayList<Long>> longTestStart = new ArrayList<>();- longTestStart.add(new ArrayList<Long>());- longTestStart.add(new ArrayList<Long>());+ longTestStart.add(new ArrayList<>());+ longTestStart.add(new ArrayList<>());// FLOATArrayList<ArrayList<Float>> floatTestStart = new ArrayList<>();- floatTestStart.add(new ArrayList<Float>());- floatTestStart.add(new ArrayList<Float>());- floatTestStart.add(new ArrayList<Float>());+ floatTestStart.add(new ArrayList<>());+ floatTestStart.add(new ArrayList<>());+ floatTestStart.add(new ArrayList<>());for (int j = 0; j < NUM_LOOPS; ++j) {int i = j % INT;diff --git a/solr/modules/hadoop-auth/src/java/org/apache/solr/security/hadoop/AttributeOnlyServletContext.java b/solr/modules/hadoop-auth/src/java/org/apache/solr/security/hadoop/AttributeOnlyServletContext.javaindex d4f10ab1ee7..63018f76141 100644--- a/solr/modules/hadoop-auth/src/java/org/apache/solr/security/hadoop/AttributeOnlyServletContext.java+++ b/solr/modules/hadoop-auth/src/java/org/apache/solr/security/hadoop/AttributeOnlyServletContext.java@@ -39,7 +39,7 @@ import javax.servlet.descriptor.JspConfigDescriptor;/** A concrete implementation of {@linkplain ServletContext} which support only attributes. */class AttributeOnlyServletContext implements ServletContext {- private Map<String, Object> attributes = new HashMap<String, Object>();+ private Map<String, Object> attributes = new HashMap<>();@Overridepublic void setSessionTrackingModes(Set<SessionTrackingMode> sessionTrackingModes) {}diff --git a/solr/modules/hdfs/src/java/org/apache/solr/hdfs/store/HdfsLocalityReporter.java b/solr/modules/hdfs/src/java/org/apache/solr/hdfs/store/HdfsLocalityReporter.javaindex 3080817b31b..c70675187ec 100644--- a/solr/modules/hdfs/src/java/org/apache/solr/hdfs/store/HdfsLocalityReporter.java+++ b/solr/modules/hdfs/src/java/org/apache/solr/hdfs/store/HdfsLocalityReporter.java@@ -156,7 +156,7 @@ public class HdfsLocalityReporter implements SolrInfoBean {log.info("Registering direcotry {} for locality metrics.", dir.getHdfsDirPath());}}- cache.put(dir, new ConcurrentHashMap<FileStatus, BlockLocation[]>());+ cache.put(dir, new ConcurrentHashMap<>());}/**diff --git a/solr/modules/hdfs/src/test/org/apache/solr/hdfs/cloud/SharedFileSystemAutoReplicaFailoverTest.java b/solr/modules/hdfs/src/test/org/apache/solr/hdfs/cloud/SharedFileSystemAutoReplicaFailoverTest.javaindex d73414b3cf3..71a16a006cd 100644--- a/solr/modules/hdfs/src/test/org/apache/solr/hdfs/cloud/SharedFileSystemAutoReplicaFailoverTest.java+++ b/solr/modules/hdfs/src/test/org/apache/solr/hdfs/cloud/SharedFileSystemAutoReplicaFailoverTest.java@@ -95,7 +95,7 @@ public class SharedFileSystemAutoReplicaFailoverTest extends AbstractFullDistribInteger.MAX_VALUE,5,TimeUnit.SECONDS,- new SynchronousQueue<Runnable>(),+ new SynchronousQueue<>(),new SolrNamedThreadFactory("testExecutor"));CompletionService<Object> completionService;diff --git a/solr/modules/ltr/src/java/org/apache/solr/ltr/feature/SolrFeature.java b/solr/modules/ltr/src/java/org/apache/solr/ltr/feature/SolrFeature.javaindex 145e757c7d5..2162dfd3ecb 100644--- a/solr/modules/ltr/src/java/org/apache/solr/ltr/feature/SolrFeature.java+++ b/solr/modules/ltr/src/java/org/apache/solr/ltr/feature/SolrFeature.java@@ -205,7 +205,7 @@ public class SolrFeature extends Feature {private LocalSolrQueryRequest makeRequest(SolrCore core, String solrQuery, List<String> fqs, String df) {- final NamedList<String> returnList = new NamedList<String>();+ final NamedList<String> returnList = new NamedList<>();if ((solrQuery != null) && !solrQuery.isEmpty()) {returnList.add(CommonParams.Q, solrQuery);}diff --git a/solr/modules/ltr/src/java/org/apache/solr/ltr/model/LinearModel.java b/solr/modules/ltr/src/java/org/apache/solr/ltr/model/LinearModel.javaindex 6b030f2d71a..ce63fed6e7d 100644--- a/solr/modules/ltr/src/java/org/apache/solr/ltr/model/LinearModel.java+++ b/solr/modules/ltr/src/java/org/apache/solr/ltr/model/LinearModel.java@@ -108,7 +108,7 @@ public class LinearModel extends LTRScoringModel {protected void validate() throws ModelException {super.validate();- final ArrayList<String> missingWeightFeatureNames = new ArrayList<String>();+ final ArrayList<String> missingWeightFeatureNames = new ArrayList<>();for (int i = 0; i < features.size(); ++i) {if (featureToWeight[i] == null) {missingWeightFeatureNames.add(features.get(i).getName());diff --git a/solr/modules/ltr/src/java/org/apache/solr/ltr/store/FeatureStore.java b/solr/modules/ltr/src/java/org/apache/solr/ltr/store/FeatureStore.javaindex f554d63e37f..1e9f522c277 100644--- a/solr/modules/ltr/src/java/org/apache/solr/ltr/store/FeatureStore.java+++ b/solr/modules/ltr/src/java/org/apache/solr/ltr/store/FeatureStore.java@@ -55,7 +55,7 @@ public class FeatureStore {}public List<Feature> getFeatures() {- final List<Feature> storeValues = new ArrayList<Feature>(store.values());+ final List<Feature> storeValues = new ArrayList<>(store.values());return Collections.unmodifiableList(storeValues);}diff --git a/solr/modules/ltr/src/java/org/apache/solr/ltr/store/rest/ManagedFeatureStore.java b/solr/modules/ltr/src/java/org/apache/solr/ltr/store/rest/ManagedFeatureStore.javaindex 6242f932b23..ab2cb5b3592 100644--- a/solr/modules/ltr/src/java/org/apache/solr/ltr/store/rest/ManagedFeatureStore.java+++ b/solr/modules/ltr/src/java/org/apache/solr/ltr/store/rest/ManagedFeatureStore.java@@ -171,7 +171,7 @@ public class ManagedFeatureStore extends ManagedResourceprivate static List<Object> featuresAsManagedResources(FeatureStore store) {final List<Feature> storedFeatures = store.getFeatures();- final List<Object> features = new ArrayList<Object>(storedFeatures.size());+ final List<Object> features = new ArrayList<>(storedFeatures.size());for (final Feature f : storedFeatures) {final LinkedHashMap<String, Object> m = toFeatureMap(f);m.put(FEATURE_STORE_NAME_KEY, store.getName());diff --git a/solr/modules/ltr/src/java/org/apache/solr/ltr/store/rest/ManagedModelStore.java b/solr/modules/ltr/src/java/org/apache/solr/ltr/store/rest/ManagedModelStore.javaindex a0f0b989dbe..37a0735e15e 100644--- a/solr/modules/ltr/src/java/org/apache/solr/ltr/store/rest/ManagedModelStore.java+++ b/solr/modules/ltr/src/java/org/apache/solr/ltr/store/rest/ManagedModelStore.java@@ -315,7 +315,7 @@ public class ManagedModelStore extends ManagedResource}private static LinkedHashMap<String, Object> toFeatureMap(Feature feature, Normalizer norm) {- final LinkedHashMap<String, Object> map = new LinkedHashMap<String, Object>(2, 1.0f);+ final LinkedHashMap<String, Object> map = new LinkedHashMap<>(2, 1.0f);map.put(NAME_KEY, feature.getName());map.put(NORM_KEY, toNormalizerMap(norm));return map;diff --git a/solr/modules/ltr/src/test/org/apache/solr/ltr/feature/TestFieldLengthFeature.java b/solr/modules/ltr/src/test/org/apache/solr/ltr/feature/TestFieldLengthFeature.javaindex efafdcb4a0a..77792e12ced 100644--- a/solr/modules/ltr/src/test/org/apache/solr/ltr/feature/TestFieldLengthFeature.java+++ b/solr/modules/ltr/src/test/org/apache/solr/ltr/feature/TestFieldLengthFeature.java@@ -156,7 +156,7 @@ public class TestFieldLengthFeature extends TestRerankBase {@Testpublic void testParamsToMap() throws Exception {- final LinkedHashMap<String, Object> params = new LinkedHashMap<String, Object>();+ final LinkedHashMap<String, Object> params = new LinkedHashMap<>();params.put("field", "field" + random().nextInt(10));doTestParamsToMap(FieldLengthFeature.class.getName(), params);}diff --git a/solr/modules/ltr/src/test/org/apache/solr/ltr/feature/TestFieldValueFeature.java b/solr/modules/ltr/src/test/org/apache/solr/ltr/feature/TestFieldValueFeature.javaindex cae28a25b0a..8123d8ce382 100644--- a/solr/modules/ltr/src/test/org/apache/solr/ltr/feature/TestFieldValueFeature.java+++ b/solr/modules/ltr/src/test/org/apache/solr/ltr/feature/TestFieldValueFeature.java@@ -530,7 +530,7 @@ public class TestFieldValueFeature extends TestRerankBase {@Testpublic void testParamsToMap() throws Exception {- final LinkedHashMap<String, Object> params = new LinkedHashMap<String, Object>();+ final LinkedHashMap<String, Object> params = new LinkedHashMap<>();params.put("field", "field" + random().nextInt(10));doTestParamsToMap(FieldValueFeature.class.getName(), params);}diff --git a/solr/modules/ltr/src/test/org/apache/solr/ltr/feature/TestOriginalScoreFeature.java b/solr/modules/ltr/src/test/org/apache/solr/ltr/feature/TestOriginalScoreFeature.javaindex 7d046e0c499..2a020664ac4 100644--- a/solr/modules/ltr/src/test/org/apache/solr/ltr/feature/TestOriginalScoreFeature.java+++ b/solr/modules/ltr/src/test/org/apache/solr/ltr/feature/TestOriginalScoreFeature.java@@ -248,7 +248,7 @@ public class TestOriginalScoreFeature extends TestRerankBase {@Testpublic void testParamsToMap() throws Exception {- final LinkedHashMap<String, Object> params = new LinkedHashMap<String, Object>();+ final LinkedHashMap<String, Object> params = new LinkedHashMap<>();doTestParamsToMap(OriginalScoreFeature.class.getName(), params);}}diff --git a/solr/modules/ltr/src/test/org/apache/solr/ltr/feature/TestRankingFeature.java b/solr/modules/ltr/src/test/org/apache/solr/ltr/feature/TestRankingFeature.javaindex b47929fbf27..69e610ddf57 100644--- a/solr/modules/ltr/src/test/org/apache/solr/ltr/feature/TestRankingFeature.java+++ b/solr/modules/ltr/src/test/org/apache/solr/ltr/feature/TestRankingFeature.java@@ -150,7 +150,7 @@ public class TestRankingFeature extends TestRerankBase {@Testpublic void testParamsToMap() throws Exception {- final LinkedHashMap<String, Object> params = new LinkedHashMap<String, Object>();+ final LinkedHashMap<String, Object> params = new LinkedHashMap<>();params.put("q", "{!func}pow(popularity,2)");doTestParamsToMap(SolrFeature.class.getName(), params);}diff --git a/solr/modules/ltr/src/test/org/apache/solr/ltr/feature/TestValueFeature.java b/solr/modules/ltr/src/test/org/apache/solr/ltr/feature/TestValueFeature.javaindex 03e57c29008..101c09fa862 100644--- a/solr/modules/ltr/src/test/org/apache/solr/ltr/feature/TestValueFeature.java+++ b/solr/modules/ltr/src/test/org/apache/solr/ltr/feature/TestValueFeature.java@@ -144,7 +144,7 @@ public class TestValueFeature extends TestRerankBase {@Testpublic void testParamsToMap() throws Exception {- final LinkedHashMap<String, Object> params = new LinkedHashMap<String, Object>();+ final LinkedHashMap<String, Object> params = new LinkedHashMap<>();params.put("value", "${val" + random().nextInt(10) + "}");if (random().nextBoolean()) {params.put("required", random().nextBoolean());diff --git a/solr/modules/ltr/src/test/org/apache/solr/ltr/norm/TestMinMaxNormalizer.java b/solr/modules/ltr/src/test/org/apache/solr/ltr/norm/TestMinMaxNormalizer.javaindex 33ca6fb9445..aae619161f7 100644--- a/solr/modules/ltr/src/test/org/apache/solr/ltr/norm/TestMinMaxNormalizer.java+++ b/solr/modules/ltr/src/test/org/apache/solr/ltr/norm/TestMinMaxNormalizer.java@@ -46,26 +46,26 @@ public class TestMinMaxNormalizer {@Testpublic void testInvalidMinMaxNoParams() {- implTestMinMax(new HashMap<String, Object>(), Float.NEGATIVE_INFINITY, Float.POSITIVE_INFINITY);+ implTestMinMax(new HashMap<>(), Float.NEGATIVE_INFINITY, Float.POSITIVE_INFINITY);}@Testpublic void testInvalidMinMaxMissingMax() {- final Map<String, Object> params = new HashMap<String, Object>();+ final Map<String, Object> params = new HashMap<>();params.put("min", "0.0f");implTestMinMax(params, 0.0f, Float.POSITIVE_INFINITY);}@Testpublic void testInvalidMinMaxMissingMin() {- final Map<String, Object> params = new HashMap<String, Object>();+ final Map<String, Object> params = new HashMap<>();params.put("max", "0.0f");implTestMinMax(params, Float.NEGATIVE_INFINITY, 0.0f);}@Testpublic void testMinMaxNormalizerMinLargerThanMax() {- final Map<String, Object> params = new HashMap<String, Object>();+ final Map<String, Object> params = new HashMap<>();params.put("min", "10.0f");params.put("max", "0.0f");implTestMinMax(params, 10.0f, 0.0f);@@ -73,7 +73,7 @@ public class TestMinMaxNormalizer {@Testpublic void testMinMaxNormalizerMinEqualToMax() {- final Map<String, Object> params = new HashMap<String, Object>();+ final Map<String, Object> params = new HashMap<>();params.put("min", "10.0f");params.put("max", "10.0f");final NormalizerException expectedException =@@ -87,7 +87,7 @@ public class TestMinMaxNormalizer {@Testpublic void testNormalizer() {- final Map<String, Object> params = new HashMap<String, Object>();+ final Map<String, Object> params = new HashMap<>();params.put("min", "5.0f");params.put("max", "10.0f");final Normalizer n = implTestMinMax(params, 5.0f, 10.0f);diff --git a/solr/modules/ltr/src/test/org/apache/solr/ltr/norm/TestStandardNormalizer.java b/solr/modules/ltr/src/test/org/apache/solr/ltr/norm/TestStandardNormalizer.javaindex 5342cb58ccb..dee5aab4f3f 100644--- a/solr/modules/ltr/src/test/org/apache/solr/ltr/norm/TestStandardNormalizer.java+++ b/solr/modules/ltr/src/test/org/apache/solr/ltr/norm/TestStandardNormalizer.java@@ -45,12 +45,12 @@ public class TestStandardNormalizer {@Testpublic void testNormalizerNoParams() {- implTestStandard(new HashMap<String, Object>(), 0.0f, 1.0f);+ implTestStandard(new HashMap<>(), 0.0f, 1.0f);}@Testpublic void testInvalidSTD() {- final Map<String, Object> params = new HashMap<String, Object>();+ final Map<String, Object> params = new HashMap<>();params.put("std", "0f");final NormalizerException expectedException =new NormalizerException(@@ -63,7 +63,7 @@ public class TestStandardNormalizer {@Testpublic void testInvalidSTD2() {- final Map<String, Object> params = new HashMap<String, Object>();+ final Map<String, Object> params = new HashMap<>();params.put("std", "-1f");final NormalizerException expectedException =new NormalizerException(@@ -77,7 +77,7 @@ public class TestStandardNormalizer {@Testpublic void testInvalidSTD3() {- final Map<String, Object> params = new HashMap<String, Object>();+ final Map<String, Object> params = new HashMap<>();params.put("avg", "1f");params.put("std", "0f");final NormalizerException expectedException =@@ -92,7 +92,7 @@ public class TestStandardNormalizer {@Testpublic void testNormalizer() {- Map<String, Object> params = new HashMap<String, Object>();+ Map<String, Object> params = new HashMap<>();params.put("avg", "0f");params.put("std", "1f");final Normalizer identity = implTestStandard(params, 0f, 1f);@@ -101,7 +101,7 @@ public class TestStandardNormalizer {assertEquals(value, identity.normalize(value), 0.0001);value = 150;assertEquals(value, identity.normalize(value), 0.0001);- params = new HashMap<String, Object>();+ params = new HashMap<>();params.put("avg", "10f");params.put("std", "1.5f");final Normalizer norm =diff --git a/solr/modules/sql/src/java/org/apache/solr/handler/sql/SolrRules.java b/solr/modules/sql/src/java/org/apache/solr/handler/sql/SolrRules.javaindex a0b585af077..5b6dac64584 100644--- a/solr/modules/sql/src/java/org/apache/solr/handler/sql/SolrRules.java+++ b/solr/modules/sql/src/java/org/apache/solr/handler/sql/SolrRules.java@@ -51,7 +51,7 @@ class SolrRules {static List<String> solrFieldNames(final RelDataType rowType) {return SqlValidatorUtil.uniquify(- new AbstractList<String>() {+ new AbstractList<>() {@Overridepublic String get(int index) {return rowType.getFieldList().get(index).getName();diff --git a/solr/modules/sql/src/java/org/apache/solr/handler/sql/SolrTable.java b/solr/modules/sql/src/java/org/apache/solr/handler/sql/SolrTable.javaindex b0602d4d6ed..577585d80d6 100644--- a/solr/modules/sql/src/java/org/apache/solr/handler/sql/SolrTable.java+++ b/solr/modules/sql/src/java/org/apache/solr/handler/sql/SolrTable.java@@ -209,7 +209,7 @@ class SolrTable extends AbstractQueryableTable implements TranslatableTable {final TupleStream finalStream = tupleStream;- return new AbstractEnumerable<Object>() {+ return new AbstractEnumerable<>() {// Use original fields list to make sure only the fields specified are enumeratedpublic Enumerator<Object> enumerator() {return new SolrEnumerator(finalStream, fields);diff --git a/solr/solr-ref-guide/modules/deployment-guide/examples/UsingSolrJRefGuideExamplesTest.java b/solr/solr-ref-guide/modules/deployment-guide/examples/UsingSolrJRefGuideExamplesTest.javaindex fee64cef9df..7c09d4596c5 100644--- a/solr/solr-ref-guide/modules/deployment-guide/examples/UsingSolrJRefGuideExamplesTest.java+++ b/solr/solr-ref-guide/modules/deployment-guide/examples/UsingSolrJRefGuideExamplesTest.java@@ -82,7 +82,7 @@ public class UsingSolrJRefGuideExamplesTest extends SolrCloudTestCase {expectedLines.clear();final SolrClient client = getSolrClient();- final List<TechProduct> products = new ArrayList<TechProduct>();+ final List<TechProduct> products = new ArrayList<>();products.add(new TechProduct("1", "Fitbit Alta"));products.add(new TechProduct("2", "Sony Walkman"));products.add(new TechProduct("3", "Garmin GPS"));@@ -112,7 +112,7 @@ public class UsingSolrJRefGuideExamplesTest extends SolrCloudTestCase {// tag::solrj-query-with-raw-solrparams[]final SolrClient client = getSolrClient();- final Map<String, String> queryParamMap = new HashMap<String, String>();+ final Map<String, String> queryParamMap = new HashMap<>();queryParamMap.put("q", "*:*");queryParamMap.put("fl", "id, name");queryParamMap.put("sort", "id asc");diff --git a/solr/solrj-zookeeper/src/java/org/apache/solr/client/solrj/cloud/DistribStateManager.java b/solr/solrj-zookeeper/src/java/org/apache/solr/client/solrj/cloud/DistribStateManager.javaindex e664e38355a..09be10c73c9 100644--- a/solr/solrj-zookeeper/src/java/org/apache/solr/client/solrj/cloud/DistribStateManager.java+++ b/solr/solrj-zookeeper/src/java/org/apache/solr/client/solrj/cloud/DistribStateManager.java@@ -96,8 +96,8 @@ public interface DistribStateManager extends SolrCloseable {*/default List<String> listTree(String root)throws NoSuchElementException, IOException, KeeperException, InterruptedException {- Deque<String> queue = new LinkedList<String>();- List<String> tree = new ArrayList<String>();+ Deque<String> queue = new LinkedList<>();+ List<String> tree = new ArrayList<>();if (!root.startsWith("/")) {root = "/" + root;}diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/SocketProxy.java b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/SocketProxy.javaindex 7e0b480f612..bbab01b835c 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/SocketProxy.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/SocketProxy.java@@ -58,7 +58,7 @@ public class SocketProxy {private CountDownLatch closed = new CountDownLatch(1);- public List<Bridge> connections = new LinkedList<Bridge>();+ public List<Bridge> connections = new LinkedList<>();private final int listenPort;@@ -146,7 +146,7 @@ public class SocketProxy {public void close() {List<Bridge> connections;synchronized (this.connections) {- connections = new ArrayList<Bridge>(this.connections);+ connections = new ArrayList<>(this.connections);}log.warn("Closing {} connections to: {}, target: {}", connections.size(), getUrl(), target);for (Bridge con : connections) {@@ -162,7 +162,7 @@ public class SocketProxy {public void halfClose() {List<Bridge> connections;synchronized (this.connections) {- connections = new ArrayList<Bridge>(this.connections);+ connections = new ArrayList<>(this.connections);}if (log.isInfoEnabled()) {log.info("halfClose, numConnections= {}", connections.size());@@ -333,7 +333,7 @@ public class SocketProxy {protected Socket src;private Socket destination;- private AtomicReference<CountDownLatch> pause = new AtomicReference<CountDownLatch>();+ private AtomicReference<CountDownLatch> pause = new AtomicReference<>();public Pump(String kind, Socket source, Socket dest) {super("SocketProxy-" + kind + "-" + source.getPort() + ":" + dest.getPort());@@ -420,7 +420,7 @@ public class SocketProxy {private ServerSocket socket;private URI target;- private AtomicReference<CountDownLatch> pause = new AtomicReference<CountDownLatch>();+ private AtomicReference<CountDownLatch> pause = new AtomicReference<>();public Acceptor(ServerSocket serverSocket, URI uri) throws SocketException {socket = serverSocket;diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/DelegationTokenHttpSolrClient.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/DelegationTokenHttpSolrClient.javaindex 4351b490d6c..72132c597d1 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/DelegationTokenHttpSolrClient.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/DelegationTokenHttpSolrClient.java@@ -54,7 +54,7 @@ public class DelegationTokenHttpSolrClient extends HttpSolrClient {public void setQueryParams(Set<String> queryParams) {queryParams = queryParams == null ? Set.of(DELEGATION_TOKEN_PARAM) : queryParams;if (!queryParams.contains(DELEGATION_TOKEN_PARAM)) {- queryParams = new HashSet<String>(queryParams);+ queryParams = new HashSet<>(queryParams);queryParams.add(DELEGATION_TOKEN_PARAM);queryParams = Collections.unmodifiableSet(queryParams);}diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/SolrClientCache.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/SolrClientCache.javaindex d07e549a24b..3cab721a583 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/SolrClientCache.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/SolrClientCache.java@@ -81,7 +81,7 @@ public class SolrClientCache implements Serializable {if (solrClients.containsKey(zkHost)) {client = (CloudSolrClient) solrClients.get(zkHost);} else {- final List<String> hosts = new ArrayList<String>();+ final List<String> hosts = new ArrayList<>();hosts.add(zkHost);var builder =new CloudLegacySolrClient.Builder(hosts, Optional.empty())diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/eval/FieldValueEvaluator.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/eval/FieldValueEvaluator.javaindex 2a5632f576e..7eb2182b3b9 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/eval/FieldValueEvaluator.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/eval/FieldValueEvaluator.java@@ -65,7 +65,7 @@ public class FieldValueEvaluator extends SourceEvaluator {if (null != value) {if (value instanceof Object[]) {Object[] array = (Object[]) value;- List<Object> list = new ArrayList<Object>(array.length);+ List<Object> list = new ArrayList<>(array.length);for (Object obj : array) {list.add(obj);}@@ -76,7 +76,7 @@ public class FieldValueEvaluator extends SourceEvaluator {return value;} else if (value instanceof Iterable && !(value instanceof List<?>)) {Iterable<?> iter = (Iterable<?>) value;- List<Object> list = new ArrayList<Object>();+ List<Object> list = new ArrayList<>();for (Object obj : iter) {list.add(obj);}diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/CalculatorStream.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/CalculatorStream.javaindex 72d16a58e7b..5a3f21fa83a 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/CalculatorStream.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/CalculatorStream.java@@ -66,7 +66,7 @@ public class CalculatorStream extends TupleStream implements Expressible {public void setStreamContext(StreamContext context) {}public List<TupleStream> children() {- List<TupleStream> l = new ArrayList<TupleStream>();+ List<TupleStream> l = new ArrayList<>();return l;}diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/CellStream.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/CellStream.javaindex 2b2177579f9..6a0b10eb1bb 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/CellStream.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/CellStream.java@@ -106,7 +106,7 @@ public class CellStream extends TupleStream implements Expressible {}public List<TupleStream> children() {- List<TupleStream> l = new ArrayList<TupleStream>();+ List<TupleStream> l = new ArrayList<>();l.add(stream);return l;diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/CommitStream.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/CommitStream.javaindex 77aacacee37..1121ab12421 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/CommitStream.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/CommitStream.java@@ -204,7 +204,7 @@ public class CommitStream extends TupleStream implements Expressible {@Overridepublic List<TupleStream> children() {- ArrayList<TupleStream> sourceList = new ArrayList<TupleStream>(1);+ ArrayList<TupleStream> sourceList = new ArrayList<>(1);sourceList.add(tupleSource);return sourceList;}diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/ComplementStream.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/ComplementStream.javaindex de28d7c1e8a..3c6ff68703f 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/ComplementStream.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/ComplementStream.java@@ -162,7 +162,7 @@ public class ComplementStream extends TupleStream implements Expressible {}public List<TupleStream> children() {- List<TupleStream> l = new ArrayList<TupleStream>();+ List<TupleStream> l = new ArrayList<>();l.add(streamA);l.add(streamB);return l;diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/CsvStream.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/CsvStream.javaindex 3098ae103c1..452d3afd275 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/CsvStream.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/CsvStream.java@@ -111,7 +111,7 @@ public class CsvStream extends TupleStream implements Expressible {}public List<TupleStream> children() {- List<TupleStream> l = new ArrayList<TupleStream>();+ List<TupleStream> l = new ArrayList<>();l.add(originalStream);return l;}diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/EchoStream.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/EchoStream.javaindex 72abbe366bc..002170a0bb2 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/EchoStream.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/EchoStream.java@@ -80,7 +80,7 @@ public class EchoStream extends TupleStream implements Expressible {public void setStreamContext(StreamContext context) {}public List<TupleStream> children() {- List<TupleStream> l = new ArrayList<TupleStream>();+ List<TupleStream> l = new ArrayList<>();return l;}diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/HashJoinStream.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/HashJoinStream.javaindex 6d8ebd01862..e1172f1fbb7 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/HashJoinStream.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/HashJoinStream.java@@ -105,7 +105,7 @@ public class HashJoinStream extends TupleStream implements Expressible {String hashOnValue = ((StreamExpressionValue) onExpression.getParameter()).getValue();String[] parts = hashOnValue.split(",");- List<String> hashOn = new ArrayList<String>(parts.length);+ List<String> hashOn = new ArrayList<>(parts.length);for (String part : parts) {hashOn.add(part.trim());}@@ -213,7 +213,7 @@ public class HashJoinStream extends TupleStream implements Expressible {}public List<TupleStream> children() {- List<TupleStream> l = new ArrayList<TupleStream>();+ List<TupleStream> l = new ArrayList<>();l.add(hashStream);l.add(fullStream);return l;@@ -230,7 +230,7 @@ public class HashJoinStream extends TupleStream implements Expressible {if (hashedTuples.containsKey(hash)) {hashedTuples.get(hash).add(tuple);} else {- ArrayList<Tuple> set = new ArrayList<Tuple>();+ ArrayList<Tuple> set = new ArrayList<>();set.add(tuple);hashedTuples.put(hash, set);}diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/HashRollupStream.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/HashRollupStream.javaindex 79992a870e5..2c6089d7e25 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/HashRollupStream.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/HashRollupStream.java@@ -191,7 +191,7 @@ public class HashRollupStream extends TupleStream implements Expressible {}public List<TupleStream> children() {- List<TupleStream> l = new ArrayList<TupleStream>();+ List<TupleStream> l = new ArrayList<>();l.add(tupleStream);return l;}diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/HavingStream.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/HavingStream.javaindex be01780ff9e..3de48f678ad 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/HavingStream.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/HavingStream.java@@ -141,7 +141,7 @@ public class HavingStream extends TupleStream implements Expressible {}public List<TupleStream> children() {- List<TupleStream> l = new ArrayList<TupleStream>();+ List<TupleStream> l = new ArrayList<>();l.add(stream);return l;}diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/InnerJoinStream.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/InnerJoinStream.javaindex a10a0ef65ac..8d6ec56a5aa 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/InnerJoinStream.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/InnerJoinStream.java@@ -33,9 +33,9 @@ import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;*/public class InnerJoinStream extends BiJoinStream implements Expressible {- private LinkedList<Tuple> joinedTuples = new LinkedList<Tuple>();- private LinkedList<Tuple> leftTupleGroup = new LinkedList<Tuple>();- private LinkedList<Tuple> rightTupleGroup = new LinkedList<Tuple>();+ private LinkedList<Tuple> joinedTuples = new LinkedList<>();+ private LinkedList<Tuple> leftTupleGroup = new LinkedList<>();+ private LinkedList<Tuple> rightTupleGroup = new LinkedList<>();public InnerJoinStream(TupleStream leftStream, TupleStream rightStream, StreamEqualitor eq)throws IOException {diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/IntersectStream.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/IntersectStream.javaindex 6836f17a7ec..bea9ef01634 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/IntersectStream.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/IntersectStream.java@@ -162,7 +162,7 @@ public class IntersectStream extends TupleStream implements Expressible {}public List<TupleStream> children() {- List<TupleStream> l = new ArrayList<TupleStream>();+ List<TupleStream> l = new ArrayList<>();l.add(streamA);l.add(streamB);return l;diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/JoinStream.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/JoinStream.javaindex 3fdec4dc56e..320a0850e71 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/JoinStream.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/JoinStream.java@@ -47,7 +47,7 @@ public abstract class JoinStream extends TupleStream implements Expressible {public JoinStream(StreamEqualitor eq, TupleStream first, TupleStream second, TupleStream... others) {- this.streams = new ArrayList<PushBackStream>();+ this.streams = new ArrayList<>();this.eq = eq;@@ -83,7 +83,7 @@ public abstract class JoinStream extends TupleStream implements Expressible {streamExpressions.size()));}- this.streams = new ArrayList<PushBackStream>();+ this.streams = new ArrayList<>();for (StreamExpression streamExpression : streamExpressions) {this.streams.add(new PushBackStream(factory.constructStream(streamExpression)));}@@ -168,7 +168,7 @@ public abstract class JoinStream extends TupleStream implements Expressible {}public List<TupleStream> children() {- List<TupleStream> list = new ArrayList<TupleStream>();+ List<TupleStream> list = new ArrayList<>();for (TupleStream stream : streams) {list.add(stream);}diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/KnnStream.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/KnnStream.javaindex 76f761017dc..2a2150c1a57 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/KnnStream.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/KnnStream.java@@ -97,7 +97,7 @@ public class KnnStream extends TupleStream implements Expressible {}// pull out known named params- Map<String, String> params = new HashMap<String, String>();+ Map<String, String> params = new HashMap<>();for (StreamExpressionNamedParameter namedParam : namedParams) {if (!namedParam.getName().equals("zkHost") && !namedParam.getName().equals("id")) {params.put(namedParam.getName(), namedParam.getParameter().toString().trim());diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/LeftOuterJoinStream.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/LeftOuterJoinStream.javaindex 3de338c9bc8..1d1ba66366d 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/LeftOuterJoinStream.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/LeftOuterJoinStream.java@@ -33,9 +33,9 @@ import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;*/public class LeftOuterJoinStream extends BiJoinStream implements Expressible {- private LinkedList<Tuple> joinedTuples = new LinkedList<Tuple>();- private LinkedList<Tuple> leftTupleGroup = new LinkedList<Tuple>();- private LinkedList<Tuple> rightTupleGroup = new LinkedList<Tuple>();+ private LinkedList<Tuple> joinedTuples = new LinkedList<>();+ private LinkedList<Tuple> leftTupleGroup = new LinkedList<>();+ private LinkedList<Tuple> rightTupleGroup = new LinkedList<>();public LeftOuterJoinStream(TupleStream leftStream, TupleStream rightStream, StreamEqualitor eq)throws IOException {diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/LetStream.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/LetStream.javaindex da5e8e248d9..74057a9da4e 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/LetStream.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/LetStream.java@@ -146,7 +146,7 @@ public class LetStream extends TupleStream implements Expressible {}public List<TupleStream> children() {- List<TupleStream> l = new ArrayList<TupleStream>();+ List<TupleStream> l = new ArrayList<>();l.add(stream);return l;diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/ListStream.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/ListStream.javaindex 7414ef632a1..13b24129892 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/ListStream.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/ListStream.java@@ -97,7 +97,7 @@ public class ListStream extends TupleStream implements Expressible {}public List<TupleStream> children() {- List<TupleStream> l = new ArrayList<TupleStream>();+ List<TupleStream> l = new ArrayList<>();for (TupleStream stream : streams) {l.add(stream);}diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/MergeStream.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/MergeStream.javaindex f91686164ba..82d97b86a0f 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/MergeStream.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/MergeStream.java@@ -163,7 +163,7 @@ public class MergeStream extends TupleStream implements Expressible {}public List<TupleStream> children() {- List<TupleStream> l = new ArrayList<TupleStream>();+ List<TupleStream> l = new ArrayList<>();for (PushBackStream stream : streams) {l.add(stream);}diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/ModelStream.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/ModelStream.javaindex b5970ae8dd4..e716628b4c7 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/ModelStream.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/ModelStream.java@@ -87,7 +87,7 @@ public class ModelStream extends TupleStream implements Expressible {expression));}- Map<String, String> params = new HashMap<String, String>();+ Map<String, String> params = new HashMap<>();for (StreamExpressionNamedParameter namedParam : namedParams) {if (!namedParam.getName().equals("zkHost")) {params.put(namedParam.getName(), namedParam.getParameter().toString().trim());diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/NoOpStream.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/NoOpStream.javaindex 3b68f5b734a..300595c7e78 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/NoOpStream.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/NoOpStream.java@@ -69,7 +69,7 @@ public class NoOpStream extends TupleStream implements Expressible {public void setStreamContext(StreamContext context) {}public List<TupleStream> children() {- List<TupleStream> l = new ArrayList<TupleStream>();+ List<TupleStream> l = new ArrayList<>();return l;}diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/NullStream.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/NullStream.javaindex f203fb3e739..b43f7dfc7d0 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/NullStream.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/NullStream.java@@ -104,7 +104,7 @@ public class NullStream extends TupleStream implements Expressible {}public List<TupleStream> children() {- List<TupleStream> l = new ArrayList<TupleStream>();+ List<TupleStream> l = new ArrayList<>();l.add(stream);return l;}diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/PlotStream.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/PlotStream.javaindex 7cae9d92e67..607c3932939 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/PlotStream.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/PlotStream.java@@ -151,7 +151,7 @@ public class PlotStream extends TupleStream implements Expressible {}public List<TupleStream> children() {- List<TupleStream> l = new ArrayList<TupleStream>();+ List<TupleStream> l = new ArrayList<>();return l;}diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/PushBackStream.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/PushBackStream.javaindex b623762588c..07280543d4e 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/PushBackStream.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/PushBackStream.java@@ -62,7 +62,7 @@ public class PushBackStream extends TupleStream implements Expressible {}public List<TupleStream> children() {- List<TupleStream> l = new ArrayList<TupleStream>();+ List<TupleStream> l = new ArrayList<>();l.add(stream);return l;}diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/RandomFacadeStream.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/RandomFacadeStream.javaindex 6fb1024a834..963ed9940d0 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/RandomFacadeStream.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/RandomFacadeStream.java@@ -56,7 +56,7 @@ public class RandomFacadeStream extends TupleStream implements Expressible {}// pull out known named params- Map<String, String> params = new HashMap<String, String>();+ Map<String, String> params = new HashMap<>();for (StreamExpressionNamedParameter namedParam : namedParams) {if (!namedParam.getName().equals("zkHost")&& !namedParam.getName().equals("buckets")diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/RandomStream.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/RandomStream.javaindex 7f121061ae1..49cc065aaa7 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/RandomStream.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/RandomStream.java@@ -94,7 +94,7 @@ public class RandomStream extends TupleStream implements Expressible {}// pull out known named params- Map<String, String> params = new HashMap<String, String>();+ Map<String, String> params = new HashMap<>();for (StreamExpressionNamedParameter namedParam : namedParams) {if (!namedParam.getName().equals("zkHost")&& !namedParam.getName().equals("buckets")diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/RankStream.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/RankStream.javaindex 8b8f91599d0..d6284b533dd 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/RankStream.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/RankStream.java@@ -184,14 +184,14 @@ public class RankStream extends TupleStream implements Expressible {}public List<TupleStream> children() {- List<TupleStream> l = new ArrayList<TupleStream>();+ List<TupleStream> l = new ArrayList<>();l.add(stream);return l;}public void open() throws IOException {- this.top = new PriorityQueue<Tuple>(size, new ReverseComp(comp));- this.topList = new LinkedList<Tuple>();+ this.top = new PriorityQueue<>(size, new ReverseComp(comp));+ this.topList = new LinkedList<>();stream.open();}diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/ReducerStream.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/ReducerStream.javaindex 0fbef566cfe..285ee8a69be 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/ReducerStream.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/ReducerStream.java@@ -204,7 +204,7 @@ public class ReducerStream extends TupleStream implements Expressible {}public List<TupleStream> children() {- List<TupleStream> l = new ArrayList<TupleStream>();+ List<TupleStream> l = new ArrayList<>();l.add(stream);return l;}diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/RollupStream.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/RollupStream.javaindex 8def535d26c..afa5a587bb9 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/RollupStream.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/RollupStream.java@@ -193,7 +193,7 @@ public class RollupStream extends TupleStream implements Expressible {}public List<TupleStream> children() {- List<TupleStream> l = new ArrayList<TupleStream>();+ List<TupleStream> l = new ArrayList<>();l.add(tupleStream);return l;}diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/SelectStream.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/SelectStream.javaindex ec9d3ed910d..edbb22f3d67 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/SelectStream.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/SelectStream.java@@ -122,7 +122,7 @@ public class SelectStream extends TupleStream implements Expressible {stream = factory.constructStream(streamExpressions.get(0));- selectedFields = new HashMap<String, String>();+ selectedFields = new HashMap<>();selectedEvaluators = new LinkedHashMap<>();for (StreamExpressionParameter parameter : selectAsFieldsExpressions) {StreamExpressionValue selectField = (StreamExpressionValue) parameter;diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/SortStream.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/SortStream.javaindex 7d5bbe27496..4960006ce2f 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/SortStream.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/SortStream.java@@ -95,7 +95,7 @@ public class SortStream extends TupleStream implements Expressible {worker =new Worker() {- private LinkedList<Tuple> tuples = new LinkedList<Tuple>();+ private LinkedList<Tuple> tuples = new LinkedList<>();private Tuple eofTuple;public void readStream(TupleStream stream) throws IOException {@@ -172,7 +172,7 @@ public class SortStream extends TupleStream implements Expressible {}public List<TupleStream> children() {- List<TupleStream> l = new ArrayList<TupleStream>();+ List<TupleStream> l = new ArrayList<>();l.add(stream);return l;}diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/StreamContext.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/StreamContext.javaindex cbd90ab7a88..5feb15e46fa 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/StreamContext.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/StreamContext.java@@ -35,7 +35,7 @@ import org.apache.solr.common.params.SolrParams;*/public class StreamContext implements Serializable {- private Map<String, Object> entries = new HashMap<String, Object>();+ private Map<String, Object> entries = new HashMap<>();private Map<String, String> tupleContext = new HashMap<>();private Map<String, Object> lets = new HashMap<>();private ConcurrentMap<String, ConcurrentMap<String, Object>> objectCache;diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/TextLogitStream.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/TextLogitStream.javaindex 7e02fc76059..bb9a7f22228 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/TextLogitStream.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/TextLogitStream.java@@ -158,7 +158,7 @@ public class TextLogitStream extends TupleStream implements Expressible {expression));}- Map<String, String> params = new HashMap<String, String>();+ Map<String, String> params = new HashMap<>();for (StreamExpressionNamedParameter namedParam : namedParams) {if (!namedParam.getName().equals("zkHost")) {params.put(namedParam.getName(), namedParam.getParameter().toString().trim());diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/TopicStream.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/TopicStream.javaindex 48b7ab6cf68..b625d38ec7c 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/TopicStream.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/TopicStream.java@@ -316,7 +316,7 @@ public class TopicStream extends CloudSolrStream implements Expressible {if (streamContext.getSolrClientCache() != null) {cloudSolrClient = streamContext.getSolrClientCache().getCloudSolrClient(zkHost);} else {- final List<String> hosts = new ArrayList<String>();+ final List<String> hosts = new ArrayList<>();hosts.add(zkHost);cloudSolrClient = new CloudLegacySolrClient.Builder(hosts, Optional.empty()).build();this.cloudSolrClient.connect();diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/TupStream.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/TupStream.javaindex 11b7c8d783c..feecd952c99 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/TupStream.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/TupStream.java@@ -150,7 +150,7 @@ public class TupStream extends TupleStream implements Expressible {}public List<TupleStream> children() {- List<TupleStream> l = new ArrayList<TupleStream>();+ List<TupleStream> l = new ArrayList<>();return l;}diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/UniqueStream.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/UniqueStream.javaindex 35272f22584..e8d29eef7bf 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/UniqueStream.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/UniqueStream.java@@ -161,7 +161,7 @@ public class UniqueStream extends TupleStream implements Expressible {}public List<TupleStream> children() {- List<TupleStream> l = new ArrayList<TupleStream>();+ List<TupleStream> l = new ArrayList<>();l.add(originalStream);return l;}diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/UpdateStream.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/UpdateStream.javaindex 362ea2c67a5..6dc1ab475e7 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/UpdateStream.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/UpdateStream.java@@ -166,7 +166,7 @@ public class UpdateStream extends TupleStream implements Expressible {@Overridepublic List<TupleStream> children() {- ArrayList<TupleStream> sourceList = new ArrayList<TupleStream>(1);+ ArrayList<TupleStream> sourceList = new ArrayList<>(1);sourceList.add(tupleSource);return sourceList;}diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/ZplotStream.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/ZplotStream.javaindex c0da9a6e889..37a62180336 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/ZplotStream.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/ZplotStream.java@@ -106,7 +106,7 @@ public class ZplotStream extends TupleStream implements Expressible {}public List<TupleStream> children() {- List<TupleStream> l = new ArrayList<TupleStream>();+ List<TupleStream> l = new ArrayList<>();return l;}diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/expr/Explanation.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/expr/Explanation.javaindex 9074751f0a1..259c02ab5e5 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/expr/Explanation.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/expr/Explanation.java@@ -133,7 +133,7 @@ public class Explanation implements MapSerializable {public void addHelper(Explanation helper) {if (null == helpers) {- helpers = new ArrayList<Explanation>(1);+ helpers = new ArrayList<>(1);}helpers.add(helper);}diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/expr/StreamExplanation.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/expr/StreamExplanation.javaindex 638e6b52f72..521e107024a 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/expr/StreamExplanation.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/expr/StreamExplanation.java@@ -52,7 +52,7 @@ public class StreamExplanation extends Explanation {public void addChild(Explanation child) {if (null == children) {- children = new ArrayList<Explanation>(1);+ children = new ArrayList<>(1);}children.add(child);}@@ -61,7 +61,7 @@ public class StreamExplanation extends Explanation {map = super.toMap(map);if (null != children && 0 != children.size()) {- List<Map<String, Object>> childrenMaps = new ArrayList<Map<String, Object>>();+ List<Map<String, Object>> childrenMaps = new ArrayList<>();for (Explanation child : children) {childrenMaps.add(child.toMap(new LinkedHashMap<>()));}diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/expr/StreamExpression.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/expr/StreamExpression.javaindex 32abec78d16..f2bf0fc7006 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/expr/StreamExpression.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/expr/StreamExpression.java@@ -27,7 +27,7 @@ public class StreamExpression implements StreamExpressionParameter {public StreamExpression(String functionName) {this.functionName = functionName;- parameters = new ArrayList<StreamExpressionParameter>();+ parameters = new ArrayList<>();}public String getFunctionName() {diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/request/DelegationTokenRequest.java b/solr/solrj/src/java/org/apache/solr/client/solrj/request/DelegationTokenRequest.javaindex f53daebacf1..0e61e028bdd 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/request/DelegationTokenRequest.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/request/DelegationTokenRequest.java@@ -62,7 +62,7 @@ public abstract class DelegationTokenRequest<super(METHOD.GET);this.renewer = renewer;setResponseParser(new DelegationTokenResponse.JsonMapResponseParser());- setQueryParams(new TreeSet<String>(Arrays.asList(OP_KEY)));+ setQueryParams(new TreeSet<>(Arrays.asList(OP_KEY)));}@Override@@ -101,7 +101,7 @@ public abstract class DelegationTokenRequest<super(METHOD.PUT);this.token = token;setResponseParser(new DelegationTokenResponse.JsonMapResponseParser());- setQueryParams(new TreeSet<String>(Arrays.asList(OP_KEY, TOKEN_KEY)));+ setQueryParams(new TreeSet<>(Arrays.asList(OP_KEY, TOKEN_KEY)));}@Override@@ -131,8 +131,8 @@ public abstract class DelegationTokenRequest<super(METHOD.PUT);this.token = token;setResponseParser(new NoOpResponseParser());- Set<String> queryParams = new TreeSet<String>();- setQueryParams(new TreeSet<String>(Arrays.asList(OP_KEY, TOKEN_KEY)));+ Set<String> queryParams = new TreeSet<>();+ setQueryParams(new TreeSet<>(Arrays.asList(OP_KEY, TOKEN_KEY)));}@Overridediff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/response/ClusteringResponse.java b/solr/solrj/src/java/org/apache/solr/client/solrj/response/ClusteringResponse.javaindex f00b268bd74..0700ff8d269 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/response/ClusteringResponse.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/response/ClusteringResponse.java@@ -34,7 +34,7 @@ public class ClusteringResponse {@SuppressWarnings("unchecked")public ClusteringResponse(List<NamedList<Object>> clusterInfo) {- clusters = new ArrayList<Cluster>();+ clusters = new ArrayList<>();for (NamedList<Object> clusterNode : clusterInfo) {List<String> labelList, docIdList;List<Cluster> subclusters = Collections.emptyList();diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/response/DelegationTokenResponse.java b/solr/solrj/src/java/org/apache/solr/client/solrj/response/DelegationTokenResponse.javaindex 441df1d8079..225fbe6b366 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/response/DelegationTokenResponse.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/response/DelegationTokenResponse.java@@ -79,7 +79,7 @@ public abstract class DelegationTokenResponse extends SolrResponseBase {} catch (IOException | JSONParser.ParseException e) {throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, "parsing error", e);}- NamedList<Object> list = new NamedList<Object>();+ NamedList<Object> list = new NamedList<>();list.addAll(map);return list;}diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/response/SuggesterResponse.java b/solr/solrj/src/java/org/apache/solr/client/solrj/response/SuggesterResponse.javaindex 6fac639ee09..a5ba9b926bd 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/response/SuggesterResponse.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/response/SuggesterResponse.java@@ -77,7 +77,7 @@ public class SuggesterResponse {Map<String, List<String>> suggestedTermsPerDictionary = new LinkedHashMap<>();for (Map.Entry<String, List<Suggestion>> entry : suggestionsPerDictionary.entrySet()) {List<Suggestion> suggestions = entry.getValue();- List<String> suggestionTerms = new LinkedList<String>();+ List<String> suggestionTerms = new LinkedList<>();for (Suggestion s : suggestions) {suggestionTerms.add(s.getTerm());}diff --git a/solr/solrj/src/java/org/apache/solr/common/SolrDocument.java b/solr/solrj/src/java/org/apache/solr/common/SolrDocument.javaindex 2753fe3c06c..b5488afc4bd 100644--- a/solr/solrj/src/java/org/apache/solr/common/SolrDocument.java+++ b/solr/solrj/src/java/org/apache/solr/common/SolrDocument.java@@ -239,7 +239,7 @@ public class SolrDocument extends SolrDocumentBase<Object, SolrDocument>/** Expose a Map interface to the solr field value collection. */public Map<String, Collection<Object>> getFieldValuesMap() {- return new Map<String, Collection<Object>>() {+ return new Map<>() {/** Get the field Value */@Overridepublic Collection<Object> get(Object key) {@@ -312,7 +312,7 @@ public class SolrDocument extends SolrDocumentBase<Object, SolrDocument>/** Expose a Map interface to the solr fields. This function is useful for JSTL */public Map<String, Object> getFieldValueMap() {- return new Map<String, Object>() {+ return new Map<>() {/** Get the field Value */@Overridepublic Object get(Object key) {diff --git a/solr/solrj/src/java/org/apache/solr/common/SolrException.java b/solr/solrj/src/java/org/apache/solr/common/SolrException.javaindex c4d98d90e34..6b99259fc8c 100644--- a/solr/solrj/src/java/org/apache/solr/common/SolrException.java+++ b/solr/solrj/src/java/org/apache/solr/common/SolrException.java@@ -120,7 +120,7 @@ public class SolrException extends RuntimeException {if (key == null || value == null)throw new IllegalArgumentException("Exception metadata cannot be null!");- if (metadata == null) metadata = new NamedList<String>();+ if (metadata == null) metadata = new NamedList<>();metadata.add(key, value);}diff --git a/solr/solrj/src/java/org/apache/solr/common/ToleratedUpdateError.java b/solr/solrj/src/java/org/apache/solr/common/ToleratedUpdateError.javaindex 16b12ffe734..fa8ec2e8807 100644--- a/solr/solrj/src/java/org/apache/solr/common/ToleratedUpdateError.java+++ b/solr/solrj/src/java/org/apache/solr/common/ToleratedUpdateError.java@@ -170,7 +170,7 @@ public final class ToleratedUpdateError {* @see #parseMap*/public SimpleOrderedMap<String> getSimpleMap() {- SimpleOrderedMap<String> entry = new SimpleOrderedMap<String>();+ SimpleOrderedMap<String> entry = new SimpleOrderedMap<>();entry.add("type", type.toString());entry.add(ID, id);entry.add("message", message);diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/Slice.java b/solr/solrj/src/java/org/apache/solr/common/cloud/Slice.javaindex 55f4c708637..3eed8d0fa4d 100644--- a/solr/solrj/src/java/org/apache/solr/common/cloud/Slice.java+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/Slice.java@@ -146,7 +146,7 @@ public class Slice extends ZkNodeProps implements Iterable<Replica> {@SuppressWarnings({"unchecked", "rawtypes"})public Slice(String name, Map<String, Replica> replicas, Map<String, Object> props, String collection) {- super(props == null ? new LinkedHashMap<String, Object>(2) : new LinkedHashMap<>(props));+ super(props == null ? new LinkedHashMap<>(2) : new LinkedHashMap<>(props));this.name = name;this.collection = collection;diff --git a/solr/solrj/src/java/org/apache/solr/common/params/SolrParams.java b/solr/solrj/src/java/org/apache/solr/common/params/SolrParams.javaindex a575a8d2f4e..3074ddd5e9e 100644--- a/solr/solrj/src/java/org/apache/solr/common/params/SolrParams.java+++ b/solr/solrj/src/java/org/apache/solr/common/params/SolrParams.java@@ -91,7 +91,7 @@ public abstract class SolrParams@Overridepublic Iterator<Map.Entry<String, String[]>> iterator() {Iterator<String> it = getParameterNamesIterator();- return new Iterator<Map.Entry<String, String[]>>() {+ return new Iterator<>() {@Overridepublic boolean hasNext() {return it.hasNext();@@ -100,7 +100,7 @@ public abstract class SolrParams@Overridepublic Map.Entry<String, String[]> next() {String key = it.next();- return new Map.Entry<String, String[]>() {+ return new Map.Entry<>() {@Overridepublic String getKey() {return key;diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/TestBatchUpdate.java b/solr/solrj/src/test/org/apache/solr/client/solrj/TestBatchUpdate.javaindex 41b64e06af8..323a8c959ef 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/TestBatchUpdate.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/TestBatchUpdate.java@@ -104,7 +104,7 @@ public class TestBatchUpdate extends SolrJettyTestBase {final int[] counter = new int[1];counter[0] = 0;client.add(- new Iterator<SolrInputDocument>() {+ new Iterator<>() {@Overridepublic boolean hasNext() {diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/TestSolrJErrorHandling.java b/solr/solrj/src/test/org/apache/solr/client/solrj/TestSolrJErrorHandling.javaindex 3df1cd7b2e8..52249b35ac3 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/TestSolrJErrorHandling.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/TestSolrJErrorHandling.java@@ -117,7 +117,7 @@ public class TestSolrJErrorHandling extends SolrJettyTestBase {}Iterator<SolrInputDocument> manyDocs(final int base, final int numDocs) {- return new Iterator<SolrInputDocument>() {+ return new Iterator<>() {int count = 0;@Overridediff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudHttp2SolrClientBuilderTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudHttp2SolrClientBuilderTest.javaindex 85062638463..266d05377bf 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudHttp2SolrClientBuilderTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudHttp2SolrClientBuilderTest.java@@ -71,7 +71,7 @@ public class CloudHttp2SolrClientBuilderTest extends SolrTestCase {@Testpublic void testSeveralZkHostsSpecifiedTogether() throws IOException {- final ArrayList<String> zkHosts = new ArrayList<String>();+ final ArrayList<String> zkHosts = new ArrayList<>();zkHosts.add(ANY_ZK_HOST);zkHosts.add(ANY_OTHER_ZK_HOST);try (CloudHttp2SolrClient createdClient =diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientBuilderTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientBuilderTest.javaindex d4d90ae211e..e2f6c743fdb 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientBuilderTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientBuilderTest.java@@ -60,7 +60,7 @@ public class CloudSolrClientBuilderTest extends SolrTestCase {@Testpublic void testSeveralZkHostsSpecifiedTogether() throws IOException {- final ArrayList<String> zkHosts = new ArrayList<String>();+ final ArrayList<String> zkHosts = new ArrayList<>();zkHosts.add(ANY_ZK_HOST);zkHosts.add(ANY_OTHER_ZK_HOST);try (CloudSolrClient createdClient = new Builder(zkHosts, Optional.of(ANY_CHROOT)).build()) {diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/JDBCStreamTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/JDBCStreamTest.javaindex d748a642bf2..b4b85eea095 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/JDBCStreamTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/JDBCStreamTest.java@@ -301,7 +301,7 @@ public class JDBCStreamTest extends SolrCloudTestCase {TupleStream selectStream =new SelectStream(jdbcStream,- new HashMap<String, String>() {+ new HashMap<>() {{put("CODE", "code_s");put("COUNTRY_NAME", "name_s");@@ -768,7 +768,7 @@ public class JDBCStreamTest extends SolrCloudTestCase {protected List<Tuple> getTuples(TupleStream tupleStream) throws IOException {tupleStream.open();- List<Tuple> tuples = new ArrayList<Tuple>();+ List<Tuple> tuples = new ArrayList<>();for (Tuple t = tupleStream.read(); !t.EOF; t = tupleStream.read()) {tuples.add(t);}diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/SelectWithEvaluatorsTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/SelectWithEvaluatorsTest.javaindex e20871dc3fa..db4d4cc2b22 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/SelectWithEvaluatorsTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/SelectWithEvaluatorsTest.java@@ -138,7 +138,7 @@ public class SelectWithEvaluatorsTest extends SolrCloudTestCase {protected List<Tuple> getTuples(TupleStream tupleStream) throws IOException {tupleStream.open();- List<Tuple> tuples = new ArrayList<Tuple>();+ List<Tuple> tuples = new ArrayList<>();for (Tuple t = tupleStream.read(); !t.EOF; t = tupleStream.read()) {tuples.add(t);}diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/AbsoluteValueEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/AbsoluteValueEvaluatorTest.javaindex 4a782d478c9..dcbb3e67b76 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/AbsoluteValueEvaluatorTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/AbsoluteValueEvaluatorTest.java@@ -41,7 +41,7 @@ public class AbsoluteValueEvaluatorTest extends SolrTestCase {new StreamFactory().withFunctionName("abs", AbsoluteValueEvaluator.class).withFunctionName("add", AddEvaluator.class);- values = new HashMap<String, Object>();+ values = new HashMap<>();}@Testdiff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/AddEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/AddEvaluatorTest.javaindex bafae7dd5af..c77d44bb28b 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/AddEvaluatorTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/AddEvaluatorTest.java@@ -35,7 +35,7 @@ public class AddEvaluatorTest extends SolrTestCase {super();factory = new StreamFactory().withFunctionName("add", AddEvaluator.class);- values = new HashMap<String, Object>();+ values = new HashMap<>();}@Testdiff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/AndEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/AndEvaluatorTest.javaindex 45d4461d99f..e4d98bc5364 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/AndEvaluatorTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/AndEvaluatorTest.java@@ -35,7 +35,7 @@ public class AndEvaluatorTest extends SolrTestCase {super();factory = new StreamFactory().withFunctionName("and", AndEvaluator.class);- values = new HashMap<String, Object>();+ values = new HashMap<>();}@Testdiff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ArcCosineEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ArcCosineEvaluatorTest.javaindex 9e2321051f1..6f7df301815 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ArcCosineEvaluatorTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ArcCosineEvaluatorTest.java@@ -36,7 +36,7 @@ public class ArcCosineEvaluatorTest extends SolrTestCase {super();factory = new StreamFactory().withFunctionName("acos", ArcCosineEvaluator.class);- values = new HashMap<String, Object>();+ values = new HashMap<>();}private void test(Double value) throws IOException {diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ArcSineEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ArcSineEvaluatorTest.javaindex 39fabdb7617..178384bc4ba 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ArcSineEvaluatorTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ArcSineEvaluatorTest.java@@ -36,7 +36,7 @@ public class ArcSineEvaluatorTest extends SolrTestCase {super();factory = new StreamFactory().withFunctionName("asin", ArcSineEvaluator.class);- values = new HashMap<String, Object>();+ values = new HashMap<>();}private void test(Double value) throws IOException {diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ArcTangentEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ArcTangentEvaluatorTest.javaindex 4bb56afabdd..450a7925679 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ArcTangentEvaluatorTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ArcTangentEvaluatorTest.java@@ -36,7 +36,7 @@ public class ArcTangentEvaluatorTest extends SolrTestCase {super();factory = new StreamFactory().withFunctionName("atan", ArcTangentEvaluator.class);- values = new HashMap<String, Object>();+ values = new HashMap<>();}private void test(Double value) throws IOException {diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ArrayEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ArrayEvaluatorTest.javaindex aab978a91a1..8184e3b4ede 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ArrayEvaluatorTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ArrayEvaluatorTest.java@@ -38,7 +38,7 @@ public class ArrayEvaluatorTest extends SolrTestCase {super();factory = new StreamFactory().withFunctionName("array", ArrayEvaluator.class);- values = new HashMap<String, Object>();+ values = new HashMap<>();}@Testdiff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/AscEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/AscEvaluatorTest.javaindex 4e489954fbc..0a1230123d1 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/AscEvaluatorTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/AscEvaluatorTest.java@@ -37,7 +37,7 @@ public class AscEvaluatorTest extends SolrTestCase {super();factory = new StreamFactory().withFunctionName("asc", AscEvaluator.class);- values = new HashMap<String, Object>();+ values = new HashMap<>();}@Testdiff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/CeilingEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/CeilingEvaluatorTest.javaindex 5c284eaad1b..43f9b115c8c 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/CeilingEvaluatorTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/CeilingEvaluatorTest.java@@ -36,7 +36,7 @@ public class CeilingEvaluatorTest extends SolrTestCase {super();factory = new StreamFactory().withFunctionName("ceil", CeilingEvaluator.class);- values = new HashMap<String, Object>();+ values = new HashMap<>();}@Testdiff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/CoalesceEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/CoalesceEvaluatorTest.javaindex 7f7144d5f19..2c84da89981 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/CoalesceEvaluatorTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/CoalesceEvaluatorTest.java@@ -35,7 +35,7 @@ public class CoalesceEvaluatorTest extends SolrTestCase {super();factory = new StreamFactory().withFunctionName("coalesce", CoalesceEvaluator.class);- values = new HashMap<String, Object>();+ values = new HashMap<>();}/*@Test(expected = IOException.class)diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/CorrelationEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/CorrelationEvaluatorTest.javaindex 641c6cb347c..3d8c728174f 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/CorrelationEvaluatorTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/CorrelationEvaluatorTest.java@@ -35,7 +35,7 @@ public class CorrelationEvaluatorTest extends SolrTestCase {public CorrelationEvaluatorTest() {super();factory = new StreamFactory().withFunctionName("corr", CorrelationEvaluator.class);- values = new HashMap<String, Object>();+ values = new HashMap<>();}@Testdiff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/CosineEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/CosineEvaluatorTest.javaindex 6de3678a09b..e93dc57f3f6 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/CosineEvaluatorTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/CosineEvaluatorTest.java@@ -36,7 +36,7 @@ public class CosineEvaluatorTest extends SolrTestCase {super();factory = new StreamFactory().withFunctionName("cos", CosineEvaluator.class);- values = new HashMap<String, Object>();+ values = new HashMap<>();}private void test(Double value) throws IOException {diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/CubedRootEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/CubedRootEvaluatorTest.javaindex 8ed75b699d1..2bdc4cfe414 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/CubedRootEvaluatorTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/CubedRootEvaluatorTest.java@@ -36,7 +36,7 @@ public class CubedRootEvaluatorTest extends SolrTestCase {super();factory = new StreamFactory().withFunctionName("cbrt", CubedRootEvaluator.class);- values = new HashMap<String, Object>();+ values = new HashMap<>();}private void test(Double value) throws IOException {diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/CumulativeProbabilityEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/CumulativeProbabilityEvaluatorTest.javaindex e56bf61129c..a5d393a2236 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/CumulativeProbabilityEvaluatorTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/CumulativeProbabilityEvaluatorTest.java@@ -39,7 +39,7 @@ public class CumulativeProbabilityEvaluatorTest extends SolrTestCase {new StreamFactory().withFunctionName("prob", CumulativeProbabilityEvaluator.class).withFunctionName("norm", NormalDistributionEvaluator.class);- values = new HashMap<String, Object>();+ values = new HashMap<>();}@Testdiff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/DivideEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/DivideEvaluatorTest.javaindex 3986fc49d45..c98fbf4172a 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/DivideEvaluatorTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/DivideEvaluatorTest.java@@ -36,7 +36,7 @@ public class DivideEvaluatorTest extends SolrTestCase {super();factory = new StreamFactory().withFunctionName("div", DivideEvaluator.class);- values = new HashMap<String, Object>();+ values = new HashMap<>();}@Testdiff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/EmpiricalDistributionEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/EmpiricalDistributionEvaluatorTest.javaindex af0659fbac5..f784950a133 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/EmpiricalDistributionEvaluatorTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/EmpiricalDistributionEvaluatorTest.java@@ -35,7 +35,7 @@ public class EmpiricalDistributionEvaluatorTest extends SolrTestCase {public EmpiricalDistributionEvaluatorTest() {super();factory = new StreamFactory().withFunctionName("emp", EmpiricalDistributionEvaluator.class);- values = new HashMap<String, Object>();+ values = new HashMap<>();}@Testdiff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/EqualToEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/EqualToEvaluatorTest.javaindex 7c85b76cf59..7d14ba8d5c3 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/EqualToEvaluatorTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/EqualToEvaluatorTest.java@@ -40,7 +40,7 @@ public class EqualToEvaluatorTest extends SolrTestCase {new StreamFactory().withFunctionName("eq", EqualToEvaluator.class).withFunctionName("val", RawValueEvaluator.class);- values = new HashMap<String, Object>();+ values = new HashMap<>();}@Testdiff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ExclusiveOrEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ExclusiveOrEvaluatorTest.javaindex bd44b26c3f4..955fa99b8bb 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ExclusiveOrEvaluatorTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ExclusiveOrEvaluatorTest.java@@ -35,7 +35,7 @@ public class ExclusiveOrEvaluatorTest extends SolrTestCase {super();factory = new StreamFactory().withFunctionName("eor", ExclusiveOrEvaluator.class);- values = new HashMap<String, Object>();+ values = new HashMap<>();}@Testdiff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/FieldValueEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/FieldValueEvaluatorTest.javaindex 12189faba86..690ebab6326 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/FieldValueEvaluatorTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/FieldValueEvaluatorTest.java@@ -34,7 +34,7 @@ public class FieldValueEvaluatorTest extends SolrTestCase {public FieldValueEvaluatorTest() {super();- values = new HashMap<String, Object>();+ values = new HashMap<>();}@SuppressWarnings("serial")diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/FloorEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/FloorEvaluatorTest.javaindex 0146367fd85..d7b4c46d440 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/FloorEvaluatorTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/FloorEvaluatorTest.java@@ -36,7 +36,7 @@ public class FloorEvaluatorTest extends SolrTestCase {super();factory = new StreamFactory().withFunctionName("floor", FloorEvaluator.class);- values = new HashMap<String, Object>();+ values = new HashMap<>();}@Testdiff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/GreaterThanEqualToEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/GreaterThanEqualToEvaluatorTest.javaindex 9296032c1ba..502ab928044 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/GreaterThanEqualToEvaluatorTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/GreaterThanEqualToEvaluatorTest.java@@ -36,7 +36,7 @@ public class GreaterThanEqualToEvaluatorTest extends SolrTestCase {super();factory = new StreamFactory().withFunctionName("gte", GreaterThanEqualToEvaluator.class);- values = new HashMap<String, Object>();+ values = new HashMap<>();}@Testdiff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/GreaterThanEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/GreaterThanEvaluatorTest.javaindex f5161a64446..3255174a494 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/GreaterThanEvaluatorTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/GreaterThanEvaluatorTest.java@@ -36,7 +36,7 @@ public class GreaterThanEvaluatorTest extends SolrTestCase {super();factory = new StreamFactory().withFunctionName("gt", GreaterThanEvaluator.class);- values = new HashMap<String, Object>();+ values = new HashMap<>();}@Testdiff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/HyperbolicCosineEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/HyperbolicCosineEvaluatorTest.javaindex 4b69b4edd4b..37e9f244145 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/HyperbolicCosineEvaluatorTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/HyperbolicCosineEvaluatorTest.java@@ -36,7 +36,7 @@ public class HyperbolicCosineEvaluatorTest extends SolrTestCase {super();factory = new StreamFactory().withFunctionName("cosh", HyperbolicCosineEvaluator.class);- values = new HashMap<String, Object>();+ values = new HashMap<>();}private void test(Double value) throws IOException {diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/HyperbolicSineEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/HyperbolicSineEvaluatorTest.javaindex 6c9184e4823..404eba74171 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/HyperbolicSineEvaluatorTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/HyperbolicSineEvaluatorTest.java@@ -36,7 +36,7 @@ public class HyperbolicSineEvaluatorTest extends SolrTestCase {super();factory = new StreamFactory().withFunctionName("sinh", HyperbolicSineEvaluator.class);- values = new HashMap<String, Object>();+ values = new HashMap<>();}private void test(Double value) throws IOException {diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/HyperbolicTangentEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/HyperbolicTangentEvaluatorTest.javaindex 63bc90f60f8..5957afe709a 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/HyperbolicTangentEvaluatorTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/HyperbolicTangentEvaluatorTest.java@@ -36,7 +36,7 @@ public class HyperbolicTangentEvaluatorTest extends SolrTestCase {super();factory = new StreamFactory().withFunctionName("tanh", HyperbolicTangentEvaluator.class);- values = new HashMap<String, Object>();+ values = new HashMap<>();}private void test(Double value) throws IOException {diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/LengthEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/LengthEvaluatorTest.javaindex 64f1f206ac8..91a4d731714 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/LengthEvaluatorTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/LengthEvaluatorTest.java@@ -41,7 +41,7 @@ public class LengthEvaluatorTest extends SolrTestCase {new StreamFactory().withFunctionName("length", LengthEvaluator.class).withFunctionName("sequence", SequenceEvaluator.class);- values = new HashMap<String, Object>();+ values = new HashMap<>();}@Testdiff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/LessThanEqualToEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/LessThanEqualToEvaluatorTest.javaindex 6b41b51746e..5c6a5e9ea70 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/LessThanEqualToEvaluatorTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/LessThanEqualToEvaluatorTest.java@@ -36,7 +36,7 @@ public class LessThanEqualToEvaluatorTest extends SolrTestCase {super();factory = new StreamFactory().withFunctionName("lte", LessThanEqualToEvaluator.class);- values = new HashMap<String, Object>();+ values = new HashMap<>();}@Testdiff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/LessThanEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/LessThanEvaluatorTest.javaindex 588660919b5..c74945a6df6 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/LessThanEvaluatorTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/LessThanEvaluatorTest.java@@ -36,7 +36,7 @@ public class LessThanEvaluatorTest extends SolrTestCase {super();factory = new StreamFactory().withFunctionName("lt", LessThanEvaluator.class);- values = new HashMap<String, Object>();+ values = new HashMap<>();}@Testdiff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ModuloEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ModuloEvaluatorTest.javaindex 01c53bc288c..a0b0e1ce317 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ModuloEvaluatorTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ModuloEvaluatorTest.java@@ -36,7 +36,7 @@ public class ModuloEvaluatorTest extends SolrTestCase {super();factory = new StreamFactory().withFunctionName("mod", ModuloEvaluator.class);- values = new HashMap<String, Object>();+ values = new HashMap<>();}@Testdiff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/MultiplyEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/MultiplyEvaluatorTest.javaindex ecd732cfd05..6b895dc6cbf 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/MultiplyEvaluatorTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/MultiplyEvaluatorTest.java@@ -35,7 +35,7 @@ public class MultiplyEvaluatorTest extends SolrTestCase {super();factory = new StreamFactory().withFunctionName("mult", MultiplyEvaluator.class);- values = new HashMap<String, Object>();+ values = new HashMap<>();}@Testdiff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/NaturalLogEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/NaturalLogEvaluatorTest.javaindex 8fa908724fc..097b4a86ec8 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/NaturalLogEvaluatorTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/NaturalLogEvaluatorTest.java@@ -40,7 +40,7 @@ public class NaturalLogEvaluatorTest extends SolrTestCase {new StreamFactory().withFunctionName("log", NaturalLogEvaluator.class).withFunctionName("add", AddEvaluator.class);- values = new HashMap<String, Object>();+ values = new HashMap<>();}@Testdiff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/NormalDistributionEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/NormalDistributionEvaluatorTest.javaindex 105ba83ffe9..c2a6e963055 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/NormalDistributionEvaluatorTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/NormalDistributionEvaluatorTest.java@@ -35,7 +35,7 @@ public class NormalDistributionEvaluatorTest extends SolrTestCase {public NormalDistributionEvaluatorTest() {super();factory = new StreamFactory().withFunctionName("norm", NormalDistributionEvaluator.class);- values = new HashMap<String, Object>();+ values = new HashMap<>();}@Testdiff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/NormalizeEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/NormalizeEvaluatorTest.javaindex 49ed455af56..daca21ab3ff 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/NormalizeEvaluatorTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/NormalizeEvaluatorTest.java@@ -37,7 +37,7 @@ public class NormalizeEvaluatorTest extends SolrTestCase {public NormalizeEvaluatorTest() {super();factory = new StreamFactory().withFunctionName("norm", NormalizeEvaluator.class);- values = new HashMap<String, Object>();+ values = new HashMap<>();}@Testdiff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/NotEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/NotEvaluatorTest.javaindex d66100359bb..2b8ce6ae525 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/NotEvaluatorTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/NotEvaluatorTest.java@@ -35,7 +35,7 @@ public class NotEvaluatorTest extends SolrTestCase {super();factory = new StreamFactory().withFunctionName("not", NotEvaluator.class);- values = new HashMap<String, Object>();+ values = new HashMap<>();}@Testdiff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/OrEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/OrEvaluatorTest.javaindex 3e72cdc19af..546086fc4c5 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/OrEvaluatorTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/OrEvaluatorTest.java@@ -35,7 +35,7 @@ public class OrEvaluatorTest extends SolrTestCase {super();factory = new StreamFactory().withFunctionName("or", OrEvaluator.class);- values = new HashMap<String, Object>();+ values = new HashMap<>();}@Testdiff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/PowerEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/PowerEvaluatorTest.javaindex a2fd0112841..7c52653b3a8 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/PowerEvaluatorTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/PowerEvaluatorTest.java@@ -37,7 +37,7 @@ public class PowerEvaluatorTest extends SolrTestCase {super();factory = new StreamFactory().withFunctionName("pow", PowerEvaluator.class);- values = new HashMap<String, Object>();+ values = new HashMap<>();}@Testdiff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/RawValueEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/RawValueEvaluatorTest.javaindex d08ce4cf230..d88654014e2 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/RawValueEvaluatorTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/RawValueEvaluatorTest.java@@ -40,7 +40,7 @@ public class RawValueEvaluatorTest extends SolrTestCase {.withFunctionName("val", RawValueEvaluator.class).withFunctionName("add", AddEvaluator.class).withFunctionName("and", AndEvaluator.class);- values = new HashMap<String, Object>();+ values = new HashMap<>();}@Testdiff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/RecursiveEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/RecursiveEvaluatorTest.javaindex e57647f3935..c6c1577c82b 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/RecursiveEvaluatorTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/RecursiveEvaluatorTest.java@@ -49,7 +49,7 @@ public class RecursiveEvaluatorTest extends SolrTestCase {.withFunctionName("sub", SubtractEvaluator.class).withFunctionName("mult", MultiplyEvaluator.class).withFunctionName("if", IfThenElseEvaluator.class);- values = new HashMap<String, Object>();+ values = new HashMap<>();}@Testdiff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/RegressionEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/RegressionEvaluatorTest.javaindex bc2241b5167..4a18d0848c9 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/RegressionEvaluatorTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/RegressionEvaluatorTest.java@@ -35,7 +35,7 @@ public class RegressionEvaluatorTest extends SolrTestCase {public RegressionEvaluatorTest() {super();factory = new StreamFactory().withFunctionName("regress", RegressionEvaluator.class);- values = new HashMap<String, Object>();+ values = new HashMap<>();}@Testdiff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ReverseEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ReverseEvaluatorTest.javaindex 29a3805286c..fcbc551918e 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ReverseEvaluatorTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ReverseEvaluatorTest.java@@ -35,7 +35,7 @@ public class ReverseEvaluatorTest extends SolrTestCase {public ReverseEvaluatorTest() {super();factory = new StreamFactory().withFunctionName("reverse", ReverseEvaluator.class);- values = new HashMap<String, Object>();+ values = new HashMap<>();}@Testdiff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/RoundEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/RoundEvaluatorTest.javaindex 1d2cec2aa04..f960bfead28 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/RoundEvaluatorTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/RoundEvaluatorTest.java@@ -36,7 +36,7 @@ public class RoundEvaluatorTest extends SolrTestCase {super();factory = new StreamFactory().withFunctionName("round", RoundEvaluator.class);- values = new HashMap<String, Object>();+ values = new HashMap<>();}private void test(Double value) throws IOException {diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/SineEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/SineEvaluatorTest.javaindex bc013f5c239..1295de1f468 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/SineEvaluatorTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/SineEvaluatorTest.java@@ -36,7 +36,7 @@ public class SineEvaluatorTest extends SolrTestCase {super();factory = new StreamFactory().withFunctionName("sin", SineEvaluator.class);- values = new HashMap<String, Object>();+ values = new HashMap<>();}private void test(Double value) throws IOException {diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/SquareRootEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/SquareRootEvaluatorTest.javaindex c71eeaf3221..a2178832d5f 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/SquareRootEvaluatorTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/SquareRootEvaluatorTest.java@@ -36,7 +36,7 @@ public class SquareRootEvaluatorTest extends SolrTestCase {super();factory = new StreamFactory().withFunctionName("sqrt", SquareRootEvaluator.class);- values = new HashMap<String, Object>();+ values = new HashMap<>();}private void test(Double value) throws IOException {diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/SubtractEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/SubtractEvaluatorTest.javaindex 9384afaf14e..97bbbc83640 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/SubtractEvaluatorTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/SubtractEvaluatorTest.java@@ -36,7 +36,7 @@ public class SubtractEvaluatorTest extends SolrTestCase {super();factory = new StreamFactory().withFunctionName("sub", SubtractEvaluator.class);- values = new HashMap<String, Object>();+ values = new HashMap<>();}@Testdiff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/TangentEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/TangentEvaluatorTest.javaindex 47669a1eecc..c298a8900d1 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/TangentEvaluatorTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/TangentEvaluatorTest.java@@ -36,7 +36,7 @@ public class TangentEvaluatorTest extends SolrTestCase {super();factory = new StreamFactory().withFunctionName("tan", TangentEvaluator.class);- values = new HashMap<String, Object>();+ values = new HashMap<>();}private void test(Double value) throws IOException {diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/UniformDistributionEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/UniformDistributionEvaluatorTest.javaindex 06298d20381..69a0927d027 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/UniformDistributionEvaluatorTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/UniformDistributionEvaluatorTest.java@@ -35,7 +35,7 @@ public class UniformDistributionEvaluatorTest extends SolrTestCase {public UniformDistributionEvaluatorTest() {super();factory = new StreamFactory().withFunctionName("unif", UniformDistributionEvaluator.class);- values = new HashMap<String, Object>();+ values = new HashMap<>();}@Testdiff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/UuidEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/UuidEvaluatorTest.javaindex 2010bf25aae..8d8176bae31 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/UuidEvaluatorTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/UuidEvaluatorTest.java@@ -35,7 +35,7 @@ public class UuidEvaluatorTest extends SolrTestCase {super();factory = new StreamFactory().withFunctionName("uuid", UuidEvaluator.class);- values = new HashMap<String, Object>();+ values = new HashMap<>();}@Testdiff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/response/NestableJsonFacetTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/response/NestableJsonFacetTest.javaindex 4eee3df8f93..9a3d32d3186 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/response/NestableJsonFacetTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/response/NestableJsonFacetTest.java@@ -30,39 +30,39 @@ public class NestableJsonFacetTest extends SolrTestCaseJ4 {NamedList<Object> list = new NamedList<>();list.add("count", 12);NamedList<Object> buckets =- new NamedList<Object>() {+ new NamedList<>() {{add("val", "Nike");}};NamedList<Object> vals =- new NamedList<Object>() {+ new NamedList<>() {{add("numBuckets", 10);add("allBuckets",- new NamedList<Object>() {+ new NamedList<>() {{add("count", 12);}});add("before",- new NamedList<Object>() {+ new NamedList<>() {{add("count", 1);}});add("after",- new NamedList<Object>() {+ new NamedList<>() {{add("count", 2);}});add("between",- new NamedList<Object>() {+ new NamedList<>() {{add("count", 9);}@@ -79,39 +79,39 @@ public class NestableJsonFacetTest extends SolrTestCaseJ4 {list.add("count", 12L);buckets =- new NamedList<Object>() {+ new NamedList<>() {{add("val", "Nike");}};vals =- new NamedList<Object>() {+ new NamedList<>() {{add("numBuckets", 10L);add("allBuckets",- new NamedList<Object>() {+ new NamedList<>() {{add("count", 12L);}});add("before",- new NamedList<Object>() {+ new NamedList<>() {{add("count", 1L);}});add("after",- new NamedList<Object>() {+ new NamedList<>() {{add("count", 2L);}});add("between",- new NamedList<Object>() {+ new NamedList<>() {{add("count", 9L);}diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/response/TestDelegationTokenResponse.java b/solr/solrj/src/test/org/apache/solr/client/solrj/response/TestDelegationTokenResponse.javaindex caa9cd1d95e..5bb812a413f 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/response/TestDelegationTokenResponse.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/response/TestDelegationTokenResponse.java@@ -41,9 +41,9 @@ public class TestDelegationTokenResponse extends SolrTestCase {private String getNestedMapJson(String outerKey, String innerKey, Object innerValue) {CharArr out = new CharArr();JSONWriter w = new JSONWriter(out, 2);- Map<String, Object> innerMap = new HashMap<String, Object>();+ Map<String, Object> innerMap = new HashMap<>();innerMap.put(innerKey, innerValue);- Map<String, Map<String, Object>> outerMap = new HashMap<String, Map<String, Object>>();+ Map<String, Map<String, Object>> outerMap = new HashMap<>();outerMap.put(outerKey, innerMap);w.write(outerMap);return out.toString();@@ -52,7 +52,7 @@ public class TestDelegationTokenResponse extends SolrTestCase {private String getMapJson(String key, Object value) {CharArr out = new CharArr();JSONWriter w = new JSONWriter(out, 2);- Map<String, Object> map = new HashMap<String, Object>();+ Map<String, Object> map = new HashMap<>();map.put(key, value);w.write(map);return out.toString();diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/routing/NodePreferenceRulesComparatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/routing/NodePreferenceRulesComparatorTest.javaindex 3663d161757..1fa85e4981f 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/routing/NodePreferenceRulesComparatorTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/routing/NodePreferenceRulesComparatorTest.java@@ -203,7 +203,7 @@ public class NodePreferenceRulesComparatorTest extends SolrTestCaseJ4 {}private static List<Replica> getBasicReplicaList() {- List<Replica> replicas = new ArrayList<Replica>();+ List<Replica> replicas = new ArrayList<>();replicas.add(new Replica("node1",diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/routing/ReplicaListTransformerTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/routing/ReplicaListTransformerTest.javaindex 61e4150e28e..6d257edcd18 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/routing/ReplicaListTransformerTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/routing/ReplicaListTransformerTest.java@@ -110,7 +110,7 @@ public class ReplicaListTransformerTest extends SolrTestCase {final String name = "replica" + (ii + 1);final String url = urls.get(ii);- final Map<String, Object> propMap = new HashMap<String, Object>();+ final Map<String, Object> propMap = new HashMap<>();propMap.put("base_url", url);propMap.put("core", "test_core");propMap.put("node_name", "test_node:80_");diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/routing/RequestReplicaListTransformerGeneratorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/routing/RequestReplicaListTransformerGeneratorTest.javaindex f134cc23d17..ae6d2459382 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/routing/RequestReplicaListTransformerGeneratorTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/routing/RequestReplicaListTransformerGeneratorTest.java@@ -142,7 +142,7 @@ public class RequestReplicaListTransformerGeneratorTest extends SolrTestCaseJ4 {}private static List<Replica> getBasicReplicaList() {- List<Replica> replicas = new ArrayList<Replica>();+ List<Replica> replicas = new ArrayList<>();replicas.add(new Replica("node1",diff --git a/solr/solrj/src/test/org/apache/solr/common/TestToleratedUpdateError.java b/solr/solrj/src/test/org/apache/solr/common/TestToleratedUpdateError.javaindex da6cac631ce..020ff6a1398 100644--- a/solr/solrj/src/test/org/apache/solr/common/TestToleratedUpdateError.java+++ b/solr/solrj/src/test/org/apache/solr/common/TestToleratedUpdateError.java@@ -85,7 +85,7 @@ public class TestToleratedUpdateError extends SolrTestCase {// randomizedint numIters = atLeast(5000);for (int i = 0; i < numIters; i++) {- valid = new SimpleOrderedMap<String>();+ valid = new SimpleOrderedMap<>();valid.add("type", ALL_TYPES[TestUtil.nextInt(random(), 0, ALL_TYPES.length - 1)].toString());valid.add("id", TestUtil.randomUnicodeString(random()));valid.add("message", TestUtil.randomUnicodeString(random()));diff --git a/solr/solrj/src/test/org/noggit/TestJSONWriter.java b/solr/solrj/src/test/org/noggit/TestJSONWriter.javaindex a75c947322a..ff6c7fe336f 100644--- a/solr/solrj/src/test/org/noggit/TestJSONWriter.java+++ b/solr/solrj/src/test/org/noggit/TestJSONWriter.java@@ -44,7 +44,7 @@ public class TestJSONWriter extends SolrTestCaseJ4 {}public static Map<String, Object> O(Object... lst) {- LinkedHashMap<String, Object> map = new LinkedHashMap<String, Object>();+ LinkedHashMap<String, Object> map = new LinkedHashMap<>();for (int i = 0; i < lst.length; i += 2) {map.put(lst[i].toString(), lst[i + 1]);}@@ -72,7 +72,7 @@ public class TestJSONWriter extends SolrTestCaseJ4 {public static class Custom implements JSONWriter.Writable {@Overridepublic void write(JSONWriter writer) {- Map<String, Integer> val = new LinkedHashMap<String, Integer>();+ Map<String, Integer> val = new LinkedHashMap<>();val.put("a", 1);val.put("b", 2);writer.write(val);diff --git a/solr/solrj/src/test/org/noggit/TestObjectBuilder.java b/solr/solrj/src/test/org/noggit/TestObjectBuilder.javaindex db156b5a454..e226969ad03 100644--- a/solr/solrj/src/test/org/noggit/TestObjectBuilder.java+++ b/solr/solrj/src/test/org/noggit/TestObjectBuilder.java@@ -54,7 +54,7 @@ public class TestObjectBuilder extends SolrTestCaseJ4 {}public static Map<String, Object> O(Object... lst) {- LinkedHashMap<String, Object> map = new LinkedHashMap<String, Object>();+ LinkedHashMap<String, Object> map = new LinkedHashMap<>();for (int i = 0; i < lst.length; i += 2) {map.put(lst[i].toString(), lst[i + 1]);}diff --git a/solr/test-framework/src/java/org/apache/solr/cloud/AbstractChaosMonkeyNothingIsSafeTestBase.java b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractChaosMonkeyNothingIsSafeTestBase.javaindex 8b819e1fd34..8f3b5540887 100644--- a/solr/test-framework/src/java/org/apache/solr/cloud/AbstractChaosMonkeyNothingIsSafeTestBase.java+++ b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractChaosMonkeyNothingIsSafeTestBase.java@@ -313,7 +313,7 @@ public abstract class AbstractChaosMonkeyNothingIsSafeTestBase}private Set<String> getAddFails(List<StoppableIndexingThread> threads) {- Set<String> addFails = new HashSet<String>();+ Set<String> addFails = new HashSet<>();for (StoppableIndexingThread thread : threads) {addFails.addAll(thread.getAddFails());}@@ -321,7 +321,7 @@ public abstract class AbstractChaosMonkeyNothingIsSafeTestBase}private Set<String> getDeleteFails(List<StoppableIndexingThread> threads) {- Set<String> deleteFails = new HashSet<String>();+ Set<String> deleteFails = new HashSet<>();for (StoppableIndexingThread thread : threads) {deleteFails.addAll(thread.getDeleteFails());}diff --git a/solr/test-framework/src/java/org/apache/solr/cloud/StoppableIndexingThread.java b/solr/test-framework/src/java/org/apache/solr/cloud/StoppableIndexingThread.javaindex 9126d5a2b47..3b100cf1245 100644--- a/solr/test-framework/src/java/org/apache/solr/cloud/StoppableIndexingThread.java+++ b/solr/test-framework/src/java/org/apache/solr/cloud/StoppableIndexingThread.java@@ -40,7 +40,7 @@ public class StoppableIndexingThread extends AbstractFullDistribZkTestBase.Stoppprivate SolrClient cloudClient;private int numDeletes;private int numAdds;- private List<SolrInputDocument> docs = new ArrayList<SolrInputDocument>();+ private List<SolrInputDocument> docs = new ArrayList<>();private int batchSize;private boolean pauseBetweenUpdates;diff --git a/solr/test-framework/src/java/org/apache/solr/cloud/ZkTestServer.java b/solr/test-framework/src/java/org/apache/solr/cloud/ZkTestServer.javaindex 1271baa9009..a83b95178ba 100644--- a/solr/test-framework/src/java/org/apache/solr/cloud/ZkTestServer.java+++ b/solr/test-framework/src/java/org/apache/solr/cloud/ZkTestServer.java@@ -191,7 +191,7 @@ public class ZkTestServer {String[] maxKeys = maxCounters.keySet().toArray(new String[maxCounters.size()]);Arrays.sort(maxKeys,- new Comparator<String>() {+ new Comparator<>() {private final Comparator<Long> valComp = Comparator.<Long>naturalOrder().reversed();@Overridediff --git a/solr/test-framework/src/java/org/apache/solr/util/QueryMatchers.java b/solr/test-framework/src/java/org/apache/solr/util/QueryMatchers.javaindex 10b8db2c066..e2f6c8c49f5 100644--- a/solr/test-framework/src/java/org/apache/solr/util/QueryMatchers.java+++ b/solr/test-framework/src/java/org/apache/solr/util/QueryMatchers.java@@ -66,7 +66,7 @@ public class QueryMatchers {* @param query the query string to match against*/public static Matcher<Query> stringQuery(String query) {- return new TypeSafeDiagnosingMatcher<Query>() {+ return new TypeSafeDiagnosingMatcher<>() {@Overrideprotected boolean matchesSafely(Query item, Description mismatchDescription) {return is(query).matches(item.toString());@@ -133,7 +133,7 @@ public class QueryMatchers {public static Matcher<BooleanClause> booleanClause(Matcher<? extends Query> query, BooleanClause.Occur occur) {- return new TypeSafeDiagnosingMatcher<BooleanClause>() {+ return new TypeSafeDiagnosingMatcher<>() {@Overrideprotected boolean matchesSafely(BooleanClause item, Description mismatchDescription) {boolean match = true;