Skip to content

Java 11 support #213

@RalphSteinhagen

Description

@RalphSteinhagen

osgl-tool-1.20.0 does not seem to be supported by JDK11 (annotation/reflection issue).

Am getting e.g. the following warning and stack traces as part of the act framework's "Hello World" MVP Example which uses this framework:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.osgl.util.Unsafe (file:/home/rstein/.m2/repository/org/osgl/osgl-tool/1.20.0/osgl-tool-1.20.0.jar) to field java.lang.String.value
WARNING: Please consider reporting this to the maintainers of org.osgl.util.Unsafe
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
full stack trace

``` Exception in thread "main" java.lang.ExceptionInInitializerError at org.osgl.util.FastStr.toString(FastStr.java:584) at org.osgl.util.FastStr.toLowerCase(FastStr.java:1276) at org.osgl.util.FastStr.toLowerCase(FastStr.java:47) at org.osgl.util.StrBase.toLowerCase(StrBase.java:1551) at org.osgl.util.Keyword.init(Keyword.java:517) at org.osgl.util.Keyword.(Keyword.java:243) at org.osgl.util.Keyword.of(Keyword.java:450) at act.internal.util.AppNameInferer.classNameTokensReversed(AppNameInferer.java:84) at act.internal.util.AppNameInferer.tokenOf(AppNameInferer.java:68) at act.internal.util.AppNameInferer.from(AppNameInferer.java:43) at act.internal.util.AppDescriptor.ensureAppName(AppDescriptor.java:278) at act.internal.util.AppDescriptor.of(AppDescriptor.java:175) at act.internal.util.AppDescriptor.of(AppDescriptor.java:198) at act.internal.util.AppDescriptor.of(AppDescriptor.java:249) at act.Act.start(Act.java:676) at ch.steinhagen.act.HelloWorldApp.main(HelloWorldApp.java:17) Caused by: org.osgl.exception.UnexpectedException: java.lang.NoSuchMethodException: java.lang.String.([C, boolean) at org.osgl.util.E.unexpected(E.java:189) at org.osgl.util.Unsafe.(Unsafe.java:50) ... 16 more Caused by: java.lang.NoSuchMethodException: java.lang.String.([C, boolean) at java.base/java.lang.Class.getConstructor0(Class.java:3349) at java.base/java.lang.Class.getDeclaredConstructor(Class.java:2553) at org.osgl.util.Unsafe.(Unsafe.java:44) ... 16 more ```

Could this be added as a feature for the next version? Thanks in advance.

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