<!-- 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.

}
        @Override
        public InputStream openInputStream() {
            return new ByteArrayInputStream(getByteCode());
        }
        @Override
        public OutputStream openOutputStream() {
            return bytecode = new ByteArrayOutputStream();
        }
        public byte[] getByteCode() {
            return bytecode.toByteArray();
        }
    }
    private static final class JavaFileManagerImpl extends ForwardingJavaFileManager<JavaFileManager> {
        private final ClassLoaderImpl classLoader;
        private final Map<URI, JavaFileObject> fileObjects = new HashMap<URI, JavaFileObject>();
        public JavaFileManagerImpl(JavaFileManager fileManager, ClassLoaderImpl classLoader) {
            super(fileManager);
            this.classLoader = classLoader;
        }
        @Override
        public FileObject getFileForInput(Location location, String packageName, String relativeName) throws IOException {
            FileObject o = fileObjects.get(uri(location, packageName, relativeName));
            if (o != null) {
                return o;
            }
            return super.getFileForInput(location, packageName, relativeName);
        }
        public void putFileForInput(StandardLocation location, String packageName, String relativeName, JavaFileObject file) {
            fileObjects.put(uri(location, packageName, relativeName), file);