aboutsummaryrefslogtreecommitdiffstats
path: root/src/scratchpad/testcases/org/apache/poi/hslf/model/TestSheet.java
diff options
context:
space:
mode:
authorJosh Micich <josh@apache.org>2009-08-18 19:49:28 +0000
committerJosh Micich <josh@apache.org>2009-08-18 19:49:28 +0000
commit27b61f396a324f7e7882a7e9bbf80c60cef573a0 (patch)
treecb4869ab9298a8676d18d5385d8e84aa5e850a66 /src/scratchpad/testcases/org/apache/poi/hslf/model/TestSheet.java
parenta2cd9a942e1cc575254690ea4b7e9053cade05b3 (diff)
downloadpoi-27b61f396a324f7e7882a7e9bbf80c60cef573a0.tar.gz
poi-27b61f396a324f7e7882a7e9bbf80c60cef573a0.zip
Fixed compiler warnings - unnecessary throws declaration
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@805552 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/scratchpad/testcases/org/apache/poi/hslf/model/TestSheet.java')
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hslf/model/TestSheet.java14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/model/TestSheet.java b/src/scratchpad/testcases/org/apache/poi/hslf/model/TestSheet.java
index 0282c2a7e6..667478b043 100644
--- a/src/scratchpad/testcases/org/apache/poi/hslf/model/TestSheet.java
+++ b/src/scratchpad/testcases/org/apache/poi/hslf/model/TestSheet.java
@@ -17,6 +17,7 @@
package org.apache.poi.hslf.model;
+import junit.framework.AssertionFailedError;
import junit.framework.TestCase;
import java.io.FileInputStream;
@@ -34,7 +35,7 @@ import org.apache.poi.hslf.usermodel.SlideShow;
*
* @author Yegor Kozlov
*/
-public final class TestSheet extends TestCase{
+public final class TestSheet extends TestCase {
/**
* For each ppt in the test directory check that all sheets are properly initialized
@@ -59,7 +60,7 @@ public final class TestSheet extends TestCase{
}
}
- private void doSlideShow(SlideShow ppt) throws Exception {
+ private void doSlideShow(SlideShow ppt) {
Slide[] slide = ppt.getSlides();
for (int i = 0; i < slide.length; i++) {
verify(slide[i]);
@@ -89,19 +90,22 @@ public final class TestSheet extends TestCase{
assertTrue(sheet._getSheetRefId() != 0);
TextRun[] txt = sheet.getTextRuns();
- assertTrue(txt != null);
+ if (txt == null) {
+ throw new AssertionFailedError("no text runs");
+ }
for (int i = 0; i < txt.length; i++) {
assertNotNull(txt[i].getSheet());
}
Shape[] shape = sheet.getShapes();
- assertTrue(shape != null);
+ if (shape == null) {
+ throw new AssertionFailedError("no shapes");
+ }
for (int i = 0; i < shape.length; i++) {
assertNotNull(shape[i].getSpContainer());
assertNotNull(shape[i].getSheet());
assertNotNull(shape[i].getShapeName());
assertNotNull(shape[i].getAnchor());
}
-
}
}