Disable all warnings on generated code. #120

lombokissues opened this Issue Jul 14, 2015 · 5 comments


None yet

1 participant


Migrated from Google Code (issue 47)


๐Ÿ‘ค reinierz ย  ๐Ÿ•— Sep 15, 2009 at 07:16 UTC

Warnings like 'missing javadoc from public method' show up. We can't very well fix all of them, so
instead we should put in some effort to disable all warnings. Possibly by 'cheating' and sticking a
@ SuppressWarnings("all") on everything generated.


๐Ÿ‘ค rgagnon934 ย  ๐Ÿ•— Sep 16, 2009 at 13:43 UTC

This is a show stopper for us, since we do not tolerate warnings in our code and are
not willing to add a @ SuppressWarnings("all") to classes that are not entirely generated.

I tried modifying Lombok's source to add the @ SuppressWarnings("all") annotation to
injected methods. However, I am not familiar with eclipse compiler development, and
the internal classes, such as
org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration are not documented. I
have no idea on how to create a proper
org.eclipse.jdt.internal.compiler.ast.Annotation, I could not find an example of the
construction of such an object.

Could you give me an idea where I could find the proper information to be able to
modify Lombok myself?


๐Ÿ‘ค reinierz ย  ๐Ÿ•— Sep 17, 2009 at 00:20 UTC

Is there a way for @ SupressWarnings("all") itself to cause warnings? I know eclipse's "redundant
SuppressWarnings" warning never triggers on 'all', but is there some sort of system that warns on all uses of
SuppressWarnings? I'm guessing no.

We just fixed auto-format (which now works again in a test built on my machine, still need to polish this code a
bit before I push it upstream and cut a new version). Taking care of this one is next on our agenda, as it's indeed
a showstopper for some.


๐Ÿ‘ค reinierz ย  ๐Ÿ•— Jul 17, 2010 at 23:27 UTC

Added this in commit a5e1995 - also for the $lock/$LOCK fields that are generated by @ Synchronized.

Note that there's a bug in eclipse helios where having any annotation on any class generates a phantom missing javadoc warning on the class, whether or not it has javadoc. Uninstalling lombok doesn't fix it, so it seems to be an eclipse problem.

Will be in release 0.9.3.


End of migration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment