Top community members
All Wiki Articles Create Wiki Article

Welcome to Dirask IT community! ❤ 💻
We are community of people that helps each other.

If you are beginner in IT field, you are more then welcome to ask questions, it will help you to learn faster. We are here to help you.

We are always beginner in something, we just need to remember it along the way.

there are no wrong questions - Ask Question

IntelliJ IDEA - java 8 error FIX - Usage of API documented as @since 1.7+ less... (Ctrl+F1)

0 contributions
6 points

1. IntelliJ IDEA - Error message:

Usage of API documented as @since 1.7+ less... (Ctrl+F1)
Inspection info: This inspection finds all usages of methods that have 
@since tag in their documentation.
This may be useful when development is performed under newer SDK version 
as the target platform for production.

2. FIX:

FIX in 4 steps:

1. Open Project Structure -> Project
-> Project SDK -> change to java / jdk 8

2. Open Project Structure -> Project
-> Project language level -> change to: "8 - Lambdas, type annotations etc."

3. Open Project Structure -> Modules
-> Language level - change to: "Lambdas, type annotations etc."

4. Open Settings -> Build, Execution, Deployment -> Compiler
-> Java Compiler -> Target bytecode version -> change to: "8"

For me it always solves the problem.

3. FIX with Screenshots


3.1. Screenshot - IntelliJ IDEA - Error message



3.2 Screenshot - IntelliJ IDEA change:
- Project SDK
- Project language level


3.3 Screenshot - IntelliJ IDEA change:
- Modules - Language level


3.4 Screenshot - IntelliJ IDEA change:
- Settings -> Java Compiler -> Target bytecode version


4. Partial fix with maven plugin

Add this plugin to pom.xml and refresh dependencies

<build>
   <plugins>
      <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-compiler-plugin</artifactId>
         <version>3.8.0</version>
         <configuration>
            <source>1.8</source>
            <target>1.8</target>
         </configuration>
      </plugin>
   </plugins>
</build>


5. This problem fix applies also to:

  • Usage of API documented as @since 1.6+ idea
  • Usage of API documented as @since 1.7+ idea
  • Usage of API documented as @since 1.8+ idea
  • Usage of API documented as @since 11+


6. This problem was seen in:

  • IntelliJ IDEA 2015.0.6
  • IntelliJ IDEA 2016.3
  • IntelliJ IDEA 2017.3
  • IntelliJ IDEA 2018.2
  • IntelliJ IDEA 2019.1.1
  • IntelliJ IDEA 2019.1.2
  • IntelliJ IDEA 2019.1.3
  • And probably others
Final thought - Java 1.8 should be configured as default.
0 contributions

Checkout latest Findings & News:

Checkout latest questions:

Checkout latest wiki articles:

Hey 👋
Would you like to know what we do?
  • Dirask is IT community, where we share coding knowledge and help each other to solve coding problems.
  • We welcome everyone,
    no matter what the experience,
    no matter how basic the question is,
    this community will help you.
Read more