Compiler warnings & "unnecessary suppress warnings" [message #258562] |
Tue, 10 February 2009 05:01  |
Eclipse User |
|
|
|
Hi!
I have two installations of 3.4.1 (at work and at home) and they have the
same settings for the compiler warnings/errors.
The problem is that in one place I get the warnings ("restricted access"
and "possible null pointer", both on proper grounds), but in the other I
get "unnecessary suppressWarnings" for them (in the places where I added
those to get rid of the other warnings).
I can't find any difference between the two installations, have been
retrying with fresh ones and fresh workspaces and don't understand what is
different.
I hope this is the right place to ask and if not, please point me right.
best regards,
Vlad
|
|
|
|
|
Re: Compiler warnings & "unnecessary suppress warnings" [message #258601 is a reply to message #258587] |
Tue, 10 February 2009 15:43  |
Eclipse User |
|
|
|
Walter Harley wrote:
> "Vlad Dumitrescu" <vladdu55@gmail.com> wrote in message
>> I have two installations of 3.4.1 (at work and at home) and they have the
>> same settings for the compiler warnings/errors.
>>
>> The problem is that in one place I get the warnings ("restricted access"
>> and "possible null pointer", both on proper grounds), but in the other I
>> get "unnecessary suppressWarnings" for them (in the places where I added
>> those to get rid of the other warnings).
> The properties may be set at the workspace level or at the project level, so
> make sure to check both.
> It's possible that if you are running Eclipse on a different JRE some
> functionality may be disabled on one platform and enabled on another, so
> make sure (by checking Help -> About -> Software Configuration) that you're
> using the same JRE.
> You should also verify that the versions of the org.eclipse.jdt.* plug-ins
> on both machines are exactly the same.
Thank you for the suggestions!
I had checked those, and didn't see any difference.
I think I found the weirdness regarding the "discouraged access" warnings:
accessing a discouraged class gives a warning in that method and adding a
@SuppressWarnings removes it. But there is a warning for the import of
that class too and it only dissapears if a @SuppressWarnings is added to
the class -- but this makes the annotation on the method unnecessary, so
therefrom the other warning. Probably a "quick fix" added the class
annotation without me noticing.
I still have to investigate the warnings about the possible null pointer
access and its unnecessary annotation. Hopefully it's also me who messed
it up :-/
Thanks again!
best regards,
Vlad
|
|
|
Powered by
FUDForum. Page generated in 0.04443 seconds