Uploaded image for project: 'Sqoop'
  1. Sqoop
  2. SQOOP-2120

Sqoop2: Test classes using powermock fails badly when compiling with java target version 1.7

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.99.5
    • Fix Version/s: 1.99.6
    • Component/s: None
    • Labels:
      None

      Description

      I've tried to change bytecode target version to 1.7 and found out that test classes using Powermock are failing quite badly with JDK error:

      Bad <init> method call from inside of a branch
      

      Doing a bit of googling turned out that this is a known problem where powermock is doing something fancy that is no longer supported in JDK7.

      Recommendation on those sites is to either use -noverify JVM flag or force usage of the old verifier by specifying -XX:-UseSplitVerifier. I feel that the later is a better option, so I would propose to do that.

        Attachments

        1. SQOOP-2120.patch
          0.7 kB
          Jarek Jarcec Cecho

          Activity

            People

            • Assignee:
              jarcec Jarek Jarcec Cecho
              Reporter:
              jarcec Jarek Jarcec Cecho
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: