aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/poi/hssf/model/InternalSheet.java
diff options
context:
space:
mode:
authorAndreas Beeker <kiwiwings@apache.org>2015-09-30 23:06:39 +0000
committerAndreas Beeker <kiwiwings@apache.org>2015-09-30 23:06:39 +0000
commitfad6546d8a8172aaf197a95a4af086a387390fbb (patch)
treecb5dfa581dceb06959b03e825e6a1ea53c22c770 /src/java/org/apache/poi/hssf/model/InternalSheet.java
parent5366f02c2c317bc6ddf65a9c9d9d33136c38bf49 (diff)
downloadpoi-fad6546d8a8172aaf197a95a4af086a387390fbb.tar.gz
poi-fad6546d8a8172aaf197a95a4af086a387390fbb.zip
sonar fixes
Very interesting was the exception swallowing in PackagePropertiesPart. When it was properly thrown, it already led to various errors in the junits test - I've fixed the handling for at least the ones which are in our test set git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1706169 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/poi/hssf/model/InternalSheet.java')
-rw-r--r--src/java/org/apache/poi/hssf/model/InternalSheet.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/java/org/apache/poi/hssf/model/InternalSheet.java b/src/java/org/apache/poi/hssf/model/InternalSheet.java
index c6d0ae51c9..cbb921b2f7 100644
--- a/src/java/org/apache/poi/hssf/model/InternalSheet.java
+++ b/src/java/org/apache/poi/hssf/model/InternalSheet.java
@@ -164,7 +164,7 @@ public final class InternalSheet {
int dimsloc = -1;
if (rs.peekNextSid() != BOFRecord.sid) {
- throw new RuntimeException("BOF record expected");
+ throw new RecordFormatException("BOF record expected");
}
BOFRecord bof = (BOFRecord) rs.getNext();
@@ -210,7 +210,7 @@ public final class InternalSheet {
if (RecordOrderer.isRowBlockRecord(recSid)) {
//only add the aggregate once
if (rra != null) {
- throw new RuntimeException("row/cell records found in the wrong place");
+ throw new RecordFormatException("row/cell records found in the wrong place");
}
RowBlocksReader rbr = new RowBlocksReader(rs);
_mergedCellsTable.addRecords(rbr.getLooseMergedCells());
@@ -332,7 +332,7 @@ public final class InternalSheet {
records.add(rec);
}
if (windowTwo == null) {
- throw new RuntimeException("WINDOW2 was not found");
+ throw new RecordFormatException("WINDOW2 was not found");
}
if (_dimensions == null) {
// Excel seems to always write the DIMENSION record, but tolerates when it is not present
@@ -393,7 +393,7 @@ public final class InternalSheet {
try {
_destList.add((Record)r.clone());
} catch (CloneNotSupportedException e) {
- throw new RuntimeException(e);
+ throw new RecordFormatException(e);
}
}
}
@@ -423,7 +423,7 @@ public final class InternalSheet {
Record rec = (Record) ((Record) rb).clone();
clonedRecords.add(rec);
} catch (CloneNotSupportedException e) {
- throw new RuntimeException(e);
+ throw new RecordFormatException(e);
}
}
return createSheet(new RecordStream(clonedRecords, 0));