File: snakeyaml2.patch

package info (click to toggle)
jruby-maven-plugins 3.0.1-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 5,472 kB
  • sloc: java: 9,380; javascript: 7,667; xml: 5,632; ruby: 1,382; sh: 214; makefile: 3
file content (42 lines) | stat: -rw-r--r-- 1,571 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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Description: constructing Constructor and Representer derivatives with default
 LoaderOptions and DumperOptions to comply with the interface of snakeyaml 2.x
Author: Pierre Gruet <pgt@debian.org>
Forwarded: no
Last-Update: 2025-10-12

--- a/ruby-tools/src/main/java/de/saumya/mojo/gems/spec/yaml/MappingConstructor.java
+++ b/ruby-tools/src/main/java/de/saumya/mojo/gems/spec/yaml/MappingConstructor.java
@@ -1,5 +1,6 @@
 package de.saumya.mojo.gems.spec.yaml;
 
+import org.yaml.snakeyaml.LoaderOptions;
 import org.yaml.snakeyaml.TypeDescription;
 import org.yaml.snakeyaml.constructor.Constructor;
 import org.yaml.snakeyaml.nodes.Tag;
@@ -16,7 +17,7 @@
  */
 public class MappingConstructor extends Constructor {
     public MappingConstructor() {
-        super();
+        super(new LoaderOptions());
 
         this.addTypeDescription(new TypeDescription(GemSpecification.class,
                 new Tag("!ruby/object:Gem::Specification")));
--- a/ruby-tools/src/main/java/de/saumya/mojo/gems/spec/yaml/MappingRepresenter.java
+++ b/ruby-tools/src/main/java/de/saumya/mojo/gems/spec/yaml/MappingRepresenter.java
@@ -1,5 +1,6 @@
 package de.saumya.mojo.gems.spec.yaml;
 
+import org.yaml.snakeyaml.DumperOptions;
 import org.yaml.snakeyaml.nodes.Node;
 import org.yaml.snakeyaml.nodes.Tag;
 import org.yaml.snakeyaml.representer.Represent;
@@ -17,7 +18,7 @@
  */
 public class MappingRepresenter extends Representer {
     public MappingRepresenter() {
-        super();
+        super(new DumperOptions());
 
         this.nullRepresenter = new RepresentNull();