Skip to content

warning: unknown enum constant Status.STABLE while compiling org.junit.jupiter.api.Test using Java9  #1104

Closed
@namannigam-zz

Description

@namannigam-zz

Overview

Bug report. Using the junit-jupiter-api-5.0.0 with java version "9" (build 9+181) in IntelliJ 2017.2.5(if that might matter)

Steps to reproduce:-

  1. Add a JDK9 based module to the project.
  2. Add JUnit5 to the classpath using IntelliJ's shortcut. (lib folder) [junit-jupiter-api-5.0.0.jar]
  3. Note that it brings along the opentest4j-1.0.0.jar along with to the lib/ folder.
  4. Compile the sample project (shared just to draw a picture of the directory structure in use) using the command
    javac --module-path lib -d "target" $(find src -name "*.java")

Results into warnings post the compilation of the classes as -

warning: unknown enum constant Status.STABLE
reason: class file for org.apiguardian.api.API$Status not found
warning: unknown enum constant Status.STABLE
2 warnings

Deliverables

  • Ensure that such warnings are not displayed out of the box.

On a side note, it would be good to know what exactly is causing these warnings to occur. Since, if I comment out the code using JUnit and execute the same command, things seems to be working fine.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions