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

CCException when return type of createInterceptors function is an array type #4649

Closed
dilanSachi opened this issue Jul 10, 2023 · 0 comments
Closed
Assignees
Labels
module/http Reason/EngineeringMistake The issue occurred due to a mistake made in the past. Team/PCM Protocol connector packages related issues Type/Bug

Comments

@dilanSachi
Copy link
Contributor

Description:
Refer the following sample.

listener http:Listener interceptorListener = new (9090);

service http:InterceptableService / on interceptorListener {

    public function createInterceptors() returns http:Interceptor[] {
        return [new RequestInterceptor()];
    }
    resource function get albums() returns Album[] {
        return albums.toArray();
    }
}

This results with,

error: interceptor service registration failed: class io.ballerina.runtime.internal.types.BNullType cannot be cast to class io.ballerina.runtime.api.types.ObjectType (io.ballerina.runtime.internal.types.BNullType and io.ballerina.runtime.api.types.ObjectType are in unnamed module of loader 'app')
@dilanSachi dilanSachi added Type/Bug module/http Team/PCM Protocol connector packages related issues labels Jul 10, 2023
@dilanSachi dilanSachi self-assigned this Jul 12, 2023
@dilanSachi dilanSachi added Reason/MultipleComponentInteraction Issue occured due to interactions in multiple components. Reason/EngineeringMistake The issue occurred due to a mistake made in the past. and removed Reason/MultipleComponentInteraction Issue occured due to interactions in multiple components. labels Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module/http Reason/EngineeringMistake The issue occurred due to a mistake made in the past. Team/PCM Protocol connector packages related issues Type/Bug
Projects
Archived in project
Development

No branches or pull requests

1 participant