I've had similar problems with my own Maven-based application. It's probably 
related to the Compile-on-Save functionality.

Sometimes it helps going to the _referenced_ file whose import is failing, 
making a small change (e.g. inserting a space), and saving the file again. For 
example, in the example screenshot, I'd open "ApiPlatformCustomException.java" 
and save it again. This would usually cause the error on APIController to go 
away. Sometimes I need to do this for several files. It's easier than deleting 
the cache directory... but obviously only a workaround to some underlying bug.

Another question: do you by any chance have any Enum classes with annotations 
(e.g. "public MyEnum (@Nullable someArgument) { ... }") in their constructors 
somewhere? There's a related bug in javac that I'm investigating as a possible 
source of some of these errors. (This caused a similar bug in Eclipse, see 
https://bugs.eclipse.org/bugs/show_bug.cgi?id=388314 )

-- Eirik


From: Greenberg, Gary <ggree...@visa.com>
Sent: Saturday, August 10, 2019 7:38 PM
To: NetBeans Mailing List <users@netbeans.apache.org>
Subject: RE: Error badge on successfully build project

You are right. Removing the cache did help.

Thank you.
Gary Greenberg
Staff Software Engineer
Data Product Development, BI-A
E: ggree...@visa.com
M: 650-269-7902

[EmailSig-TaglineVersion]

From: Boris Heithecker <boris.heithec...@gmx.net>
Sent: Saturday, August 10, 2019 1:11 PM
To: NetBeans Mailing List <users@netbeans.apache.org>
Cc: Greenberg, Gary <ggree...@visa.com>
Subject: Re: Error badge on successfully build project

I'm encountering it too, at times. It seems to be related to the caching 
mechanism. If you clear the cache (delete the cache directory) the false error 
marks are gone.
Boris

On Fri, 9 Aug 2019 at 20:28, John Mc 
<mcdonnell.j...@gmail.com<mailto:mcdonnell.j...@gmail.com>> wrote:
What does it say when you hover over it?

Regards

John

On Fri 9 Aug 2019, 19:18 Greenberg, Gary, 
<ggree...@visa.com<mailto:ggree...@visa.com>> wrote:
I have a project, where one Java class has import statement marked with the 
error badge.
At the same time project compiles successfully. Snip is attached.
Can anyone explain it to me?

Gary Greenberg
Staff Software Engineer
Data Product Development, BI-A
E: ggree...@visa.com<mailto:ggree...@visa.com>
M: 650-269-7902





--
Boris Heithecker
Dr. Boris Heithecker
Lüneburger Str. 30
28870 Ottersberg
Festnetz: +49 4205 315834
Mobil: +49 170 6137015

Reply via email to