This commit is contained in:
parent
cf292f386d
commit
026476f824
@ -27,13 +27,13 @@ index 8112370..ae308c7 100644
|
|||||||
+ <maven.compiler.source>8</maven.compiler.source>
|
+ <maven.compiler.source>8</maven.compiler.source>
|
||||||
+ <maven.compiler.target>8</maven.compiler.target>
|
+ <maven.compiler.target>8</maven.compiler.target>
|
||||||
<maven.javadoc.failOnError>false</maven.javadoc.failOnError>
|
<maven.javadoc.failOnError>false</maven.javadoc.failOnError>
|
||||||
<spring.version>3.2.17.RELEASE</spring.version>
|
|
||||||
<maven-bundle-plugin.version>3.5.0</maven-bundle-plugin.version>
|
<maven-bundle-plugin.version>3.5.0</maven-bundle-plugin.version>
|
||||||
|
<maven-resources-plugin.version>3.0.2</maven-resources-plugin.version><!-- for Github CI -->
|
||||||
diff --git a/src/main/java/org/yaml/snakeyaml/constructor/SafeConstructor.java b/src/main/java/org/yaml/snakeyaml/constructor/SafeConstructor.java
|
diff --git a/src/main/java/org/yaml/snakeyaml/constructor/SafeConstructor.java b/src/main/java/org/yaml/snakeyaml/constructor/SafeConstructor.java
|
||||||
index bd022cc..217835d 100644
|
index bd022cc..217835d 100644
|
||||||
--- a/src/main/java/org/yaml/snakeyaml/constructor/SafeConstructor.java
|
--- a/src/main/java/org/yaml/snakeyaml/constructor/SafeConstructor.java
|
||||||
+++ b/src/main/java/org/yaml/snakeyaml/constructor/SafeConstructor.java
|
+++ b/src/main/java/org/yaml/snakeyaml/constructor/SafeConstructor.java
|
||||||
@@ -17,6 +17,7 @@ package org.yaml.snakeyaml.constructor;
|
@@ -17,6 +17,7 @@
|
||||||
|
|
||||||
import java.math.BigInteger;
|
import java.math.BigInteger;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -41,15 +41,15 @@ index bd022cc..217835d 100644
|
|||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
@@ -30,7 +31,6 @@ import java.util.regex.Matcher;
|
@@ -31,7 +32,6 @@
|
||||||
import java.util.regex.Pattern;
|
|
||||||
|
|
||||||
|
import org.yaml.snakeyaml.LoaderOptions;
|
||||||
import org.yaml.snakeyaml.error.YAMLException;
|
import org.yaml.snakeyaml.error.YAMLException;
|
||||||
-import org.yaml.snakeyaml.external.biz.base64Coder.Base64Coder;
|
-import org.yaml.snakeyaml.external.biz.base64Coder.Base64Coder;
|
||||||
import org.yaml.snakeyaml.nodes.MappingNode;
|
import org.yaml.snakeyaml.nodes.MappingNode;
|
||||||
import org.yaml.snakeyaml.nodes.Node;
|
import org.yaml.snakeyaml.nodes.Node;
|
||||||
import org.yaml.snakeyaml.nodes.NodeId;
|
import org.yaml.snakeyaml.nodes.NodeId;
|
||||||
@@ -313,7 +313,7 @@ public class SafeConstructor extends BaseConstructor {
|
@@ -348,7 +348,7 @@
|
||||||
// Ignore white spaces for base64 encoded scalar
|
// Ignore white spaces for base64 encoded scalar
|
||||||
String noWhiteSpaces = constructScalar((ScalarNode) node).toString().replaceAll("\\s",
|
String noWhiteSpaces = constructScalar((ScalarNode) node).toString().replaceAll("\\s",
|
||||||
"");
|
"");
|
||||||
@ -373,7 +373,7 @@ diff --git a/src/main/java/org/yaml/snakeyaml/representer/SafeRepresenter.java b
|
|||||||
index 2cc15d9..e5ac480 100644
|
index 2cc15d9..e5ac480 100644
|
||||||
--- a/src/main/java/org/yaml/snakeyaml/representer/SafeRepresenter.java
|
--- a/src/main/java/org/yaml/snakeyaml/representer/SafeRepresenter.java
|
||||||
+++ b/src/main/java/org/yaml/snakeyaml/representer/SafeRepresenter.java
|
+++ b/src/main/java/org/yaml/snakeyaml/representer/SafeRepresenter.java
|
||||||
@@ -19,6 +19,7 @@ import java.io.UnsupportedEncodingException;
|
@@ -19,6 +19,7 @@
|
||||||
import java.math.BigInteger;
|
import java.math.BigInteger;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
@ -381,7 +381,7 @@ index 2cc15d9..e5ac480 100644
|
|||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@@ -33,7 +34,6 @@ import java.util.regex.Pattern;
|
@@ -33,7 +34,6 @@
|
||||||
|
|
||||||
import org.yaml.snakeyaml.DumperOptions;
|
import org.yaml.snakeyaml.DumperOptions;
|
||||||
import org.yaml.snakeyaml.error.YAMLException;
|
import org.yaml.snakeyaml.error.YAMLException;
|
||||||
@ -389,7 +389,7 @@ index 2cc15d9..e5ac480 100644
|
|||||||
import org.yaml.snakeyaml.nodes.Node;
|
import org.yaml.snakeyaml.nodes.Node;
|
||||||
import org.yaml.snakeyaml.nodes.Tag;
|
import org.yaml.snakeyaml.nodes.Tag;
|
||||||
import org.yaml.snakeyaml.reader.StreamReader;
|
import org.yaml.snakeyaml.reader.StreamReader;
|
||||||
@@ -131,7 +131,7 @@ class SafeRepresenter extends BaseRepresenter {
|
@@ -131,7 +131,7 @@
|
||||||
if (!checkValue.equals(value)) {
|
if (!checkValue.equals(value)) {
|
||||||
throw new YAMLException("invalid string value has occurred");
|
throw new YAMLException("invalid string value has occurred");
|
||||||
}
|
}
|
||||||
@ -398,7 +398,7 @@ index 2cc15d9..e5ac480 100644
|
|||||||
} catch (UnsupportedEncodingException e) {
|
} catch (UnsupportedEncodingException e) {
|
||||||
throw new YAMLException(e);
|
throw new YAMLException(e);
|
||||||
}
|
}
|
||||||
@@ -433,7 +433,7 @@ class SafeRepresenter extends BaseRepresenter {
|
@@ -433,7 +433,7 @@
|
||||||
|
|
||||||
protected class RepresentByteArray implements Represent {
|
protected class RepresentByteArray implements Represent {
|
||||||
public Node representData(Object data) {
|
public Node representData(Object data) {
|
||||||
@ -490,7 +490,7 @@ diff --git a/src/test/java/org/yaml/snakeyaml/issues/issue99/YamlBase64Test.java
|
|||||||
index e425f25..a0c4f6a 100644
|
index e425f25..a0c4f6a 100644
|
||||||
--- a/src/test/java/org/yaml/snakeyaml/issues/issue99/YamlBase64Test.java
|
--- a/src/test/java/org/yaml/snakeyaml/issues/issue99/YamlBase64Test.java
|
||||||
+++ b/src/test/java/org/yaml/snakeyaml/issues/issue99/YamlBase64Test.java
|
+++ b/src/test/java/org/yaml/snakeyaml/issues/issue99/YamlBase64Test.java
|
||||||
@@ -18,6 +18,7 @@ package org.yaml.snakeyaml.issues.issue99;
|
@@ -18,6 +18,7 @@
|
||||||
import java.io.BufferedInputStream;
|
import java.io.BufferedInputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
@ -498,7 +498,7 @@ index e425f25..a0c4f6a 100644
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import junit.framework.TestCase;
|
import junit.framework.TestCase;
|
||||||
@@ -27,7 +28,6 @@ import org.yaml.snakeyaml.Yaml;
|
@@ -27,7 +28,6 @@
|
||||||
import org.yaml.snakeyaml.YamlDocument;
|
import org.yaml.snakeyaml.YamlDocument;
|
||||||
import org.yaml.snakeyaml.constructor.AbstractConstruct;
|
import org.yaml.snakeyaml.constructor.AbstractConstruct;
|
||||||
import org.yaml.snakeyaml.constructor.Constructor;
|
import org.yaml.snakeyaml.constructor.Constructor;
|
||||||
@ -506,7 +506,7 @@ index e425f25..a0c4f6a 100644
|
|||||||
import org.yaml.snakeyaml.nodes.Node;
|
import org.yaml.snakeyaml.nodes.Node;
|
||||||
import org.yaml.snakeyaml.nodes.ScalarNode;
|
import org.yaml.snakeyaml.nodes.ScalarNode;
|
||||||
import org.yaml.snakeyaml.nodes.Tag;
|
import org.yaml.snakeyaml.nodes.Tag;
|
||||||
@@ -50,7 +50,7 @@ public class YamlBase64Test extends TestCase {
|
@@ -50,7 +50,7 @@
|
||||||
all = all + lines[i].trim();
|
all = all + lines[i].trim();
|
||||||
}
|
}
|
||||||
// System.out.println(all);
|
// System.out.println(all);
|
||||||
@ -515,7 +515,7 @@ index e425f25..a0c4f6a 100644
|
|||||||
assertEquals(3737, decoded.length);
|
assertEquals(3737, decoded.length);
|
||||||
checkBytes(decoded);
|
checkBytes(decoded);
|
||||||
}
|
}
|
||||||
@@ -122,7 +122,7 @@ public class YamlBase64Test extends TestCase {
|
@@ -122,7 +122,7 @@
|
||||||
public Object construct(Node node) {
|
public Object construct(Node node) {
|
||||||
String contentWithNewLines = constructScalar((ScalarNode) node).toString();
|
String contentWithNewLines = constructScalar((ScalarNode) node).toString();
|
||||||
String noNewLines = contentWithNewLines.replaceAll("\\s", "");
|
String noNewLines = contentWithNewLines.replaceAll("\\s", "");
|
||||||
|
@ -1,61 +0,0 @@
|
|||||||
diff --git a/src/test/java/org/yaml/snakeyaml/error/WrappedExceptionsTest.java b/src/test/java/org/yaml/snakeyaml/error/WrappedExceptionsTest.java
|
|
||||||
index f8b72a1..7ed8328 100644
|
|
||||||
--- a/src/test/java/org/yaml/snakeyaml/error/WrappedExceptionsTest.java
|
|
||||||
+++ b/src/test/java/org/yaml/snakeyaml/error/WrappedExceptionsTest.java
|
|
||||||
@@ -15,43 +15,32 @@
|
|
||||||
*/
|
|
||||||
package org.yaml.snakeyaml.error;
|
|
||||||
|
|
||||||
-import org.hamcrest.CoreMatchers;
|
|
||||||
-import org.junit.Before;
|
|
||||||
-import org.junit.Rule;
|
|
||||||
import org.junit.Test;
|
|
||||||
-import org.junit.rules.ExpectedException;
|
|
||||||
import org.yaml.snakeyaml.LoaderOptions;
|
|
||||||
import org.yaml.snakeyaml.Yaml;
|
|
||||||
|
|
||||||
+import static org.junit.Assert.assertEquals;
|
|
||||||
+import static org.junit.Assert.fail;
|
|
||||||
+
|
|
||||||
public class WrappedExceptionsTest {
|
|
||||||
|
|
||||||
private static final String INVALID_YAML = "!!seq abc";
|
|
||||||
|
|
||||||
- @Rule
|
|
||||||
- public final ExpectedException expectedException = ExpectedException.none();
|
|
||||||
-
|
|
||||||
- @Before
|
|
||||||
- public void configureExpectedExceptions() {
|
|
||||||
- expectedException.expectMessage("org.yaml.snakeyaml.nodes.ScalarNode");
|
|
||||||
- expectedException.expectMessage("org.yaml.snakeyaml.nodes.SequenceNode");
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
@Test
|
|
||||||
public void testWrapped() {
|
|
||||||
- expectedException.expect(YAMLException.class);
|
|
||||||
- expectedException
|
|
||||||
- .expectCause(CoreMatchers.<Throwable> instanceOf(ClassCastException.class));
|
|
||||||
-
|
|
||||||
- LoaderOptions options = new LoaderOptions();
|
|
||||||
- options.setWrappedToRootException(true);
|
|
||||||
- Yaml yaml = new Yaml(options);
|
|
||||||
- yaml.load(INVALID_YAML);
|
|
||||||
+ try {
|
|
||||||
+ LoaderOptions options = new LoaderOptions();
|
|
||||||
+ options.setWrappedToRootException(true);
|
|
||||||
+ Yaml yaml = new Yaml(options);
|
|
||||||
+ yaml.load(INVALID_YAML);
|
|
||||||
+ fail();
|
|
||||||
+ } catch (YAMLException e) {
|
|
||||||
+ assertEquals(ClassCastException.class, e.getCause().getClass());
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
- @Test
|
|
||||||
+ @Test(expected = ClassCastException.class)
|
|
||||||
public void testUnWrapped() {
|
|
||||||
- expectedException.expect(ClassCastException.class);
|
|
||||||
-
|
|
||||||
LoaderOptions options = new LoaderOptions();
|
|
||||||
options.setWrappedToRootException(false);
|
|
||||||
Yaml yaml = new Yaml(options);
|
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:5ca1b968b939eab9bd338183fded8d0d540e94b211fa9cf759c6312f195303ba
|
|
||||||
size 332303
|
|
3
snakeyaml-1.28.tar.bz2
Normal file
3
snakeyaml-1.28.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:6a8c452c7274223d284ec28d3a16715c4741a7efed2a888cce080ef9b7ee6df8
|
||||||
|
size 300779
|
@ -12,10 +12,10 @@
|
|||||||
<property name="project.description" value="YAML 1.1 parser and emitter for Java"/>
|
<property name="project.description" value="YAML 1.1 parser and emitter for Java"/>
|
||||||
<property name="project.groupId" value="org.yaml"/>
|
<property name="project.groupId" value="org.yaml"/>
|
||||||
<property name="project.artifactId" value="snakeyaml"/>
|
<property name="project.artifactId" value="snakeyaml"/>
|
||||||
<property name="project.version" value="1.25"/>
|
<property name="project.version" value="1.28"/>
|
||||||
<property name="bundle.version" value="${project.version}.0"/>
|
<property name="bundle.version" value="${project.version}.0"/>
|
||||||
|
|
||||||
<property name="compiler.source" value="1.6"/>
|
<property name="compiler.source" value="1.7"/>
|
||||||
<property name="compiler.target" value="${compiler.source}"/>
|
<property name="compiler.target" value="${compiler.source}"/>
|
||||||
|
|
||||||
<property name="build.finalName" value="${project.artifactId}-${project.version}"/>
|
<property name="build.finalName" value="${project.artifactId}-${project.version}"/>
|
||||||
@ -186,6 +186,7 @@
|
|||||||
packagenames="*"
|
packagenames="*"
|
||||||
destdir="${reporting.outputDirectory}/apidocs"
|
destdir="${reporting.outputDirectory}/apidocs"
|
||||||
access="protected"
|
access="protected"
|
||||||
|
encoding="UTF-8"
|
||||||
source="${compiler.source}"
|
source="${compiler.source}"
|
||||||
verbose="false"
|
verbose="false"
|
||||||
version="true"
|
version="true"
|
||||||
@ -199,7 +200,7 @@
|
|||||||
nohelp="false"
|
nohelp="false"
|
||||||
nonavbar="false"
|
nonavbar="false"
|
||||||
serialwarn="false"
|
serialwarn="false"
|
||||||
charset="ISO-8859-1"
|
charset="UTF-8"
|
||||||
linksource="false"
|
linksource="false"
|
||||||
breakiterator="false">
|
breakiterator="false">
|
||||||
<classpath refid="build.classpath"/>
|
<classpath refid="build.classpath"/>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package snakeyaml
|
# spec file for package snakeyaml
|
||||||
#
|
#
|
||||||
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
# Copyright (c) 2021 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -16,10 +16,10 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%global vertag 8450addf3473
|
%global vertag b28f0b4d87c6
|
||||||
%bcond_with tests
|
%bcond_with tests
|
||||||
Name: snakeyaml
|
Name: snakeyaml
|
||||||
Version: 1.25
|
Version: 1.28
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: YAML parser and emitter for the Java programming language
|
Summary: YAML parser and emitter for the Java programming language
|
||||||
License: Apache-2.0
|
License: Apache-2.0
|
||||||
@ -36,9 +36,6 @@ Source1: %{name}-build.xml
|
|||||||
Patch0: 0001-replace-bundled-base64coder-with-java.util.Base64.patch
|
Patch0: 0001-replace-bundled-base64coder-with-java.util.Base64.patch
|
||||||
# We don't have gdata-java, use commons-codec instead
|
# We don't have gdata-java, use commons-codec instead
|
||||||
Patch1: 0002-Replace-bundled-gdata-java-client-classes-with-commo.patch
|
Patch1: 0002-Replace-bundled-gdata-java-client-classes-with-commo.patch
|
||||||
# Fix a broken test, change backported from upstream:
|
|
||||||
# https://bitbucket.org/asomov/snakeyaml/commits/345408c
|
|
||||||
Patch2: 0003-fix-broken-test.patch
|
|
||||||
BuildRequires: ant
|
BuildRequires: ant
|
||||||
BuildRequires: apache-commons-codec
|
BuildRequires: apache-commons-codec
|
||||||
BuildRequires: base64coder
|
BuildRequires: base64coder
|
||||||
@ -84,7 +81,6 @@ This package contains %{summary}.
|
|||||||
cp %{SOURCE1} build.xml
|
cp %{SOURCE1} build.xml
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%patch2 -p1
|
|
||||||
|
|
||||||
%pom_remove_plugin :cobertura-maven-plugin
|
%pom_remove_plugin :cobertura-maven-plugin
|
||||||
%pom_remove_plugin :maven-changes-plugin
|
%pom_remove_plugin :maven-changes-plugin
|
||||||
@ -108,9 +104,6 @@ rm src/test/java/org/yaml/snakeyaml/issues/issue318/ContextClassLoaderTest.java
|
|||||||
# convert CR+LF to LF
|
# convert CR+LF to LF
|
||||||
sed -i 's/\r//g' LICENSE.txt
|
sed -i 's/\r//g' LICENSE.txt
|
||||||
|
|
||||||
%pom_remove_dep org.springframework
|
|
||||||
rm -r src/test/java/org/yaml/snakeyaml/issues/issue9
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
mkdir -p lib
|
mkdir -p lib
|
||||||
build-jar-repository -s lib base64coder commons-codec
|
build-jar-repository -s lib base64coder commons-codec
|
||||||
|
Loading…
x
Reference in New Issue
Block a user