Skip to content

Commit

Permalink
PDFBOX-5660: replace lambda with method reference
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1923548 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
THausherr committed Feb 4, 2025
1 parent 7af7c20 commit 48afe5f
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,10 @@ private List<String> getStringsFromStream(PDField field) throws IOException
// trimming as Acrobat adds spaces to strings
// where we don't
return tokens.stream() //
.filter(t -> t instanceof COSString) //
.map(t -> ((COSString) t).getString().trim()) //
.filter(COSString.class::isInstance) //
.map(COSString.class::cast) //
.map(COSString::getString) //
.map(String::trim) //
.collect(Collectors.toList());
}
}

0 comments on commit 48afe5f

Please sign in to comment.