You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by mk...@apache.org on 2024/03/23 09:48:34 UTC
(solr) branch main updated: [SOLR-17185] Open ValueAugmenter in ValueAugmenterFactory for extension (#2315)
This is an automated email from the ASF dual-hosted git repository.
mkhl pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/main by this push:
new ad58a8d166f [SOLR-17185] Open ValueAugmenter in ValueAugmenterFactory for extension (#2315)
ad58a8d166f is described below
commit ad58a8d166f01b69738a7b5ded65651336022809
Author: Torsten Bøgh Köster <to...@otto.de>
AuthorDate: Sat Mar 23 10:48:28 2024 +0100
[SOLR-17185] Open ValueAugmenter in ValueAugmenterFactory for extension (#2315)
* Open value augmenter for extension
* [SOLR-17185] add public compile test
* [SOLR-17185] change visibility of fields
* [SOLR-17185] add license file // tidy
---
.../response/transform/ValueAugmenterFactory.java | 6 ++---
.../apache/solr/pkg/ValueAugmenterPublicTest.java | 29 ++++++++++++++++++++++
2 files changed, 32 insertions(+), 3 deletions(-)
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.java
index 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.java
new file mode 100644
index 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());
+ }
+}