Skip to content

Commit 41d3f9a

Browse files
committed
PDFBOX-6206: remove unneeded throws
git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1934693 13f79535-47bb-0310-9956-ffa450edef68
1 parent 84f313e commit 41d3f9a

3 files changed

Lines changed: 6 additions & 9 deletions

File tree

pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPage.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -775,10 +775,8 @@ public void setTransition(PDTransition transition, float duration)
775775
*
776776
* @return List of the PDAnnotation objects, never null. The returned list is backed by the
777777
* annotations COSArray, so any adding or deleting in this list will change the document too.
778-
*
779-
* @throws IOException If there is an error while creating the annotation list.
780778
*/
781-
public List<PDAnnotation> getAnnotations() throws IOException
779+
public List<PDAnnotation> getAnnotations()
782780
{
783781
return getAnnotations(annotation -> true);
784782
}

pdfbox/src/test/java/org/apache/pdfbox/pdmodel/TestPDPageAnnotationsFiltering.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import static org.junit.jupiter.api.Assertions.assertEquals;
2020
import static org.junit.jupiter.api.Assertions.assertTrue;
2121

22-
import java.io.IOException;
2322
import java.util.List;
2423

2524
import org.apache.pdfbox.cos.COSArray;
@@ -57,7 +56,7 @@ void initMock()
5756
}
5857

5958
@Test
60-
void validateNoFiltering() throws IOException
59+
void validateNoFiltering()
6160
{
6261
List<PDAnnotation> annotations = page.getAnnotations();
6362
assertEquals(3, annotations.size());
@@ -67,14 +66,14 @@ void validateNoFiltering() throws IOException
6766
}
6867

6968
@Test
70-
void validateAllFiltered() throws IOException
69+
void validateAllFiltered()
7170
{
7271
List<PDAnnotation> annotations = page.getAnnotations(annotation -> false);
7372
assertEquals(0, annotations.size());
7473
}
7574

7675
@Test
77-
void validateSelectedFew() throws IOException
76+
void validateSelectedFew()
7877
{
7978
List<PDAnnotation> annotations = page.getAnnotations(annotation ->
8079
(annotation instanceof PDAnnotationLink || annotation instanceof PDAnnotationSquare));

pdfbox/src/test/java/org/apache/pdfbox/pdmodel/common/COSArrayListTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ void removeAllMultipleFromListByObject()
275275
}
276276

277277
@Test
278-
void removeFromFilteredListByIndex() throws IOException
278+
void removeFromFilteredListByIndex()
279279
{
280280
// retrieve all annotations from page but the link annotation
281281
// which is 2nd in list - see above setup
@@ -288,7 +288,7 @@ void removeFromFilteredListByIndex() throws IOException
288288
}
289289

290290
@Test
291-
void removeFromFilteredListByObject() throws IOException
291+
void removeFromFilteredListByObject()
292292
{
293293
// retrieve all annotations from page but the link annotation
294294
// which is 2nd in list - see above setup

0 commit comments

Comments
 (0)