Skip to content

Commit

Permalink
Merge pull request #669 from HindujaB/java21
Browse files Browse the repository at this point in the history
Update callMethod logic for Java 21
  • Loading branch information
warunalakshitha authored Nov 25, 2024
2 parents a2c6cf4 + 11cb709 commit 75ce28b
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

import io.ballerina.runtime.api.Environment;
import io.ballerina.runtime.api.Module;
import io.ballerina.runtime.api.concurrent.StrandMetadata;
import io.ballerina.runtime.api.creators.ValueCreator;
import io.ballerina.runtime.api.types.IntersectionType;
import io.ballerina.runtime.api.types.MethodType;
Expand Down Expand Up @@ -147,10 +146,8 @@ private static Object invokeRemoteFunction(Environment env, BObject bSubscriberS
Module module = ModuleUtils.getModule();
Object[] args = new Object[]{message};
ObjectType serviceType = (ObjectType) TypeUtils.getReferredType(TypeUtils.getType(bSubscriberService));
boolean isIsolated = serviceType.isIsolated() && serviceType.isIsolated(remoteFunctionName);
StrandMetadata metadata = new StrandMetadata(isIsolated, null);
try {
Object result = env.getRuntime().callMethod(bSubscriberService, remoteFunctionName, metadata, args);
Object result = env.getRuntime().callMethod(bSubscriberService, remoteFunctionName, null, args);
ModuleUtils.notifySuccess(balFuture, result);
return ModuleUtils.getResult(balFuture);
} catch (BError bError) {
Expand Down

0 comments on commit 75ce28b

Please sign in to comment.