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 10:07:42 UTC

(solr) branch branch_9x updated: [SOLR-17185] Open ValueAugmenter in ValueAugmenterFactory for extension (#2315) (#2369)

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

mkhl pushed a commit to branch branch_9x
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/branch_9x by this push:
     new f81cc4afd08 [SOLR-17185] Open ValueAugmenter in ValueAugmenterFactory for extension (#2315) (#2369)
f81cc4afd08 is described below

commit f81cc4afd08b87d7a6113d8868c460c1983c80e5
Author: Mikhail Khludnev <mk...@users.noreply.github.com>
AuthorDate: Sat Mar 23 13:07:38 2024 +0300

    [SOLR-17185] Open ValueAugmenter in ValueAugmenterFactory for extension (#2315) (#2369)
    
    
    (cherry picked from commit ad58a8d166f01b69738a7b5ded65651336022809)
    
    Co-authored-by: Torsten Bøgh Köster <to...@otto.de>
---
 .../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());
+  }
+}