Skip to content

Deprecated Java-API in Bootstrapping Documentation #942

@nils-christian

Description

@nils-christian

Hi,

I noticed the usage of a deprecated Java API in the documentation.

Which documentation is missing/incorrect?

In the bootstrapping documentation you show how to initialize the engine.

final FeelEngine engine = new FeelEngine.Builder()
            .valueMapper(SpiServiceLoader.loadValueMapper())
            .functionProvider(SpiServiceLoader.loadFunctionProvider())
            .build();

The Builder class is deprecated. Instead something like the following has to be used

final FeelEngine engine = new FeelEngine( SpiServiceLoader.loadFunctionProvider( ), SpiServiceLoader.loadValueMapper( ), new FeelEngine.Configuration( false ), null );

or

final FeelEngine engine = new FeelEngine( SpiServiceLoader.loadFunctionProvider( ), SpiServiceLoader.loadValueMapper( ), FeelEngine$.MODULE$.defaultConfiguration( ), FeelEngine$.MODULE$.defaultClock( ) );

The second code is a very weird notation for a Java developer though.

Link to the documentation:

Best regards

Nils

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions