zrlw opened a new pull request, #15755:
URL: https://github.com/apache/dubbo/pull/15755
## What is the purpose of the change?
```sun.misc.Unsafe``` had be moved to ```jdk.unsupported``` module since
jdk9+, compile error will be encountered during compilation with jdk17+ if we
don't remove ```jdk9-compile``` pofile from current pom and use
``````sun.misc.Unsafe``` like this,
```
import sun.misc.Unsafe;
import static
org.apache.dubbo.common.constants.CommonConstants.ThirdPartyProperty.GRAALVM_NATIVEIMAGE_IMAGECODE;
public abstract class NativeDetector {
private Unsafe UNSAFE;
...
```
<img width="1439" height="200" alt="ea662096be573fa8a1eda6ec827d166c"
src="https://github.com/user-attachments/assets/6780bc14-d0fc-4971-b1bc-243d6cbd51f1"
/>
The cause:
```
When using --release to specify a release that supports the Java Platform
Module System, the --add-exports option cannot be used to enlarge the set of
packages exported by the Java SE, JDK, and standard modules in the specified
release.
```
see details at
https://docs.oracle.com/en/java/javase/25/docs/specs/man/javac.html#option-release
## Checklist
- [x] Make sure there is a
[GitHub_issue](https://github.com/apache/dubbo/issues) field for the change.
- [x] Write a pull request description that is detailed enough to understand
what the pull request does, how, and why.
- [x] Write necessary unit-test to verify your logic correction. If the new
feature or significant change is committed, please remember to add sample in
[dubbo samples](https://github.com/apache/dubbo-samples) project.
- [x] Make sure gitHub actions can pass. [Why the workflow is failing and
how to fix it?](../CONTRIBUTING.md)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]