diff options
author | Javen O'Neal <onealj@apache.org> | 2016-06-13 03:48:30 +0000 |
---|---|---|
committer | Javen O'Neal <onealj@apache.org> | 2016-06-13 03:48:30 +0000 |
commit | b597097568c9dad93b1a1197f056499d2e6e16f1 (patch) | |
tree | 6ec897cb644483499c847a8b54782cd2d56f4368 /src/java/org/apache | |
parent | 0fae3bcb08b1fac728f12d9873faae84222e0374 (diff) | |
download | poi-b597097568c9dad93b1a1197f056499d2e6e16f1.tar.gz poi-b597097568c9dad93b1a1197f056499d2e6e16f1.zip |
fix findbugs issues
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1748080 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache')
-rw-r--r-- | src/java/org/apache/poi/ddf/EscherComplexProperty.java | 2 | ||||
-rw-r--r-- | src/java/org/apache/poi/dev/RecordGenerator.java | 8 | ||||
-rw-r--r-- | src/java/org/apache/poi/hpsf/Decimal.java | 3 |
3 files changed, 10 insertions, 3 deletions
diff --git a/src/java/org/apache/poi/ddf/EscherComplexProperty.java b/src/java/org/apache/poi/ddf/EscherComplexProperty.java index 3649d98f06..9c97ec0448 100644 --- a/src/java/org/apache/poi/ddf/EscherComplexProperty.java +++ b/src/java/org/apache/poi/ddf/EscherComplexProperty.java @@ -106,7 +106,7 @@ public class EscherComplexProperty extends EscherProperty { if (this == o) { return true; } - if (!(o instanceof EscherComplexProperty)) { + if (o == null || !(o instanceof EscherComplexProperty)) { return false; } diff --git a/src/java/org/apache/poi/dev/RecordGenerator.java b/src/java/org/apache/poi/dev/RecordGenerator.java index f841edec42..2d3cdf3a99 100644 --- a/src/java/org/apache/poi/dev/RecordGenerator.java +++ b/src/java/org/apache/poi/dev/RecordGenerator.java @@ -92,7 +92,9 @@ public class RecordGenerator { // Generate record String destinationPath = destSrcPathDir + "/" + packageName; File destinationPathFile = new File(destinationPath); - destinationPathFile.mkdirs(); + if (destinationPathFile.mkdirs()) { + System.out.println("Created destination directory: " + destinationPath); + } String destinationFilepath = destinationPath + "/" + recordName + suffix + ".java"; transform(file, new File(destinationFilepath), new File(recordStyleDir + "/" + extendstg.toLowerCase(Locale.ROOT) + ".xsl")); @@ -101,7 +103,9 @@ public class RecordGenerator { // Generate test (if not already generated) destinationPath = testSrcPathDir + "/" + packageName; destinationPathFile = new File(destinationPath); - destinationPathFile.mkdirs(); + if (destinationPathFile.mkdirs()) { + System.out.println("Created destination directory: " + destinationPath); + } destinationFilepath = destinationPath + "/Test" + recordName + suffix + ".java"; if (new File(destinationFilepath).exists() == false) { String temp = (recordStyleDir + "/" + extendstg.toLowerCase(Locale.ROOT) + "_test.xsl"); diff --git a/src/java/org/apache/poi/hpsf/Decimal.java b/src/java/org/apache/poi/hpsf/Decimal.java index 8897d3d5b2..d8c404c31c 100644 --- a/src/java/org/apache/poi/hpsf/Decimal.java +++ b/src/java/org/apache/poi/hpsf/Decimal.java @@ -24,6 +24,9 @@ class Decimal { static final int SIZE = 16; + /** + * Findbugs: UNR_UNREAD_FIELD + */ private short field_1_wReserved; private byte field_2_scale; private byte field_3_sign; |