From d3833f355f297e14cfb1ee6efc9106b5c084ec2c Mon Sep 17 00:00:00 2001 From: dilanSachi Date: Tue, 5 Dec 2023 09:56:25 +0530 Subject: [PATCH] Remove redundant split --- .../main/java/io/ballerina/stdlib/http/api/HttpDispatcher.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/native/src/main/java/io/ballerina/stdlib/http/api/HttpDispatcher.java b/native/src/main/java/io/ballerina/stdlib/http/api/HttpDispatcher.java index fb2df985ea..dba6f94b81 100644 --- a/native/src/main/java/io/ballerina/stdlib/http/api/HttpDispatcher.java +++ b/native/src/main/java/io/ballerina/stdlib/http/api/HttpDispatcher.java @@ -494,7 +494,6 @@ public void notifyFailure(BError bError) { if (splitValues.length != 2) { return null; } - String jwtValue = authHeader.split(WHITESPACE)[1]; runtime.invokeMethodAsyncSequentially( ValueCreator.createObjectValue(ModuleUtils.getHttpPackage(), JWT_DECODER_CLASS_NAME), JWT_DECODE_METHOD_NAME, @@ -503,7 +502,7 @@ public void notifyFailure(BError bError) { decodeCallback, null, PredefinedTypes.TYPE_ANY, - StringUtils.fromString(jwtValue), + StringUtils.fromString(splitValues[1]), true); try { countDownLatch.await();