Upgrade to SnakeYAML 1.18 (with updated duplicate key tests)
Includes updates to Caffeine 2.4, Jetty 9.4.2, Undertow 1.4.11, RxJava 1.2.7 and Groovy 2.4.9.
This commit is contained in:
parent
6d6cf01a42
commit
6556b40c2b
12
build.gradle
12
build.gradle
|
|
@ -38,7 +38,7 @@ configure(allprojects) { project ->
|
|||
ext.aspectjVersion = "1.9.0.BETA-5"
|
||||
ext.beanvalVersion = "1.1.0.Final"
|
||||
ext.cacheApiVersion = "1.0.0"
|
||||
ext.caffeineVersion = "2.3.5"
|
||||
ext.caffeineVersion = "2.4.0"
|
||||
ext.eclipselinkVersion = "2.6.4"
|
||||
ext.ehcacheVersion = "2.10.3"
|
||||
ext.ehcachejcacheVersion = "1.0.1"
|
||||
|
|
@ -47,7 +47,7 @@ configure(allprojects) { project ->
|
|||
ext.elApiVersion = "3.0.1-b04"
|
||||
ext.fileuploadVersion = "1.3.2"
|
||||
ext.freemarkerVersion = "2.3.25-incubating"
|
||||
ext.groovyVersion = "2.4.8"
|
||||
ext.groovyVersion = "2.4.9"
|
||||
ext.gsonVersion = "2.8.0"
|
||||
ext.hamcrestVersion = "1.3"
|
||||
ext.hibernate5Version = "5.2.8.Final"
|
||||
|
|
@ -61,7 +61,7 @@ configure(allprojects) { project ->
|
|||
ext.jaxbVersion = "2.2.11"
|
||||
ext.jaxwsVersion = "2.2.11"
|
||||
ext.jcaVersion = "1.7"
|
||||
ext.jettyVersion = "9.4.1.v20170120"
|
||||
ext.jettyVersion = "9.4.2.v20170220"
|
||||
ext.jmsVersion = "2.0.1"
|
||||
ext.jodaVersion = "2.9.7"
|
||||
ext.jpaVersion = "2.1.1"
|
||||
|
|
@ -81,19 +81,19 @@ configure(allprojects) { project ->
|
|||
ext.quartzVersion = "2.2.3"
|
||||
ext.reactorVersion = "Aluminium-SR1"
|
||||
ext.romeVersion = "1.7.1"
|
||||
ext.rxjavaVersion = '1.2.6'
|
||||
ext.rxjavaVersion = '1.2.7'
|
||||
ext.rxjavaAdapterVersion = '1.2.1'
|
||||
ext.rxjava2Version = '2.0.6'
|
||||
ext.rxnettyVersion = '0.5.2'
|
||||
ext.servletVersion = "3.1.0"
|
||||
ext.slf4jVersion = "1.7.23"
|
||||
ext.snakeyamlVersion = "1.17"
|
||||
ext.snakeyamlVersion = "1.18"
|
||||
ext.snifferVersion = "1.15"
|
||||
ext.testngVersion = "6.10"
|
||||
ext.tiles3Version = "3.0.7"
|
||||
ext.tomcatVersion = "8.5.11"
|
||||
ext.tyrusVersion = "1.13.1"
|
||||
ext.undertowVersion = "1.4.10.Final"
|
||||
ext.undertowVersion = "1.4.11.Final"
|
||||
ext.websocketVersion = "1.1"
|
||||
ext.woodstoxVersion = "5.0.3"
|
||||
ext.xmlunitVersion = "2.3.0"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
@ -22,7 +22,6 @@ import java.util.LinkedHashMap;
|
|||
import java.util.Map;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.yaml.snakeyaml.parser.ParserException;
|
||||
|
||||
import org.springframework.core.io.AbstractResource;
|
||||
import org.springframework.core.io.ByteArrayResource;
|
||||
|
|
@ -113,14 +112,23 @@ public class YamlMapFactoryBeanTests {
|
|||
assertTrue(object instanceof LinkedHashMap);
|
||||
@SuppressWarnings("unchecked")
|
||||
Map<String, Object> sub = (Map<String, Object>) object;
|
||||
assertTrue(sub.containsKey("key1.key2"));
|
||||
assertEquals(1, sub.size());
|
||||
assertEquals(Integer.valueOf(3), sub.get("key1.key2"));
|
||||
}
|
||||
|
||||
@Test(expected = ParserException.class)
|
||||
@Test
|
||||
public void testDuplicateKey() throws Exception {
|
||||
this.factory.setResources(new ByteArrayResource("mymap:\n foo: bar\nmymap:\n bar: foo".getBytes()));
|
||||
this.factory.getObject().get("mymap");
|
||||
Map<String, Object> map = this.factory.getObject();
|
||||
|
||||
assertEquals(1, map.size());
|
||||
assertTrue(map.containsKey("mymap"));
|
||||
Object object = map.get("mymap");
|
||||
assertTrue(object instanceof LinkedHashMap);
|
||||
@SuppressWarnings("unchecked")
|
||||
Map<String, Object> sub = (Map<String, Object>) object;
|
||||
assertEquals(1, sub.size());
|
||||
assertEquals("foo", sub.get("bar"));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
@ -24,7 +24,6 @@ import org.junit.Rule;
|
|||
import org.junit.Test;
|
||||
import org.junit.rules.ExpectedException;
|
||||
import org.yaml.snakeyaml.Yaml;
|
||||
import org.yaml.snakeyaml.parser.ParserException;
|
||||
import org.yaml.snakeyaml.scanner.ScannerException;
|
||||
|
||||
import org.springframework.core.io.ByteArrayResource;
|
||||
|
|
@ -83,8 +82,8 @@ public class YamlPropertiesFactoryBeanTests {
|
|||
YamlPropertiesFactoryBean factory = new YamlPropertiesFactoryBean();
|
||||
factory.setResources(new ByteArrayResource(
|
||||
"foo: bar\nspam:\n foo: baz\nfoo: bucket".getBytes()));
|
||||
exception.expect(ParserException.class);
|
||||
factory.getObject();
|
||||
Properties properties = factory.getObject();
|
||||
assertThat(properties.getProperty("foo"), equalTo("bucket"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
|||
Loading…
Reference in New Issue