GitHub user kaspersorensen opened a pull request:

    https://github.com/apache/metamodel/pull/56

    Metamodel 187/excel file another attempt

    Here's my attempt at solving METAMODEL-187. Heavily inspired by #49 but to 
get my head around it I had to start over and track resource usage/closing very 
closely.
    
    I finally found the culprit (maybe one of more) and it was to close the 
workbook in ExcelUtils.writeWorkbook(...) before flushing the new contents to 
the resource.
    
    I also updated POI since the errors given in the later version was giving a 
tiny bit more sense.
    
    I also used an InMemoryResource instead of a temp file resource. I am 
working on the assumption that this can fit into memory easily in it's 
persisted form, but that the memory improvement we need to do is only on the 
unpacked form.

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

    $ git pull https://github.com/kaspersorensen/metamodel 
METAMODEL-187/excel-file-another-attempt

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

    https://github.com/apache/metamodel/pull/56.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 #56
    
----
commit e6dca2049e9eb37a52b47f6e1cd257427e7dac1a
Author: Kasper Sørensen <[email protected]>
Date:   2015-10-04T21:43:46Z

    METAMODEL-187: First attempt at solving this issue. Now I get a more
    regular JUnit error regarding a MALFORMED file instead of a JVM crash!

commit cd41e173ad5f8861050862e07e69d10bac9be3d6
Author: Kasper Sørensen <[email protected]>
Date:   2015-10-04T21:59:47Z

    METAMODEL-187: Fixed it! :-D

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to