diff --git a/components/org.wso2.transport.http.netty/src/main/java/org/wso2/transport/http/netty/contract/config/ConfigurationBuilder.java b/components/org.wso2.transport.http.netty/src/main/java/org/wso2/transport/http/netty/contract/config/ConfigurationBuilder.java
index 03ec22f1f..6da39fd44 100644
--- a/components/org.wso2.transport.http.netty/src/main/java/org/wso2/transport/http/netty/contract/config/ConfigurationBuilder.java
+++ b/components/org.wso2.transport.http.netty/src/main/java/org/wso2/transport/http/netty/contract/config/ConfigurationBuilder.java
@@ -17,6 +17,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.yaml.snakeyaml.LoaderOptions;
import org.yaml.snakeyaml.Yaml;
import org.yaml.snakeyaml.constructor.CustomClassLoaderConstructor;
import org.yaml.snakeyaml.introspector.BeanAccess;
@@ -80,7 +81,8 @@ public TransportsConfiguration getConfiguration(String configFileLocation) {
if (file.exists()) {
try (Reader in = new InputStreamReader(new FileInputStream(file), StandardCharsets.ISO_8859_1)) {
Yaml yaml = new Yaml(new CustomClassLoaderConstructor
- (TransportsConfiguration.class, TransportsConfiguration.class.getClassLoader()));
+ (TransportsConfiguration.class, TransportsConfiguration.class.getClassLoader(),
+ new LoaderOptions()));
yaml.setBeanAccess(BeanAccess.FIELD);
transportsConfiguration = yaml.loadAs(in, TransportsConfiguration.class);
} catch (IOException e) {
diff --git a/components/org.wso2.transport.http.netty/src/test/java/org/wso2/transport/http/netty/util/TestUtil.java b/components/org.wso2.transport.http.netty/src/test/java/org/wso2/transport/http/netty/util/TestUtil.java
index d90f2ca5e..67ad148c9 100644
--- a/components/org.wso2.transport.http.netty/src/test/java/org/wso2/transport/http/netty/util/TestUtil.java
+++ b/components/org.wso2.transport.http.netty/src/test/java/org/wso2/transport/http/netty/util/TestUtil.java
@@ -43,6 +43,7 @@
import org.wso2.transport.http.netty.util.server.HttpServer;
import org.wso2.transport.http.netty.util.server.HttpsServer;
import org.wso2.transport.http.netty.util.server.ServerThread;
+import org.yaml.snakeyaml.LoaderOptions;
import org.yaml.snakeyaml.Yaml;
import org.yaml.snakeyaml.constructor.CustomClassLoaderConstructor;
import org.yaml.snakeyaml.introspector.BeanAccess;
@@ -221,7 +222,7 @@ public static TransportsConfiguration getConfiguration(String configFileLocation
try (Reader in = new InputStreamReader(new FileInputStream(file), StandardCharsets.ISO_8859_1)) {
Yaml yaml = new Yaml(new CustomClassLoaderConstructor
(TransportsConfiguration.class,
- TransportsConfiguration.class.getClassLoader()));
+ TransportsConfiguration.class.getClassLoader(), new LoaderOptions()));
yaml.setBeanAccess(BeanAccess.FIELD);
transportsConfiguration = yaml.loadAs(in, TransportsConfiguration.class);
} catch (IOException e) {
diff --git a/pom.xml b/pom.xml
index 6adfe62ef..6ec7d2852 100644
--- a/pom.xml
+++ b/pom.xml
@@ -20,7 +20,7 @@
org.wso2
wso2
- 5
+ 5.1
pom
org.wso2.transport.http