Skip to main content



      Home
Home » Archived » Buckminster » Ignored @SuppressWarnings("unchecked")
Ignored @SuppressWarnings("unchecked") [message #526650] Mon, 12 April 2010 09:57 Go to next message
Eclipse UserFriend
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 11:14 Go to previous messageGo to next message
Eclipse UserFriend
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 13:01 Go to previous messageGo to next message
Eclipse UserFriend
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 16:34 Go to previous messageGo to next message
Eclipse UserFriend
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 06:32 Go to previous message
Eclipse UserFriend
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: Fri May 23 14:50:44 EDT 2025

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

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

Back to the top