mnabeelkhan / tableexport-for-vaadin

Automatically exported from code.google.com/p/tableexport-for-vaadin
0 stars 0 forks source link

Missing null check for hierarchical container totals #23

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
From post:

2) When using Hierarchial containers but the "displayTotals" is not set, the 
code will crash during finalSheetFormat since the hierarchicalTotalsSheet is 
not created. By adding a simple null check, this could easily been prevented: 

    protected void finalSheetFormat() {
        final FormulaEvaluator evaluator = workbook.getCreationHelper().createFormulaEvaluator();
        if (isHierarchical()) {
           ...
           if (hierarchicalTotalsSheet != null) workbook.removeSheetAt(workbook.getSheetIndex(hierarchicalTotalsSheet));
    }

Original issue reported on code.google.com by jnas...@gmail.com on 17 Mar 2012 at 9:54

GoogleCodeExporter commented 8 years ago
fixed

Original comment by jnas...@gmail.com on 18 Mar 2012 at 12:05