Skip to content

Commit ad58a8d

Browse files
authored
[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
1 parent 4a3cd36 commit ad58a8d

File tree

2 files changed

+32
-3
lines changed

2 files changed

+32
-3
lines changed

solr/core/src/java/org/apache/solr/response/transform/ValueAugmenterFactory.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ public DocTransformer create(String field, SolrParams params, SolrQueryRequest r
7272
return new ValueAugmenter(field, val);
7373
}
7474

75-
static class ValueAugmenter extends DocTransformer {
76-
final String name;
77-
final Object value;
75+
public static class ValueAugmenter extends DocTransformer {
76+
private final String name;
77+
protected final Object value;
7878

7979
public ValueAugmenter(String name, Object value) {
8080
this.name = name;
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
package org.apache.solr.pkg;
18+
19+
import org.apache.solr.response.transform.ValueAugmenterFactory;
20+
import org.junit.Test;
21+
22+
public class ValueAugmenterPublicTest {
23+
24+
@Test
25+
public void testValueAugmenterIsOpenForExtension() {
26+
// this should compile from this package
27+
new ValueAugmenterFactory.ValueAugmenter("bee_sI", new Object());
28+
}
29+
}

0 commit comments

Comments
 (0)