You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Alex Karasulu <ak...@apache.org> on 2011/03/11 00:44:47 UTC

Why add @SuppressWarnings like this?

    @SuppressWarnings("PMD.UnusedLocalVariable") // Remove me when the TODO
is fixed

The TODO was to finish the implementation which will use the local variable.

Reason I ask, is because we should have PMD reports complain, after all it
is unfinished code that should stick out. Second the @SuppressWarning
identifier is not found and eclipse complains. Third there's already a TODO
there along with a JIRA issue for this particular case.

Thoughts?

Alex

Re: Why add @SuppressWarnings like this?

Posted by Emmanuel Lecharny <el...@gmail.com>.
On 3/11/11 11:51 AM, Alex Karasulu wrote:
> Just another point, these kinds of touch ups might be things we do in an RC
> or GA since code refactorings and finishing touches may invalidate them. I
> noticed while shifting around code and refactoring that these PMD
> suppressions are lost or altered.

At some point after the first RC, we will have to get rid of all those 
@SuppressWarnings...



-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com


Re: Why add @SuppressWarnings like this?

Posted by Alex Karasulu <ak...@apache.org>.
Just another point, these kinds of touch ups might be things we do in an RC
or GA since code refactorings and finishing touches may invalidate them. I
noticed while shifting around code and refactoring that these PMD
suppressions are lost or altered.

Regards,
Alex

On Fri, Mar 11, 2011 at 3:19 AM, Alex Karasulu <ak...@apache.org> wrote:

> Also is it possible to globally disable this so we don't have to add these
> suppressions to everywhere there is an OID string?
>
>     //This will suppress PMD.AvoidUsingHardCodedIP warnings in this class
>     @SuppressWarnings("PMD.AvoidUsingHardCodedIP")
>
>
> On Fri, Mar 11, 2011 at 1:44 AM, Alex Karasulu <ak...@apache.org>wrote:
>
>>     @SuppressWarnings("PMD.UnusedLocalVariable") // Remove me when the
>> TODO is fixed
>>
>> The TODO was to finish the implementation which will use the local
>> variable.
>>
>> Reason I ask, is because we should have PMD reports complain, after all it
>> is unfinished code that should stick out. Second the @SuppressWarning
>> identifier is not found and eclipse complains. Third there's already a TODO
>> there along with a JIRA issue for this particular case.
>>
>> Thoughts?
>>
>> Alex
>>
>
>

Re: Why add @SuppressWarnings like this?

Posted by Alex Karasulu <ak...@apache.org>.
Also is it possible to globally disable this so we don't have to add these
suppressions to everywhere there is an OID string?

    //This will suppress PMD.AvoidUsingHardCodedIP warnings in this class
    @SuppressWarnings("PMD.AvoidUsingHardCodedIP")


On Fri, Mar 11, 2011 at 1:44 AM, Alex Karasulu <ak...@apache.org> wrote:

>     @SuppressWarnings("PMD.UnusedLocalVariable") // Remove me when the TODO
> is fixed
>
> The TODO was to finish the implementation which will use the local
> variable.
>
> Reason I ask, is because we should have PMD reports complain, after all it
> is unfinished code that should stick out. Second the @SuppressWarning
> identifier is not found and eclipse complains. Third there's already a TODO
> there along with a JIRA issue for this particular case.
>
> Thoughts?
>
> Alex
>