Skip to content

[flagd-provider] package-private interface prevents resolverType option usage with Kotlin #1013

@detached

Description

@detached

The EvaluatorType in flagd-providers Config.java is package private.

A bug in Kotlin prevents the usage of the public enum Config.Resolver as it implements the package private interface: https://youtrack.jetbrains.com/issue/KT-11700

Due to this bug the code

    fun getFlagdProvider(): FlagdProvider = FlagdProvider(
        FlagdOptions.builder()
            .resolverType(Config.Resolver.IN_PROCESS)
            .build()
    )

throws an IllegalAccessError at runtime with the cause

Caused by: java.lang.IllegalAccessError: failed to access class dev.openfeature.contrib.providers.flagd.Config$EvaluatorType from class x.y.z.MyClass (dev.openfeature.contrib.providers.flagd.Config$EvaluatorType and x.y.z.MyClass are in unnamed module of loader 'app')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions