File: snakeyaml2.patch

package info (click to toggle)
resteasy 3.6.2-4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 34,612 kB
  • sloc: java: 265,492; xml: 27,855; javascript: 405; jsp: 166; python: 101; sh: 15; sql: 3; makefile: 2
file content (25 lines) | stat: -rw-r--r-- 1,266 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Description: constructing CustomClassLoaderConstructor with default
 LoaderOptions to comply with the interface of snakeyaml 2.x
Author: Pierre Gruet <pgt@debian.org>
Forwarded: no
Last-Update: 2025-10-08

--- a/providers/yaml/src/main/java/org/jboss/resteasy/plugins/providers/YamlProvider.java
+++ b/providers/yaml/src/main/java/org/jboss/resteasy/plugins/providers/YamlProvider.java
@@ -5,6 +5,7 @@
 import org.jboss.resteasy.plugins.providers.yaml.i18n.Messages;
 import org.jboss.resteasy.spi.ReaderException;
 import org.jboss.resteasy.spi.WriterException;
+import org.yaml.snakeyaml.LoaderOptions;
 import org.yaml.snakeyaml.Yaml;
 import org.yaml.snakeyaml.constructor.CustomClassLoaderConstructor;
 
@@ -54,7 +55,7 @@
          if (isValidInternalType(type)) {
             return new Yaml().load(entityStream);
          } else {
-            CustomClassLoaderConstructor customClassLoaderConstructor = new CustomClassLoaderConstructor(type.getClassLoader());
+            CustomClassLoaderConstructor customClassLoaderConstructor = new CustomClassLoaderConstructor(type.getClassLoader(), new LoaderOptions());
             return new Yaml(customClassLoaderConstructor).loadAs(entityStream, type);
          }
       } catch (Exception e) {