Home » Modeling » TMF (Xtext) » avoid @SuppressWarnings("all") in Xtend batch compiler
| | |
Re: avoid @SuppressWarnings("all") in Xtend batch compiler [message #1433959 is a reply to message #1433949] |
Mon, 29 September 2014 13:18 |
Sebastian Zarnekow Messages: 3118 Registered: July 2009 |
Senior Member |
|
|
Hmm obviously I'm the one who missed something. I expected it to use
your explicitly suppressed warnings, but apparently it doesn't work.
Could you please file a ticket and describe why you want to suppress the
suppress warnings annotation?
Regards,
Sebastian
--
Looking for professional support for Xtext, Xtend or Eclipse Modeling?
Go visit: http://xtext.itemis.com
Am 29.09.14 14:58, schrieb Lorenzo Bettini:
> On 29/09/2014 12:58, Sebastian Zarnekow wrote:
>> Hi Lorenzo,
>>
>> there is currently no generic way to disable that for Xtend. You can use
>> another GeneratorConfig for your own languages but Xtend will generate
>> @SuppressWarnings if no user-defined @SuppressWarnings is present.
>>
>> Best,
>> Sebastian
>
> Hi Sebastian
>
> I tried to write this Xtend class
>
> @SuppressWarnings("serial")
> class XtendGreeting {
>
> def greeting() {
> "Hello, world."
> }
>
> def useEquals() {
> // 2 findbugs issues:
> // findbugs:DM_NUMBER_CTOR
> // findbugs:EC_UNRELATED_TYPES
> new Integer(0).equals("foo");
> }
> }
>
> but the generated Java class still shows as follows:
>
> @SuppressWarnings("all")
> public class XtendGreeting {
> public String greeting() {
> return "Hello, world.";
> }
>
> public boolean useEquals() {
> Integer _integer = new Integer(0);
> return _integer.equals("foo");
> }
> }
>
> am I missing something?
>
> cheers
> Lorenzo
>
|
|
| | | | |
Goto Forum:
Current Time: Sat Dec 21 17:08:21 GMT 2024
Powered by FUDForum. Page generated in 0.03900 seconds
|