You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by wkk91193 <gi...@git.apache.org> on 2018/06/15 17:46:25 UTC

[GitHub] fineract pull request #457: Fixing Apache POI issue - Formula Cell evaluatio...

GitHub user wkk91193 opened a pull request:

    https://github.com/apache/fineract/pull/457

    Fixing Apache POI issue - Formula Cell evaluation nullpointer exception

    Fixing Apache POI Formular Cell evaluation null pointer thrown

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/wkk91193/incubator-fineract fixing-formular-cell-evaluation-npe

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/fineract/pull/457.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #457
    
----
commit 650e1ddd8b5dfaf4c6eb2a44512390e9011d4be4
Author: unknown <wk...@...>
Date:   2018-06-15T17:43:38Z

    Fixing Apache POI issue - Formula Cell evaluation nullpointer exception

----


---

[GitHub] fineract pull request #457: Fixing Apache POI issue - Formula Cell evaluatio...

Posted by ShruthiRajaram <gi...@git.apache.org>.
Github user ShruthiRajaram commented on a diff in the pull request:

    https://github.com/apache/fineract/pull/457#discussion_r209896737
  
    --- Diff: fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/ImportHandlerUtils.java ---
    @@ -63,8 +63,13 @@ public static Long readAsLong(int colIndex, Row row) {
             FormulaEvaluator eval = row.getSheet().getWorkbook().getCreationHelper().createFormulaEvaluator();
             if(c.getCellType() == Cell.CELL_TYPE_FORMULA) {
                 if(eval!=null) {
    -                CellValue val = eval.evaluate(c);
    -                return ((Double) val.getNumberValue()).longValue();
    +                CellValue val = null;
    --- End diff --
    
    Can you please let us know in which scenario a null pointer exception is thrown.  As there is a null check for  'c and eval', I am not able to figure out  the case when a null pointer exception is thrown  by the statement in try block . This applies for all remaining method changes.


---