Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Buckminster » Ignored @SuppressWarnings("unchecked")
Ignored @SuppressWarnings("unchecked") [message #526650] Mon, 12 April 2010 13:57 Go to next message
Maciej Oledzki is currently offline Maciej OledzkiFriend
Messages: 23
Registered: July 2009
Junior Member
It looks like Buckminster ignores SupressWarings annotations.

Following code do not generate any warnings in eclipse.
@SuppressWarnings("unchecked")
@Override
public Object getAdapter(Class adapter) {
	// TODO Auto-generated method stub
	return null;
}


But if I run build using buckminster, it generate following error:

Quote:
Class is a raw type. References to generic type Class should be parameterized


How can I remove such warnings from my project?
Re: Ignored @SuppressWarnings("unchecked") [message #526681 is a reply to message #526650] Mon, 12 April 2010 15:14 Go to previous messageGo to next message
Henrik Lindberg is currently offline Henrik LindbergFriend
Messages: 2501
Registered: July 2009
Senior Member
Hi,
For consistency it is best to set project specific preferences as all
developers (as well as the headless builds) will then get the same
settings for warnings and errors. The project specific settings should
naturally be checked in.

The alternative is to set defaults for the workspace, which for
buckminster means that you need to use a template workspace. (But using
project specific settings is strongly recommended).

- henrik

On 4/12/10 3:57 PM, Maciej Oledzki wrote:
> It looks like Buckminster ignores SupressWarings annotations.
>
> Following code do not generate any warnings in eclipse.
> @SuppressWarnings("unchecked")
> @Override
> public Object getAdapter(Class adapter) {
> // TODO Auto-generated method stub
> return null;
> }
>
> But if I run build using buckminster, it generate following error:
>
> Quote:
>> Class is a raw type. References to generic type Class should be
>> parameterized
>
>
> How can I remove such warnings from my project?
Re: Ignored @SuppressWarnings("unchecked") [message #526710 is a reply to message #526681] Mon, 12 April 2010 17:01 Go to previous messageGo to next message
Maciej Oledzki is currently offline Maciej OledzkiFriend
Messages: 23
Registered: July 2009
Junior Member
Hi,

I've updated /.settings/org.eclipse.jdt.core.prefs file with org.eclipse.jdt.core.compiler.problem.* properties, and still have the same problem.

My local eclipse shows me 0 warnigns in project, but buckminster compile log still contains warnings.

What is more, this log contains two warnings:
Quote:
Unnecessary @SuppressWarnings("unchecked")
Class is a raw type. References to generic type Class<T> should be parameterized

All these warnings refer to the same fragment of code (getAdapter() method).
This one about unnecessary @SuppressWarnings was also present in previous builds, but I've missed it before.
Re: Ignored @SuppressWarnings("unchecked") [message #526766 is a reply to message #526710] Mon, 12 April 2010 20:34 Go to previous messageGo to next message
Thomas Hallgren is currently offline Thomas HallgrenFriend
Messages: 3232
Registered: July 2009
Senior Member
Hi Maciej,
If you get warnings when using Buckminster, then there's a difference in compiler settings, or possibly in Java version
settings (in 1.6 you should use @SuppressWarning("rawtypes") instead of @SuppressWarning("unchecked")). So please check
that you control both with project specific settings.

Regards,
Thomas Hallgren


On 04/12/2010 07:01 PM, Maciej Oledzki wrote:
> Hi,
>
> I've updated /.settings/org.eclipse.jdt.core.prefs file with
> org.eclipse.jdt.core.compiler.problem.* properties, and still have the
> same problem.
>
> My local eclipse shows me 0 warnigns in project, but buckminster compile
> log still contains warnings.
>
> What is more, this log contains two warnings:
> Quote:
>> Unnecessary @SuppressWarnings("unchecked")
>> Class is a raw type. References to generic type Class<T> should be
>> parameterized
>
> All these warnings refer to the same fragment of code (getAdapter()
> method).
> This one about unnecessary @SuppressWarnings was also present in
> previous builds, but I've missed it before.
>
Re: Ignored @SuppressWarnings("unchecked") [message #526861 is a reply to message #526766] Tue, 13 April 2010 10:32 Go to previous message
Maciej Oledzki is currently offline Maciej OledzkiFriend
Messages: 23
Registered: July 2009
Junior Member
Hi Thomas,

It seems that this problem was caused by difference in eclipse version.
I use eclipse 3.5 on my local machine, and 3.6 on server.

Problem solved Smile
Previous Topic:Downloading
Next Topic:Buckminster Hudson plugin
Goto Forum:
  


Current Time: Thu Dec 18 22:38:55 GMT 2014

Powered by FUDForum. Page generated in 0.11854 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software