Skip to content

Support Java 25 without warnings #2992

Description

@atennapel

We have an application that uses various Scala dependencies, including sttp. When we run with Java 25 we get the following warning:

WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
WARNING: sun.misc.Unsafe::objectFieldOffset has been called by scala.runtime.LazyVals$

I believe this is causes by the dependencies being compiled with a version of Scala before 3.8 and not using the flag -Yfuture-lazy-vals.

Sttp seems to use Scala 3.3.8 (so not 3.8+) and does not use -Yfuture-lazy-vals, and also uses lazy val, so using this dependency will also cause the above warnings.

Can there be a version of Sttp released using Scala 3.8+ and/or using -Yfuture-lazy-vals, so that this warning can be fixed?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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