You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by dw...@apache.org on 2021/03/10 10:09:58 UTC

[lucene] 26/33: SOLR-15016: Fix precommit issues.

This is an automated email from the ASF dual-hosted git repository.

dweiss pushed a commit to branch jira/solr-15016
in repository https://gitbox.apache.org/repos/asf/lucene.git

commit 947db7a06fcdf315af60ed1701283b01d416c852
Author: Andrzej Bialecki <ab...@apache.org>
AuthorDate: Wed Dec 2 15:18:41 2020 +0100

    SOLR-15016: Fix precommit issues.
---
 .../events/impl/ClusterEventProducerFactory.java    |  4 ++--
 .../impl/PlacementPluginFactoryLoader.java          | 21 +++++++++++++++++++--
 .../placement/plugins/AffinityPlacementConfig.java  | 19 +++++++++++++++++--
 .../java/org/apache/solr/core/CoreContainer.java    |  1 -
 .../plugins/AffinityPlacementFactoryTest.java       |  1 -
 5 files changed, 38 insertions(+), 8 deletions(-)

diff --git a/solr/core/src/java/org/apache/solr/cluster/events/impl/ClusterEventProducerFactory.java b/solr/core/src/java/org/apache/solr/cluster/events/impl/ClusterEventProducerFactory.java
index 609f65c..e79341d 100644
--- a/solr/core/src/java/org/apache/solr/cluster/events/impl/ClusterEventProducerFactory.java
+++ b/solr/core/src/java/org/apache/solr/cluster/events/impl/ClusterEventProducerFactory.java
@@ -138,7 +138,7 @@ public class ClusterEventProducerFactory extends ClusterEventProducerBase {
                   " using existing implementation {}", cc.getClusterEventProducer().getClass().getName());
             }
           } else {
-            log.warn("Ignoring ClusterEventProducer config with non-standard name: " + plugin.getInfo());
+            log.warn("Ignoring ClusterEventProducer config with non-standard name: {}", plugin.getInfo());
           }
         }
       }
@@ -163,7 +163,7 @@ public class ClusterEventProducerFactory extends ClusterEventProducerBase {
                   " using existing implementation {}", cc.getClusterEventProducer().getClass().getName());
             }
           } else {
-            log.warn("Ignoring ClusterEventProducer config with non-standard name: " + plugin.getInfo());
+            log.warn("Ignoring ClusterEventProducer config with non-standard name: {}", plugin.getInfo());
           }
         }
       }
diff --git a/solr/core/src/java/org/apache/solr/cluster/placement/impl/PlacementPluginFactoryLoader.java b/solr/core/src/java/org/apache/solr/cluster/placement/impl/PlacementPluginFactoryLoader.java
index 46e6435..523fa17 100644
--- a/solr/core/src/java/org/apache/solr/cluster/placement/impl/PlacementPluginFactoryLoader.java
+++ b/solr/core/src/java/org/apache/solr/cluster/placement/impl/PlacementPluginFactoryLoader.java
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package org.apache.solr.cluster.placement.impl;
 
 import org.apache.solr.api.ContainerPluginsRegistry;
@@ -32,7 +49,7 @@ public class PlacementPluginFactoryLoader {
           if (PlacementPluginFactory.PLUGIN_NAME.equals(plugin.getInfo().name)) {
             pluginFactory.setDelegate((PlacementPluginFactory) instance);
           } else {
-            log.warn("Ignoring PlacementPluginFactory plugin with non-standard name: " + plugin.getInfo());
+            log.warn("Ignoring PlacementPluginFactory plugin with non-standard name: {}", plugin.getInfo());
           }
         }
       }
@@ -47,7 +64,7 @@ public class PlacementPluginFactoryLoader {
           if (PlacementPluginFactory.PLUGIN_NAME.equals(plugin.getInfo().name)) {
             pluginFactory.setDelegate(null);
           } else {
-            log.warn("Ignoring PlacementPluginFactory plugin with non-standard name: " + plugin.getInfo());
+            log.warn("Ignoring PlacementPluginFactory plugin with non-standard name: {}", plugin.getInfo());
           }
         }
       }
diff --git a/solr/core/src/java/org/apache/solr/cluster/placement/plugins/AffinityPlacementConfig.java b/solr/core/src/java/org/apache/solr/cluster/placement/plugins/AffinityPlacementConfig.java
index ae996ef..dbfa564 100644
--- a/solr/core/src/java/org/apache/solr/cluster/placement/plugins/AffinityPlacementConfig.java
+++ b/solr/core/src/java/org/apache/solr/cluster/placement/plugins/AffinityPlacementConfig.java
@@ -1,10 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package org.apache.solr.cluster.placement.plugins;
 
 import org.apache.solr.common.annotation.JsonProperty;
 import org.apache.solr.common.util.ReflectMapWriter;
 
-import java.io.IOException;
-
 /**
  *
  */
diff --git a/solr/core/src/java/org/apache/solr/core/CoreContainer.java b/solr/core/src/java/org/apache/solr/core/CoreContainer.java
index b127263..f31dfa7 100644
--- a/solr/core/src/java/org/apache/solr/core/CoreContainer.java
+++ b/solr/core/src/java/org/apache/solr/core/CoreContainer.java
@@ -74,7 +74,6 @@ import org.apache.solr.cloud.OverseerTaskQueue;
 import org.apache.solr.cloud.ZkController;
 import org.apache.solr.cluster.events.ClusterEventProducer;
 import org.apache.solr.cluster.events.impl.ClusterEventProducerFactory;
-import org.apache.solr.cluster.placement.PlacementPlugin;
 import org.apache.solr.cluster.placement.PlacementPluginFactory;
 import org.apache.solr.cluster.placement.impl.PlacementPluginFactoryLoader;
 import org.apache.solr.common.AlreadyClosedException;
diff --git a/solr/core/src/test/org/apache/solr/cluster/placement/plugins/AffinityPlacementFactoryTest.java b/solr/core/src/test/org/apache/solr/cluster/placement/plugins/AffinityPlacementFactoryTest.java
index 9cbdc3d..e048617 100644
--- a/solr/core/src/test/org/apache/solr/cluster/placement/plugins/AffinityPlacementFactoryTest.java
+++ b/solr/core/src/test/org/apache/solr/cluster/placement/plugins/AffinityPlacementFactoryTest.java
@@ -27,7 +27,6 @@ import org.apache.solr.cluster.placement.*;
 import org.apache.solr.cluster.placement.Builders;
 import org.apache.solr.cluster.placement.impl.PlacementPlanFactoryImpl;
 import org.apache.solr.cluster.placement.impl.PlacementRequestImpl;
-import org.apache.solr.cluster.placement.impl.PlacementRequestImpl;
 import org.apache.solr.common.util.Pair;
 import org.junit.BeforeClass;
 import org.junit.Test;