Aguid
Aguid

Reputation: 1043

How to remove javax annotation warnings

How can I remove the following warnings ?

warning: No processor claimed any of these annotations: javax.annotation.Generated
warning: No processor claimed any of these annotations: javax.xml.bind.annotation.XmlElements,
                                                        javax.xml.bind.annotation.XmlID,javax.xml.bind.annotation.XmlElement,javax.xml.bind.annotation.XmlElementRef,

Upvotes: 1

Views: 1315

Answers (2)

George Troulis
George Troulis

Reputation: 168

I'm getting the same warning for @javax.annotation.Generated, but only during a clean build. The second time I build, the warning for @javax.annotation.Generated not being claimed goes away. I don't fully understand why that is but since it's only a warning on the first build, I just ignore it.

Upvotes: 1

Vlasec
Vlasec

Reputation: 5546

Apparently you have these annotations (@Generated, XmlElements, XmlID) somewhere in the code you are compiling or running.

If no processor claimed the annotations, it could mean a big trouble for you, if you rely on the annotations to have any effect, and that is why the warnings are there.

Disabling warnings is usually possible, but I don't think it's a good idea. You would pretty much only hide symptoms, but the problem is there. Then someone else has to fix this problem and wastes a day trying to find out where is the smell coming from, because the shit is hidden under a nice carpet.

Upvotes: 2

Related Questions