Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove creating metadata if it is a extern function #2227

Merged
merged 3 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
package io.ballerina.stdlib.http.api;

import io.ballerina.runtime.api.Runtime;
import io.ballerina.runtime.api.concurrent.StrandMetadata;
import io.ballerina.runtime.api.creators.TypeCreator;
import io.ballerina.runtime.api.creators.ValueCreator;
import io.ballerina.runtime.api.flags.SymbolFlags;
Expand Down Expand Up @@ -494,8 +493,7 @@ public static void populateInterceptorServicesRegistries(List<HTTPInterceptorSer
if (includesInterceptableService) {
final Object[] createdInterceptors = new Object[1];
try {
Object response = runtime.callMethod(service.getBalService(), CREATE_INTERCEPTORS_FUNCTION_NAME,
new StrandMetadata(true, null));
Object response = runtime.callMethod(service.getBalService(), CREATE_INTERCEPTORS_FUNCTION_NAME, null);
if (response instanceof BError) {
log.error("Error occurred while creating interceptors", response);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import io.ballerina.runtime.api.Environment;
import io.ballerina.runtime.api.Module;
import io.ballerina.runtime.api.Runtime;
import io.ballerina.runtime.api.concurrent.StrandMetadata;
import io.ballerina.runtime.api.creators.ErrorCreator;
import io.ballerina.runtime.api.creators.ValueCreator;
import io.ballerina.runtime.api.types.Field;
Expand Down Expand Up @@ -1645,8 +1644,7 @@ public static void populateInterceptorServicesFromService(BObject serviceEndpoin
public static void populateInterceptorServicesFromListener(BObject serviceEndpoint, Runtime runtime) {
final BArray[] interceptorResponse = new BArray[1];
try {
Object result = runtime.callMethod(serviceEndpoint, CREATE_INTERCEPTORS_FUNCTION_NAME,
new StrandMetadata(false, null));
Object result = runtime.callMethod(serviceEndpoint, CREATE_INTERCEPTORS_FUNCTION_NAME, null);
if (result instanceof BArray) {
interceptorResponse[0] = (BArray) result;
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@

import io.ballerina.runtime.api.Environment;
import io.ballerina.runtime.api.Runtime;
import io.ballerina.runtime.api.concurrent.StrandMetadata;
import io.ballerina.runtime.api.types.ObjectType;
import io.ballerina.runtime.api.utils.TypeUtils;
import io.ballerina.runtime.api.values.BError;
import io.ballerina.runtime.api.values.BObject;
import io.ballerina.runtime.observability.ObserveUtils;
Expand Down Expand Up @@ -265,10 +262,7 @@ private static void startInterceptResponseMethod(HttpCarbonMessage inboundMessag
String methodName = service.getServiceType().equals(HttpConstants.RESPONSE_ERROR_INTERCEPTOR)
? HttpConstants.INTERCEPT_RESPONSE_ERROR : HttpConstants.INTERCEPT_RESPONSE;
try {
ObjectType serviceType = (ObjectType) TypeUtils.getReferredType(TypeUtils.getType(serviceObj));
Object result = runtime.callMethod(serviceObj, methodName,
new StrandMetadata(serviceType.isIsolated() && serviceType.isIsolated(methodName), null),
signatureParams);
Object result = runtime.callMethod(serviceObj, methodName, null, signatureParams);
callback.handleResult(result);
} catch (BError bError) {
callback.handlePanic(bError);
Expand Down
Loading