You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ti...@apache.org on 2020/04/01 13:03:20 UTC

svn commit: r1876003 - /pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/common/COSArrayListTest.java

Author: tilman
Date: Wed Apr  1 13:03:19 2020
New Revision: 1876003

URL: http://svn.apache.org/viewvc?rev=1876003&view=rev
Log:
PDFBOX-4071: use functional syntax

Modified:
    pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/common/COSArrayListTest.java

Modified: pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/common/COSArrayListTest.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/common/COSArrayListTest.java?rev=1876003&r1=1876002&r2=1876003&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/common/COSArrayListTest.java (original)
+++ pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/common/COSArrayListTest.java Wed Apr  1 13:03:19 2020
@@ -265,12 +265,8 @@ public class COSArrayListTest {
     public void removeFromFilteredListByIndex() throws Exception {
         // retrieve all annotations from page but the link annotation
         // which is 2nd in list - see above setup
-        AnnotationFilter annotsFilter = new AnnotationFilter() {
-            @Override
-            public boolean accept(PDAnnotation annotation) {
-                return !(annotation instanceof PDAnnotationLink);
-            }
-        };
+        AnnotationFilter annotsFilter =
+                (PDAnnotation annotation) -> !(annotation instanceof PDAnnotationLink);
 
         COSArrayList<PDAnnotation> cosArrayList = (COSArrayList<PDAnnotation>) pdPage.getAnnotations(annotsFilter);
 
@@ -282,12 +278,8 @@ public class COSArrayListTest {
     public void removeFromFilteredListByObject() throws Exception {
         // retrieve all annotations from page but the link annotation
         // which is 2nd in list - see above setup
-        AnnotationFilter annotsFilter = new AnnotationFilter() {
-            @Override
-            public boolean accept(PDAnnotation annotation) {
-                return !(annotation instanceof PDAnnotationLink);
-            }
-        };
+        AnnotationFilter annotsFilter =
+                (PDAnnotation annotation) -> !(annotation instanceof PDAnnotationLink);
 
         COSArrayList<PDAnnotation> cosArrayList = (COSArrayList<PDAnnotation>) pdPage.getAnnotations(annotsFilter);