summaryrefslogtreecommitdiffstats
path: root/fop-core
diff options
context:
space:
mode:
authorSimon Steiner <ssteiner@apache.org>2019-04-04 13:25:51 +0000
committerSimon Steiner <ssteiner@apache.org>2019-04-04 13:25:51 +0000
commite93df1c62d5d58e96fe0b2053d29b2d21be134a8 (patch)
tree88cbcfe17a08fb4ab979623f1b05fc3e1c17702a /fop-core
parent952fd288d2549afe62151790584004c4cc7bf92e (diff)
downloadxmlgraphics-fop-e93df1c62d5d58e96fe0b2053d29b2d21be134a8.tar.gz
xmlgraphics-fop-e93df1c62d5d58e96fe0b2053d29b2d21be134a8.zip
FOP-2856: Fix findbugs
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1856928 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'fop-core')
-rw-r--r--fop-core/src/main/java/org/apache/fop/pdf/PDFLinearization.java4
1 files 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<PDFObject> objects) {
Collections.sort(objects, new Comparator<PDFObject>() {
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<PDFPage>() {
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);