<!-- If you need to report a security issue please visit https://github.com/apache/dubbo/security/policy -->

- [x] I have searched the [issues](https://github.com/apache/dubbo/issues) of this repository and believe that this is not a duplicate.

### Environment

* Dubbo version: migrating from 3.0.5 to 3.0.6

### Steps to reproduce this issue

https://github.com/XenoAmess/metasploit-java-external-module/runs/5522599197?check_suite_focus=true

https://github.com/XenoAmess/metasploit-java-external-module/pull/65

### Expected Behavior

DO NOT DELETE EXISTED API WITHIN SAME MAJOR VERSION

PLEASE JUST FOLLOW SEMVER

### Actual Behavior

compile failure.

private final JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
    private final DiagnosticCollector<JavaFileObject> diagnosticCollector = new DiagnosticCollector<JavaFileObject>();
    private final ClassLoaderImpl classLoader;
    private final JavaFileManagerImpl javaFileManager;
    private final List<String> options;
    private static final String DEFAULT_JAVA_VERSION = "1.8";
    private static List<String> buildDefaultOptions(String javaVersion) {
        return Arrays.asList(
                "-source", javaVersion, "-target", javaVersion
        );
    }
    private static List<String> buildDefaultOptions() {
        return buildDefaultOptions(DEFAULT_JAVA_VERSION);
    }
    public JdkCompiler(List<String> options) {
        this.options = new ArrayList<>(options);
        StandardJavaFileManager manager = compiler.getStandardFileManager(diagnosticCollector, null, null);
        final ClassLoader loader = Thread.currentThread().getContextClassLoader();
        if (loader instanceof URLClassLoader
                && (!"sun.misc.Launcher$AppClassLoader".equals(loader.getClass().getName()))) {
            try {