You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by Andreas Beeker <ki...@apache.org> on 2015/08/15 14:50:03 UTC

Findbugs - NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Hi,

we have several cases of NM_SAME_SIMPLE_NAME_AS_SUPERCLASS in the
findbugs reports and as the description says, this is confusing

(a) A few classes just delegate to their same named parent.
and (b) and others add a bit of extra logic to.
I'd like to remove (a) and replace the import with the parent classes.
... and prefix the class of (b) with the format specific prefix.

As this affects x/hssf (and not a scratchpad module) ... Is this ok for you?

A similar situation is with NM_SAME_SIMPLE_NAME_AS_INTERFACE,
but of course instantiating an interface won't work, so it's more obvious
to the user.

Andi



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Re: Findbugs - NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Posted by Nick Burch <ap...@gagravarr.org>.
On Sat, 15 Aug 2015, Andreas Beeker wrote:
> On 15.08.2015 19:59, Nick Burch wrote:
>> Any chance you could point us to a couple of examples? Might help with 
>> evaluating if we feel it's a real problem or not
>
> Just open the findbugs page and navigate to the type named in the thread subject
> or use [1] for the last build.

Ah, web accessible report, even better, thanks!

> - org.apache.poi.hssf.record.UnicodeString can be removed
> - org.apache.poi.hssf.util.AreaReference can be removed
> - org.apache.poi.hssf.util.CellRangeAddress can be removed
> - org.apache.poi.hssf.util.CellRangeAddressList needs to be renamed
> - org.apache.poi.hssf.util.CellReference can be removed, calls to the 2-arg-constructor need to be fixed
> - org.apache.poi.hssf.util.Region can be removed

I think all of those are there to provide backwards compatibility. I think 
they're all HSSF classes which had their logic moved to SS so they could 
easily work for XSSF as well, but we need to preserve something so all the 
existing HSSF-only code people have continues to work

> - org.apache.poi.xssf.model.IndexedUDFFinder can be removed

This is probably to mirror a pattern in HSSF, less sure if we can ditch 
this one or not?

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Re: Findbugs - NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Posted by Andreas Beeker <ki...@apache.org>.
On 15.08.2015 19:59, Nick Burch wrote:
> Any chance you could point us to a couple of examples? Might help with evaluating if we feel it's a real problem or not
>

Just open the findbugs page and navigate to the type named in the thread subject
or use [1] for the last build.

- org.apache.poi.hssf.record.UnicodeString can be removed
- org.apache.poi.hssf.util.AreaReference can be removed
- org.apache.poi.hssf.util.CellRangeAddress can be removed
- org.apache.poi.hssf.util.CellRangeAddressList needs to be renamed
- org.apache.poi.hssf.util.CellReference can be removed, calls to the 2-arg-constructor need to be fixed
- org.apache.poi.hssf.util.Region can be removed
- org.apache.poi.xssf.model.IndexedUDFFinder can be removed

Andi

[1] https://builds.apache.org/job/POI/791/findbugsResult/type.799852010/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Re: Findbugs - NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Posted by Nick Burch <ap...@gagravarr.org>.
On Sat, 15 Aug 2015, Andreas Beeker wrote:
> we have several cases of NM_SAME_SIMPLE_NAME_AS_SUPERCLASS in the 
> findbugs reports and as the description says, this is confusing

Any chance you could point us to a couple of examples? Might help with 
evaluating if we feel it's a real problem or not

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org