commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: [LANG] Save to remove @SuppressWarnings("null") from StrBuilder?
Date Thu, 02 May 2013 19:54:52 GMT
On 2 May 2013 17:49, Benedikt Ritter <beneritter@gmail.com> wrote:

> Hi,
>
> my Eclipse tells me that the suppression on
>
>    public StrBuilder insert(final int index, String str)
>
> can be removed.


My Eclipse warns me that str can be null at 1501: str.getChars(), so it may
be how Eclipse is configured.

Looking at the code I tend to agree.


But I agree that str cannot be null at 1501, because then stgrLen would be
zero.


> Is anyone aware of a
> reason why this suppression should stay?
>
>
Eclipse config.

But the code can be (has been) rewritten to avoid the issue, as per

 URL: http://svn.apache.org/r1478506
Log:
Rewrite to avoid (im)possible NPE warning

Benedikt

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message