A terminally deprecated method in sun.misc.Unsafe has been called

Open
#2,808 2 comments 8 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
java

Research direction

Reproduce the warning with JDK 25 and inspect the com.diffplug.spotless.java.ModuleHelper path in spotless-lib 4.1.0, using the Maven Spotless apply output as the starting point. Done means the terminal deprecation warning is no longer emitted while formatting still completes successfully.

Written by the indexing model from the issue text.

Description

With JDK 25 we have:

[INFO] --- spotless:3.1.0:apply (default) @ ...
[INFO] Index file does not exist. Fallback to an empty index
WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
WARNING: sun.misc.Unsafe::staticFieldBase has been called by com.diffplug.spotless.java.ModuleHelper (file:/../.m2/repository/com/diffplug/spotless/spotless-lib/4.1.0/spotless-lib-4.1.0.jar)
WARNING: Please consider reporting this to the maintainers of class com.diffplug.spotless.java.ModuleHelper
WARNING: sun.misc.Unsafe::staticFieldBase will be removed in a future release
Dominant language
Java
Stars
5.7k
Forks
560
Avg merge
1d 13h
Merged PRs (30d)
43

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from diffplug/spotless

All issues in diffplug/spotless

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.