Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

import javax.annotation.ParametersAreNonnullByDefault fails, but why?

My import statements contain
import javax.annotation.ParametersAreNonnullByDefault;

But it fails, saying 'cannot find symbol...'

I'm using Netbeans 8.0.2, and my project uses Source format JDK8, Java platform 1.8.0.60

Typing 'javax.annotation.' doesn't show the ParametersAreNonnullByDefault in the autocompletion popup.

i'm trying to build sources from this project in Netbeans: https://github.com/fge/java7-fs-more

What should i do to make the import statement work?

like image 319
Houtman Avatar asked Sep 04 '25 16:09

Houtman


1 Answers

You may be missing JSR305 dependency. Here's an example for build.gradle:

dependencies { compileOnly 'com.google.code.findbugs:jsr305:3.0.1' }

like image 110
vic-nik Avatar answered Sep 07 '25 16:09

vic-nik