aboutsummaryrefslogtreecommitdiffstats
path: root/src/examples
diff options
context:
space:
mode:
authorAndreas Beeker <kiwiwings@apache.org>2015-09-29 08:31:15 +0000
committerAndreas Beeker <kiwiwings@apache.org>2015-09-29 08:31:15 +0000
commitaacf48d5aaaee4bf2b154b63a8a6f36ebbf2aa19 (patch)
tree78b4f0998e7019fdfcfc738a5ecd735353c2d6c0 /src/examples
parent3109f16a7ff17da81917a2830c8789109e9c39bf (diff)
downloadpoi-aacf48d5aaaee4bf2b154b63a8a6f36ebbf2aa19.tar.gz
poi-aacf48d5aaaee4bf2b154b63a8a6f36ebbf2aa19.zip
sonar fixes
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1705814 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/examples')
-rw-r--r--src/examples/src/org/apache/poi/xssf/eventusermodel/XLSX2CSV.java13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/examples/src/org/apache/poi/xssf/eventusermodel/XLSX2CSV.java b/src/examples/src/org/apache/poi/xssf/eventusermodel/XLSX2CSV.java
index 23779d3059..e15b4ec0be 100644
--- a/src/examples/src/org/apache/poi/xssf/eventusermodel/XLSX2CSV.java
+++ b/src/examples/src/org/apache/poi/xssf/eventusermodel/XLSX2CSV.java
@@ -185,15 +185,10 @@ public class XLSX2CSV {
// with a special style or format
int styleIndex = Integer.parseInt(cellStyleStr);
XSSFCellStyle style = stylesTable.getStyleAt(styleIndex);
- if (style == null && stylesTable.getNumCellStyles() > 0) {
- style = stylesTable.getStyleAt(0);
- }
- if (style != null) {
- this.formatIndex = style.getDataFormat();
- this.formatString = style.getDataFormatString();
- if (this.formatString == null) {
- this.formatString = BuiltinFormats.getBuiltinFormat(this.formatIndex);
- }
+ this.formatIndex = style.getDataFormat();
+ this.formatString = style.getDataFormatString();
+ if (this.formatString == null) {
+ this.formatString = BuiltinFormats.getBuiltinFormat(this.formatIndex);
}
}
}