Details
-
Sub-task
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
Description
When compiling and running SafetyNetCloseableRegistryTest with Java 9, some tests fail with a ClassCastException
java.lang.AssertionError: java.lang.ClassCastException: org.apache.flink.core.fs.local.LocalDataOutputStream cannot be cast to org.apache.flink.core.fs.WrappingProxyCloseable at org.apache.flink.core.fs.SafetyNetCloseableRegistry$PhantomDelegatingCloseableRef.<init>(SafetyNetCloseableRegistry.java:156) at org.apache.flink.core.fs.SafetyNetCloseableRegistry.doRegister(SafetyNetCloseableRegistry.java:99) at org.apache.flink.core.fs.SafetyNetCloseableRegistry.doRegister(SafetyNetCloseableRegistry.java:50) at org.apache.flink.util.AbstractCloseableRegistry.registerCloseable(AbstractCloseableRegistry.java:79) at org.apache.flink.core.fs.ClosingFSDataOutputStream.wrapSafe(ClosingFSDataOutputStream.java:101) at org.apache.flink.core.fs.SafetyNetWrapperFileSystem.create(SafetyNetWrapperFileSystem.java:127) at org.apache.flink.core.fs.SafetyNetCloseableRegistryTest$3.go(SafetyNetCloseableRegistryTest.java:120) at org.apache.flink.core.testutils.CheckedThread.run(CheckedThread.java:74)
This is due to the problematic signature in WrappingProxyUtil#stripProxy(T), which expects a generic type T and also returns T.
Attachments
Issue Links
- links to