https://issues.apache.org/bugzilla/show_bug.cgi?id=48087--- Comment #2 from Robin Salkeld <
robin.salkeld@...> 2009-10-30 10:26:36 UTC ---
(In reply to comment #1)
> It is not broken, rather not implemented.
>
> Initializing of the superclass is skipped intentionally. Chart sheets don't
> have rows/columns and most of methods from XSSFSheet don't make sense for
> XSSFChartSheet.
>
> Can you post a use-case that results in NPE? What methods are you calling?
>
> I agree that NPE is not appropriate. get* methods of the Sheet interface that
> don't make sense should either return an empty iterator or false or 0:
> At least, the code below should NOT throw NPE:
> for(Row row : chartSheet)
> for(int i=0; i < chartSheet.getPhysicalNumberOfRows())
>
> set* modifiers should either do nothing or throw "Not supported for charts".
>
>
> Yegor
Nearly any method related to the data will do it, since all the fields are
null. For a use case, let's say getFirstRowNum or getLastRowNum, since you'd
need to call them at least to discover that a chart sheet has no actual data
(or getPhysicalNumberOfRows() as you mentioned). Are you looking for a concrete
test case?
I should also point out that the implicit no argument constructor is
inconsistent with the deserialization method (i.e. XSSFChartSheet(PackagePart
part, PackageRelationship rel) followed by a call to #read), since the former
actually DOES initialize the superclass.
--
Configure bugmail:
https://issues.apache.org/bugzilla/userprefs.cgi?tab=email------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail:
dev-unsubscribe@...
For additional commands, e-mail:
dev-help@...