mirror of https://github.com/apache/poi.git
try to make examples more robust - to fix integration tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1879913 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d1d90ed171
commit
0bcb289365
|
@ -132,7 +132,7 @@ public class XLSX2CSV {
|
|||
//noinspection ResultOfMethodCallIgnored
|
||||
Double.parseDouble(formattedValue);
|
||||
output.append(formattedValue);
|
||||
} catch (NumberFormatException e) {
|
||||
} catch (Exception e) {
|
||||
output.append('"');
|
||||
output.append(formattedValue);
|
||||
output.append('"');
|
||||
|
|
|
@ -133,7 +133,7 @@ public class FromHowTo {
|
|||
throws SAXException {
|
||||
// Process the last contents as required.
|
||||
// Do now, as characters() may be called more than once
|
||||
if(nextIsString && !lastContents.isEmpty()) {
|
||||
if(nextIsString && !lastContents.trim().isEmpty()) {
|
||||
Integer idx = Integer.valueOf(lastContents);
|
||||
lastContents = lruCache.get(idx);
|
||||
if (lastContents == null && !lruCache.containsKey(idx)) {
|
||||
|
|
Loading…
Reference in New Issue