Bug 59769 - Return type change of getNumCellStyles() breaks binary compatibility
Summary: Return type change of getNumCellStyles() breaks binary compatibility
Status: RESOLVED WONTFIX
Alias: None
Product: POI
Classification: Unclassified
Component: SS Common (show other bugs)
Version: 3.14-FINAL
Hardware: PC All
: P2 regression (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-29 07:33 UTC by Tobias Gruetzmacher
Modified: 2016-06-29 15:06 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Gruetzmacher 2016-06-29 07:33:11 UTC
In r1721930 the return value of org.apache.poi.ss.usermodel.Workbook.getNumCellStyles() (and related classes) was changed from short to int. This breaks binary compatibility of the interface with previous releases of POI.

Code calling this method now throws an exception:

java.lang.NoSuchMethodError: org/apache/poi/ss/usermodel/Workbook.getNumCellStyles()S
Comment 1 Javen O'Neal 2016-06-29 15:06:59 UTC
This change was intentional to unify XSSF and HSSF while avoiding overflow bugs due to lack of unsigned datatypes. As this is a better nd not a setter, there was no way for us to make this change gradually without breaking binary compatibility.

This doesn't break source compatibility since shorts can be implicitly cast to ints.

You unfortunately may need to recompile your project.