Apache Solr open-source search software
[SOLR-17185] Open ValueAugmenter in ValueAugmenterFactory for extension (#2315)
Torsten Bøgh Kösterad58a8d166f0
diff --git a/solr/core/src/java/org/apache/solr/response/transform/ValueAugmenterFactory.java b/solr/core/src/java/org/apache/solr/response/transform/ValueAugmenterFactory.javaindex 66e34a215a4..e186619758b 100644--- a/solr/core/src/java/org/apache/solr/response/transform/ValueAugmenterFactory.java+++ b/solr/core/src/java/org/apache/solr/response/transform/ValueAugmenterFactory.java@@ -72,9 +72,9 @@ public class ValueAugmenterFactory extends TransformerFactory {return new ValueAugmenter(field, val);}- static class ValueAugmenter extends DocTransformer {- final String name;- final Object value;+ public static class ValueAugmenter extends DocTransformer {+ private final String name;+ protected final Object value;public ValueAugmenter(String name, Object value) {this.name = name;diff --git a/solr/core/src/test/org/apache/solr/pkg/ValueAugmenterPublicTest.java b/solr/core/src/test/org/apache/solr/pkg/ValueAugmenterPublicTest.javanew file mode 100644index 00000000000..b1eb7bf4651--- /dev/null+++ b/solr/core/src/test/org/apache/solr/pkg/ValueAugmenterPublicTest.java@@ -0,0 +1,29 @@+/*+ * 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.pkg;++import org.apache.solr.response.transform.ValueAugmenterFactory;+import org.junit.Test;++public class ValueAugmenterPublicTest {++ @Test+ public void testValueAugmenterIsOpenForExtension() {+ // this should compile from this package+ new ValueAugmenterFactory.ValueAugmenter("bee_sI", new Object());+ }+}