Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to suppress the "The type (...) collides with a package" warning in Eclipse?

Tags:

java

eclipse

This question is closely related to java-class-name-same-as-the-nested-package-name. My specific question here is: How can I disable/suppress that warning in Eclipse?

Some remarks:

  • I cannot change the code, it's a pattern widely used by Jenkins.
  • It seems the Java Language Specification (JLS) allows it - anyway javac doesn't mark it as error.
  • The reason for the warning is that a class and a resource folder have the same name (I am not sure if a resource folder establishes a package according to JLS).
  • I want to get that warning away because it hides other warnings.
like image 840
Gustave Avatar asked Aug 07 '15 07:08

Gustave


1 Answers

Unfortunately it's not currently possible to disable that warning in Eclipse. There is an open feature request to make it possible, however it has had no action since 2012.

like image 162
Boann Avatar answered Oct 06 '22 00:10

Boann