Useless @Override annotations?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Useless @Override annotations?

Jacques Le Roux
Administrator
Hi,

By chance I looked into Eclipse Problems View and I found a lot of "errors" regarding @Override annotations
Are they supposed to be used later of simply left out there?

Thanks

Jacques
Reply | Threaded
Open this post in threaded view
|

Re: Useless @Override annotations?

Adrian Crum-3
@Override is useful in 1.6 and later. The compiler will warn you if the
super class or interface being overridden has changed.

-Adrian

On 9/17/2012 9:25 AM, Jacques Le Roux wrote:
> Hi,
>
> By chance I looked into Eclipse Problems View and I found a lot of
> "errors" regarding @Override annotations
> Are they supposed to be used later of simply left out there?
>
> Thanks
>
> Jacques

Reply | Threaded
Open this post in threaded view
|

Re: Useless @Override annotations?

Jacques Le Roux
Administrator
Yes thanks, I know that, I just wonder why Eclipse shows errors, maybe an Eclipse setting in "Java/Compiler/Errors-Warnings" then?

Jacques

From: "Adrian Crum" <[hidden email]>

> @Override is useful in 1.6 and later. The compiler will warn you if the
> super class or interface being overridden has changed.
>
> -Adrian
>
> On 9/17/2012 9:25 AM, Jacques Le Roux wrote:
>> Hi,
>>
>> By chance I looked into Eclipse Problems View and I found a lot of
>> "errors" regarding @Override annotations
>> Are they supposed to be used later of simply left out there?
>>
>> Thanks
>>
>> Jacques
>
Reply | Threaded
Open this post in threaded view
|

Re: Useless @Override annotations?

Adrian Crum-3
Are you sure you have Eclipse set for 1.6 compatibility? I don't see any
warnings on my copy.

-Adrian

On 9/17/2012 10:04 AM, Jacques Le Roux wrote:

> Yes thanks, I know that, I just wonder why Eclipse shows errors, maybe
> an Eclipse setting in "Java/Compiler/Errors-Warnings" then?
>
> Jacques
>
> From: "Adrian Crum" <[hidden email]>
>> @Override is useful in 1.6 and later. The compiler will warn you if
>> the super class or interface being overridden has changed.
>>
>> -Adrian
>>
>> On 9/17/2012 9:25 AM, Jacques Le Roux wrote:
>>> Hi,
>>>
>>> By chance I looked into Eclipse Problems View and I found a lot of
>>> "errors" regarding @Override annotations
>>> Are they supposed to be used later of simply left out there?
>>>
>>> Thanks
>>>
>>> Jacques
>>

Reply | Threaded
Open this post in threaded view
|

Re: Useless @Override annotations?

Jacques Le Roux
Administrator
That was it, thanks Adrian!

I see only 8 errors now. They are false reports though I wonder why it complains about getContextPath() in
request.getSession().getServletContext().getContextPath()
http://docs.oracle.com/javaee/6/api/javax/servlet/http/HttpServletRequest.html#getContextPath%28%29

Anyway not a big deal

Jacques

From: "Adrian Crum" <[hidden email]>

> Are you sure you have Eclipse set for 1.6 compatibility? I don't see any warnings on my copy.
>
> -Adrian
>
> On 9/17/2012 10:04 AM, Jacques Le Roux wrote:
>> Yes thanks, I know that, I just wonder why Eclipse shows errors, maybe an Eclipse setting in "Java/Compiler/Errors-Warnings"
>> then?
>>
>> Jacques
>>
>> From: "Adrian Crum" <[hidden email]>
>>> @Override is useful in 1.6 and later. The compiler will warn you if the super class or interface being overridden has changed.
>>>
>>> -Adrian
>>>
>>> On 9/17/2012 9:25 AM, Jacques Le Roux wrote:
>>>> Hi,
>>>>
>>>> By chance I looked into Eclipse Problems View and I found a lot of "errors" regarding @Override annotations
>>>> Are they supposed to be used later of simply left out there?
>>>>
>>>> Thanks
>>>>
>>>> Jacques
>>>
>