|
33 | 33 | import org.yaml.snakeyaml.DumperOptions;
|
34 | 34 | import org.yaml.snakeyaml.LoaderOptions;
|
35 | 35 | import org.yaml.snakeyaml.Yaml;
|
| 36 | +import org.yaml.snakeyaml.composer.ComposerException; |
36 | 37 | import org.yaml.snakeyaml.constructor.Constructor;
|
37 | 38 | import org.yaml.snakeyaml.inspector.TagInspector;
|
38 | 39 | import org.yaml.snakeyaml.nodes.Tag;
|
|
49 | 50 | /**
|
50 | 51 | * Base class for YAML factories.
|
51 | 52 | *
|
52 |
| - * <p>Requires SnakeYAML 1.18 or higher, as of Spring Framework 5.0.6. |
| 53 | + * <p>Requires SnakeYAML 2.0 or higher, as of Spring Framework 6.1.0. |
53 | 54 | *
|
54 | 55 | * @author Dave Syer
|
55 | 56 | * @author Juergen Hoeller
|
@@ -134,7 +135,7 @@ public void setResources(Resource... resources) {
|
134 | 135 | * <p>If no supported types are configured, only Java standard classes
|
135 | 136 | * (as defined in {@link org.yaml.snakeyaml.constructor.SafeConstructor})
|
136 | 137 | * encountered in YAML documents will be supported.
|
137 |
| - * If an unsupported type is encountered, an {@link IllegalStateException} |
| 138 | + * If an unsupported type is encountered, an {@link ComposerException} |
138 | 139 | * will be thrown when the corresponding YAML node is processed.
|
139 | 140 | * @param supportedTypes the supported types, or an empty array to clear the
|
140 | 141 | * supported types
|
@@ -175,12 +176,12 @@ protected void process(MatchCallback callback) {
|
175 | 176 | /**
|
176 | 177 | * Create the {@link Yaml} instance to use.
|
177 | 178 | * <p>The default implementation sets the "allowDuplicateKeys" flag to {@code false},
|
178 |
| - * enabling built-in duplicate key handling in SnakeYAML 1.18+. |
179 |
| - * <p>As of Spring Framework 5.1.16, if custom {@linkplain #setSupportedTypes |
180 |
| - * supported types} have been configured, the default implementation creates |
181 |
| - * a {@code Yaml} instance that filters out unsupported types encountered in |
182 |
| - * YAML documents. If an unsupported type is encountered, an |
183 |
| - * {@link IllegalStateException} will be thrown when the node is processed. |
| 179 | + * enabling built-in duplicate key handling. |
| 180 | + * <p>If custom {@linkplain #setSupportedTypes supported types} have been configured, |
| 181 | + * the default implementation creates a {@code Yaml} instance that filters out |
| 182 | + * unsupported types encountered in YAML documents. |
| 183 | + * If an unsupported type is encountered, an {@link ComposerException} will be |
| 184 | + * thrown when the node is processed. |
184 | 185 | * @see LoaderOptions#setAllowDuplicateKeys(boolean)
|
185 | 186 | */
|
186 | 187 | protected Yaml createYaml() {
|
|
0 commit comments