Skip to content

Commit a766113

Browse files
labianchinkrmahadevan
authored andcommitted
1 parent 46d8180 commit a766113

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

testng-core/src/main/java/org/testng/internal/Yaml.java

+4-3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import org.testng.xml.XmlScript;
1616
import org.testng.xml.XmlSuite;
1717
import org.testng.xml.XmlTest;
18+
import org.yaml.snakeyaml.LoaderOptions;
1819
import org.yaml.snakeyaml.TypeDescription;
1920
import org.yaml.snakeyaml.constructor.Constructor;
2021
import org.yaml.snakeyaml.nodes.MappingNode;
@@ -30,7 +31,7 @@ private Yaml() {}
3031

3132
public static XmlSuite parse(String filePath, InputStream is, boolean loadClasses)
3233
throws FileNotFoundException {
33-
Constructor constructor = new TestNGConstructor(XmlSuite.class);
34+
Constructor constructor = new TestNGConstructor(XmlSuite.class, new LoaderOptions());
3435
{
3536
TypeDescription suiteDescription = new TypeDescription(XmlSuite.class);
3637
suiteDescription.addPropertyParameters("packages", XmlPackage.class);
@@ -301,8 +302,8 @@ private static void toYaml(StringBuilder sb, String sp, Map<String, String> para
301302

302303
private static class TestNGConstructor extends Constructor {
303304

304-
public TestNGConstructor(Class<?> theRoot) {
305-
super(theRoot);
305+
public TestNGConstructor(Class<?> theRoot, LoaderOptions loadingConfig) {
306+
super(theRoot, loadingConfig);
306307
yamlClassConstructors.put(NodeId.scalar, new ConstructParallelMode());
307308
yamlClassConstructors.put(NodeId.mapping, new ConstructXmlScript());
308309
}

versions.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ version.org.webjars..jquery=3.6.1
128128

129129
version.org.xmlunit..xmlunit-assertj=2.9.0
130130

131-
version.org.yaml..snakeyaml=1.33
131+
version.org.yaml..snakeyaml=2.0
132132

133133
version.org.slf4j..slf4j-simple=1.7.36
134134
## # available=1.8.0-alpha0

0 commit comments

Comments
 (0)