Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-34402

Class loading conflicts when using PowerMock in ITcase.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Bug
    • 1.19.0
    • None
    • Runtime / Coordination
    • None

    Description

      Currently when no user jars exist, system classLoader will be used to load classes as default. However, if we use powerMock to create some ITCases, the framework will utilize JavassistMockClassLoader to load classes.  Forcing the use of the system classLoader can lead to class loading conflict issue.

      Therefore we should use Thread.currentThread().getContextClassLoader() instead of 
      ClassLoader.getSystemClassLoader() here.

      Attachments

        Activity

          People

            nilerzhou yisha zhou
            nilerzhou yisha zhou
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: