diff --git a/bvm/ballerina-runtime/src/main/java/io/ballerina/runtime/internal/StateMachine.java b/bvm/ballerina-runtime/src/main/java/io/ballerina/runtime/internal/StateMachine.java index 2babe905b4d2..c605927b1e28 100644 --- a/bvm/ballerina-runtime/src/main/java/io/ballerina/runtime/internal/StateMachine.java +++ b/bvm/ballerina-runtime/src/main/java/io/ballerina/runtime/internal/StateMachine.java @@ -18,10 +18,10 @@ package io.ballerina.runtime.internal; +import io.ballerina.identifier.Utils; import io.ballerina.runtime.api.creators.ErrorCreator; import io.ballerina.runtime.api.utils.StringUtils; import io.ballerina.runtime.api.values.BError; -import org.apache.commons.lang3.StringEscapeUtils; import java.io.IOException; import java.io.Reader; @@ -707,7 +707,7 @@ private void reset(StateMachine sm) { } private char extractUnicodeChar(StateMachine sm) { - return StringEscapeUtils.unescapeJava("\\u" + sm.hexBuilder).charAt(0); + return Utils.unescapeJava("\\u" + sm.hexBuilder).charAt(0); } } diff --git a/bvm/ballerina-runtime/src/main/java/io/ballerina/runtime/internal/launch/LaunchUtils.java b/bvm/ballerina-runtime/src/main/java/io/ballerina/runtime/internal/launch/LaunchUtils.java index 8187926a7d98..8ecd1a6d728c 100644 --- a/bvm/ballerina-runtime/src/main/java/io/ballerina/runtime/internal/launch/LaunchUtils.java +++ b/bvm/ballerina-runtime/src/main/java/io/ballerina/runtime/internal/launch/LaunchUtils.java @@ -32,7 +32,6 @@ import io.ballerina.runtime.internal.diagnostics.RuntimeDiagnosticLog; import io.ballerina.runtime.internal.troubleshoot.StrandDump; import io.ballerina.runtime.internal.util.RuntimeUtils; -import org.apache.commons.lang3.ArrayUtils; import sun.misc.Signal; import java.io.File; @@ -96,11 +95,16 @@ public static void stopListeners(boolean isService) { public static void addModuleConfigData(Map configurationData, Module m, VariableKey[] variableKeys) { - VariableKey[] keys = configurationData.put(m, variableKeys); - if (keys == null) { - return; + VariableKey[] currKeys = configurationData.get(m); + VariableKey[] mergedKeyArray; + if (currKeys == null) { + mergedKeyArray = variableKeys; + } else { + mergedKeyArray = new VariableKey[currKeys.length + variableKeys.length]; + System.arraycopy(currKeys, 0, mergedKeyArray, 0, currKeys.length); + System.arraycopy(variableKeys, 0, mergedKeyArray, currKeys.length, variableKeys.length); } - configurationData.put(m, ArrayUtils.addAll(keys, variableKeys)); + configurationData.put(m, mergedKeyArray); } public static void initConfigurableVariables(Module rootModule, Map configurationData, diff --git a/bvm/ballerina-runtime/src/main/java/module-info.java b/bvm/ballerina-runtime/src/main/java/module-info.java index 857d248a3977..f34060732a90 100644 --- a/bvm/ballerina-runtime/src/main/java/module-info.java +++ b/bvm/ballerina-runtime/src/main/java/module-info.java @@ -15,7 +15,6 @@ requires transactions.jta; requires java.transaction; requires java.naming; - requires org.apache.commons.lang3; requires io.ballerina.identifier; requires jdk.unsupported;