Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-15738

Generate compiler options file to support Java11 in IDEA.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Fix Version/s: 4.0, 4.0-beta1
    • Component/s: Build
    • Labels:
      None
    • Bug Category:
      Code
    • Severity:
      Low
    • Complexity:
      Low Hanging Fruit
    • Discovered By:
      User Report
    • Platform:
      All
    • Impacts:
      None
    • Since Version:
      4.0
    • Test and Documentation Plan:
      Hide

      To test,

      Either a clean checkout or remove the .idea directory, then under Java8 and Java11 run ant generate-idea-files then load the project and compile.

      Under Java11, check Preferences -> Build, Execution, Deployment -> Java Compiler and there should be an entry underĀ Additional command line parameters: you should see

      --add-exports java.rmi/sun.rmi.registry=ALL-UNNAMED
      

      Under Java8, no .idea/compiler.xml file should be generated.

      Show
      To test, Either a clean checkout or remove the .idea directory, then under Java8 and Java11 run ant generate-idea-files then load the project and compile. Under Java11, check Preferences -> Build, Execution, Deployment -> Java Compiler and there should be an entry underĀ  Additional command line parameters: you should see --add-exports java.rmi/sun.rmi.registry=ALL-UNNAMED Under Java8, no .idea/compiler.xml file should be generated.

      Description

      The change to JMX in CASSANDRA-15653 prevents the generated IDEA project from compiling under JDK11.

      Fix by adding options for a module (named after the checkout dir)

      <?xml version="1.0" encoding="UTF-8"?>
      <project version="4">
        <component name="JavacSettings">
          <option name="ADDITIONAL_OPTIONS_OVERRIDE">
            <module name="trunk" options="--add-exports java.rmi/sun.rmi.registry=ALL-UNNAMED" />
          </option>
        </component>
      

        Attachments

          Activity

            People

            • Assignee:
              jmeredithco Jon Meredith
              Reporter:
              jmeredithco Jon Meredith
              Authors:
              Jon Meredith
              Reviewers:
              Dinesh Joshi
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: