Skip to content

Support Java 25 without warnings #828

Description

@atennapel

We have an application that uses various Scala dependencies, including scala-xml. 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.

Scala-xml 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 scala-xml released using Scala 3.8+ and/or using -Yfuture-lazy-vals, so that this warning can be fixed?

See scala/scala-parser-combinators#648 for a the same issue for scala-parser-combinators.

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