aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDominik Stadler <centic@apache.org>2016-07-18 09:34:59 +0000
committerDominik Stadler <centic@apache.org>2016-07-18 09:34:59 +0000
commitb8523ef5966b60336b8af6be5736c180139889c7 (patch)
treed6ac3302a655ad448707c45fa3a7a6f56fb26528 /src
parent33d5189ff914595f8ccc0b2a40cc1d9b0b743c5f (diff)
downloadpoi-b8523ef5966b60336b8af6be5736c180139889c7.tar.gz
poi-b8523ef5966b60336b8af6be5736c180139889c7.zip
Some warnings/improvements suggested by IntelliJ
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1753188 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r--src/java/org/apache/poi/hssf/record/RecordFactory.java14
-rw-r--r--src/java/org/apache/poi/hssf/record/aggregates/ConditionalFormattingTable.java3
-rw-r--r--src/testcases/org/apache/poi/ss/format/TestCellFormatCondition.java1
3 files changed, 8 insertions, 10 deletions
diff --git a/src/java/org/apache/poi/hssf/record/RecordFactory.java b/src/java/org/apache/poi/hssf/record/RecordFactory.java
index ec034d3fcb..2336999b13 100644
--- a/src/java/org/apache/poi/hssf/record/RecordFactory.java
+++ b/src/java/org/apache/poi/hssf/record/RecordFactory.java
@@ -90,12 +90,12 @@ public final class RecordFactory {
throw new RuntimeException(e);
} catch (InvocationTargetException e) {
Throwable t = e.getTargetException();
- if (t instanceof RecordFormatException) {
- throw (RecordFormatException)t;
+ if (t instanceof org.apache.poi.util.RecordFormatException) {
+ throw (org.apache.poi.util.RecordFormatException)t;
} else if (t instanceof EncryptedDocumentException) {
throw (EncryptedDocumentException)t;
} else {
- throw new RecordFormatException("Unable to construct record instance" , t);
+ throw new org.apache.poi.util.RecordFormatException("Unable to construct record instance" , t);
}
}
}
@@ -123,7 +123,7 @@ public final class RecordFactory {
} catch (IllegalAccessException e) {
throw new RuntimeException(e);
} catch (InvocationTargetException e) {
- throw new RecordFormatException("Unable to construct record instance" , e.getTargetException());
+ throw new org.apache.poi.util.RecordFormatException("Unable to construct record instance" , e.getTargetException());
}
}
@Override
@@ -443,7 +443,7 @@ public final class RecordFactory {
try {
sid = recClass.getField("sid").getShort(null);
} catch (Exception illegalArgumentException) {
- throw new RecordFormatException(
+ throw new org.apache.poi.util.RecordFormatException(
"Unable to determine record types");
}
Integer key = Integer.valueOf(sid);
@@ -482,9 +482,9 @@ public final class RecordFactory {
*
* @return an array of Records created from the InputStream
*
- * @exception RecordFormatException on error processing the InputStream
+ * @exception org.apache.poi.util.RecordFormatException on error processing the InputStream
*/
- public static List<Record> createRecords(InputStream in) throws RecordFormatException {
+ public static List<Record> createRecords(InputStream in) throws org.apache.poi.util.RecordFormatException {
List<Record> records = new ArrayList<Record>(NUM_RECORDS);
diff --git a/src/java/org/apache/poi/hssf/record/aggregates/ConditionalFormattingTable.java b/src/java/org/apache/poi/hssf/record/aggregates/ConditionalFormattingTable.java
index 93bae37d9d..cfbd36995d 100644
--- a/src/java/org/apache/poi/hssf/record/aggregates/ConditionalFormattingTable.java
+++ b/src/java/org/apache/poi/hssf/record/aggregates/ConditionalFormattingTable.java
@@ -51,8 +51,7 @@ public final class ConditionalFormattingTable extends RecordAggregate {
}
public void visitContainedRecords(RecordVisitor rv) {
- for (int i = 0; i < _cfHeaders.size(); i++) {
- CFRecordsAggregate subAgg = _cfHeaders.get(i);
+ for (CFRecordsAggregate subAgg : _cfHeaders) {
subAgg.visitContainedRecords(rv);
}
}
diff --git a/src/testcases/org/apache/poi/ss/format/TestCellFormatCondition.java b/src/testcases/org/apache/poi/ss/format/TestCellFormatCondition.java
index f1ede1193c..1a56b824a9 100644
--- a/src/testcases/org/apache/poi/ss/format/TestCellFormatCondition.java
+++ b/src/testcases/org/apache/poi/ss/format/TestCellFormatCondition.java
@@ -17,7 +17,6 @@
package org.apache.poi.ss.format;
import junit.framework.TestCase;
-import org.apache.poi.ss.format.CellFormatCondition;
public class TestCellFormatCondition extends TestCase {
public void testSVConditions() {