On 12/25/15 9:29 AM, Luc Maisonobe wrote:
> Hi all,
>
> Le 25/12/2015 17:23, l...@apache.org a écrit :
>> Prevent findbugs false positive.
> This commit was intended to fix a false positive in findbugs.
> The field iterations has been deprecated and is not used
> anymore in the library. However, as it is protected and not
> private, it cannot be removed and it should be initialized
> properly. In this case a dedicated wrapper class allow it
> to delegate to its replacement field.
>
> So I tried to add the following in our findbugs-exclude-filter.xml,
> so it is no displayed anymore. This failed. The warning still
> appears in the findbugs report.
>
> Do anyone of you understand why the filter doesn't work? I have
> reread 4 times the <Match></Match> element and did not see
> what I wrote wrong.
>
> Any help would be greatly appreciated.

I just pushed a change that works for me, which was to emove the
method spec in the match.  This makes sense, since the exclusion
applies at the class level.

Phil
>
> best regards,
> Luc
>
>> Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
>> Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/4757bc82
>> Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/4757bc82
>> Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/4757bc82
>>
>> Branch: refs/heads/MATH_3_X
>> Commit: 4757bc82f9bb3457db6c6ad1f825a9f9214a7d48
>> Parents: 6259f3f
>> Author: Luc Maisonobe <l...@apache.org>
>> Authored: Fri Dec 25 16:54:16 2015 +0100
>> Committer: Luc Maisonobe <l...@apache.org>
>> Committed: Fri Dec 25 16:54:16 2015 +0100
>>
>> ----------------------------------------------------------------------
>>  findbugs-exclude-filter.xml | 8 ++++++++
>>  1 file changed, 8 insertions(+)
>> ----------------------------------------------------------------------
>>
>>
>> http://git-wip-us.apache.org/repos/asf/commons-math/blob/4757bc82/findbugs-exclude-filter.xml
>> ----------------------------------------------------------------------
>> diff --git a/findbugs-exclude-filter.xml b/findbugs-exclude-filter.xml
>> index 5a960ca..d32fbbe 100644
>> --- a/findbugs-exclude-filter.xml
>> +++ b/findbugs-exclude-filter.xml
>> @@ -23,6 +23,14 @@
>>  -->
>>  <FindBugsFilter>
>>  
>> +  <!-- the following field is unused but cannot be suppressed as it is 
>> protected -->
>> +  <!-- and some user class may require it -->
>> +  <Match>
>> +    <Class 
>> name="org.apache.commons.math3.analysis.integration.BaseAbstractUnivariateIntegrator"
>>  />
>> +    <Method name="&lt;init>" params="double,double,int,int" returns="void" 
>> />
>> +    <Bug pattern="URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD" />
>> +  </Match>
>> +
>>    <!--  the following equality tests are part of the reference algorithms 
>> -->
>>    <!--  which already know about limited precision of the double numbers -->
>>    <Match>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> For additional commands, e-mail: dev-h...@commons.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to