Skip to content

Commit 271e5fd

Browse files
committed
Reverted StrictMapAppenderConstructor constructor back to public
Issue: SPR-13504 (cherry picked from commit 627393a)
1 parent 5d36ac0 commit 271e5fd

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

spring-beans/src/main/java/org/springframework/beans/factory/config/YamlProcessor.java

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
import org.springframework.util.StringUtils;
4343

4444
/**
45-
* Base class for Yaml factories.
45+
* Base class for YAML factories.
4646
*
4747
* @author Dave Syer
4848
* @since 4.1
@@ -65,7 +65,6 @@ public abstract class YamlProcessor {
6565
* some of the documents in a YAML resource. In YAML documents are
6666
* separated by <code>---<code> lines, and each document is converted
6767
* to properties before the match is made. E.g.
68-
*
6968
* <pre class="code">
7069
* environment: dev
7170
* url: http://dev.bar.com
@@ -75,11 +74,9 @@ public abstract class YamlProcessor {
7574
* url:http://foo.bar.com
7675
* name: My Cool App
7776
* </pre>
78-
*
7977
* when mapped with
8078
* <code>documentMatchers = YamlProcessor.mapMatcher({"environment": "prod"})</code>
8179
* would end up as
82-
*
8380
* <pre class="code">
8481
* environment=prod
8582
* url=http://foo.bar.com
@@ -103,9 +100,9 @@ public void setMatchDefault(boolean matchDefault) {
103100
}
104101

105102
/**
106-
* Method to use for resolving resources. Each resource will be converted to a Map, so
107-
* this property is used to decide which map entries to keep in the final output from
108-
* this factory.
103+
* Method to use for resolving resources. Each resource will be converted to a Map,
104+
* so this property is used to decide which map entries to keep in the final output
105+
* from this factory.
109106
* @param resolutionMethod the resolution method to set (defaults to
110107
* {@link ResolutionMethod#OVERRIDE}).
111108
*/
@@ -127,9 +124,9 @@ public void setResources(Resource... resources) {
127124
* Provide an opportunity for subclasses to process the Yaml parsed from the supplied
128125
* resources. Each resource is parsed in turn and the documents inside checked against
129126
* the {@link #setDocumentMatchers(DocumentMatcher...) matchers}. If a document
130-
* matches it is passed into the callback, along with its representation as
131-
* Properties. Depending on the {@link #setResolutionMethod(ResolutionMethod)} not all
132-
* of the documents will be parsed.
127+
* matches it is passed into the callback, along with its representation as Properties.
128+
* Depending on the {@link #setResolutionMethod(ResolutionMethod)} not all of the
129+
* documents will be parsed.
133130
* @param callback a callback to delegate to once matching documents are found
134131
* @see #createYaml()
135132
*/
@@ -393,6 +390,11 @@ public enum ResolutionMethod {
393390
*/
394391
protected static class StrictMapAppenderConstructor extends Constructor {
395392

393+
// Declared as public for use in subclasses
394+
public StrictMapAppenderConstructor() {
395+
super();
396+
}
397+
396398
@Override
397399
protected Map<Object, Object> constructMapping(MappingNode node) {
398400
try {
@@ -421,7 +423,6 @@ public Set<Entry<Object, Object>> entrySet() {
421423
}
422424
};
423425
}
424-
425426
}
426427

427428
}

0 commit comments

Comments
 (0)