From e93df1c62d5d58e96fe0b2053d29b2d21be134a8 Mon Sep 17 00:00:00 2001 From: Simon Steiner Date: Thu, 4 Apr 2019 13:25:51 +0000 Subject: [PATCH] FOP-2856: Fix findbugs git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1856928 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/java/org/apache/fop/pdf/PDFLinearization.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fop-core/src/main/java/org/apache/fop/pdf/PDFLinearization.java b/fop-core/src/main/java/org/apache/fop/pdf/PDFLinearization.java index fb12d2793..f071c6250 100644 --- a/fop-core/src/main/java/org/apache/fop/pdf/PDFLinearization.java +++ b/fop-core/src/main/java/org/apache/fop/pdf/PDFLinearization.java @@ -225,7 +225,7 @@ public class PDFLinearization { private void sort(List objects) { Collections.sort(objects, new Comparator() { public int compare(PDFObject o1, PDFObject o2) { - return ((Integer) o1.getObjectNumber().getNumber()).compareTo(o2.getObjectNumber().getNumber()); + return Integer.compare(o1.getObjectNumber().getNumber(), o2.getObjectNumber().getNumber()); } }); } @@ -240,7 +240,7 @@ public class PDFLinearization { public void outputPages(OutputStream stream) throws IOException { Collections.sort(doc.pageObjs, new Comparator() { public int compare(PDFPage o1, PDFPage o2) { - return ((Integer) o1.pageIndex).compareTo(o2.pageIndex); + return Integer.compare(o1.pageIndex, o2.pageIndex); } }); doc.objects.addAll(doc.trailerObjects); -- 2.39.5