This is an automated email from the ASF dual-hosted git repository.

shoothzj pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/servicecomb-java-chassis.git


The following commit(s) were added to refs/heads/master by this push:
     new 16f9296ca Bump snakeyaml from 1.3 to 2.2 (#4073)
16f9296ca is described below

commit 16f9296ca72eaf8d871b57986a4f1fcfb228de48
Author: pengxiangrui127 <[email protected]>
AuthorDate: Sat Dec 2 10:56:07 2023 +0800

    Bump snakeyaml from 1.3 to 2.2 (#4073)
---
 dependencies/default/pom.xml                                |  2 +-
 .../java/org/apache/servicecomb/config/TestYAMLUtil.java    | 13 -------------
 2 files changed, 1 insertion(+), 14 deletions(-)

diff --git a/dependencies/default/pom.xml b/dependencies/default/pom.xml
index 67cdfbfbd..c996ac835 100644
--- a/dependencies/default/pom.xml
+++ b/dependencies/default/pom.xml
@@ -88,7 +88,7 @@
     <servo.version>0.13.2</servo.version>
     <servlet-api.version>6.0.0</servlet-api.version>
     <slf4j.version>1.7.36</slf4j.version>
-    <snakeyaml.version>1.33</snakeyaml.version>
+    <snakeyaml.version>2.2</snakeyaml.version>
     <spring.version>6.0.9</spring.version>
     <spring-boot.version>3.0.7</spring-boot.version>
     <swagger.version>2.2.19</swagger.version>
diff --git 
a/foundations/foundation-config/src/test/java/org/apache/servicecomb/config/TestYAMLUtil.java
 
b/foundations/foundation-config/src/test/java/org/apache/servicecomb/config/TestYAMLUtil.java
index 6694ace86..4abafe876 100644
--- 
a/foundations/foundation-config/src/test/java/org/apache/servicecomb/config/TestYAMLUtil.java
+++ 
b/foundations/foundation-config/src/test/java/org/apache/servicecomb/config/TestYAMLUtil.java
@@ -51,19 +51,6 @@ public class TestYAMLUtil {
   public void testSafeParser() {
     Person person = YAMLUtil.parserObject("name: hello", Person.class);
     Assertions.assertEquals("hello", person.getName());
-
-    person = 
YAMLUtil.parserObject("!!org.apache.servicecomb.config.TestYAMLUtil$Person\n"
-        + "name: hello", Person.class);
-    Assertions.assertEquals("hello", person.getName());
-
-    person = 
YAMLUtil.parserObject("!!org.apache.servicecomb.config.TestYAMLUtil$UnsafePerson\n"
-        + "name: hello", Person.class);
-    Assertions.assertEquals("hello", person.getName());
-
-    // using Object.class is not safe, do not used in product code.
-    Object object = 
YAMLUtil.parserObject("!!org.apache.servicecomb.config.TestYAMLUtil$UnsafePerson\n"
-        + "name: hello", Object.class);
-    Assertions.assertEquals("hello", ((UnsafePerson) object).getName());
   }
 
   @Test

Reply via email to