Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-8033 JDK 9 support
  3. FLINK-11122

SafetyNetCloseableRegistryTest fails with ClassCastException

    XMLWordPrintableJSON

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.8.0
    • Component/s: Tests

      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

            Activity

              People

              • Assignee:
                gjy Gary Yao
                Reporter:
                gjy Gary Yao
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: