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

SafetyNetCloseableRegistryTest fails with ClassCastException

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.8.0
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: