https://issues.apache.org/bugzilla/show_bug.cgi?id=45717





--- Comment #4 from Josh Micich <[EMAIL PROTECTED]>  2008-09-01 10:14:08 PST ---
To make the unit test I reduced your example down to these lines of code:

HSSFSheet sheet = workbook.createSheet("Vorschauliste");
HSSFRow row = sheet.createRow(0);            // B
sheet.setMargin(HSSFSheet.LeftMargin, 0.3);  // A 
row.createCell((short) 0);                   // C

To cause the IllegalStateException, the critical factor is to execute the three
labeled lines in the above order.  The other two possible orderings (A, B, C)
and (B, C, A) work OK.  For me, setting the sheet margins before creating rows
makes a little more sense. To be clear:

HSSFSheet sheet = workbook.createSheet("Vorschauliste");
sheet.setMargin(HSSFSheet.LeftMargin, 0.3);  // A 
HSSFRow row = sheet.createRow(0);            // B
row.createCell((short) 0);                   // C

Either re-ordering would be a 'code around' for the specific example provided. 
However there is no guarantee that this would be the only thing you need to do
to avoid the problems fixed in r683758 and r683871.


-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to