Hello community, here is the log from the commit of package xmlgraphics-fop for openSUSE:Factory checked in at 2018-04-05 15:36:06 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/xmlgraphics-fop (Old) and /work/SRC/openSUSE:Factory/.xmlgraphics-fop.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "xmlgraphics-fop" Thu Apr 5 15:36:06 2018 rev:34 rq:593750 version:2.1 Changes: -------- --- /work/SRC/openSUSE:Factory/xmlgraphics-fop/xmlgraphics-fop.changes 2017-10-17 01:51:26.317468303 +0200 +++ /work/SRC/openSUSE:Factory/.xmlgraphics-fop.new/xmlgraphics-fop.changes 2018-04-05 15:36:14.658173449 +0200 @@ -1,0 +2,8 @@ +Thu Apr 5 10:13:02 UTC 2018 - fstrba@suse.com + +- Added patch: + * java8-compatibility.patch + + Fix compatibility with java8 and lower when built with java9 + or higher + +------------------------------------------------------------------- New: ---- java8-compatibility.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ xmlgraphics-fop.spec ++++++ --- /var/tmp/diff_new_pack.qW4nhs/_old 2018-04-05 15:36:16.214117218 +0200 +++ /var/tmp/diff_new_pack.qW4nhs/_new 2018-04-05 15:36:16.226116784 +0200 @@ -1,7 +1,7 @@ # # spec file for package xmlgraphics-fop # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2000-2008, JPackage Project # # All modifications and additions to the file contributed by third parties @@ -39,6 +39,7 @@ Patch1: xmlgraphics-fop-cli.patch Patch2: hyphenation-more-stack.patch Patch3: fix-javadoc-java8.patch +Patch4: java8-compatibility.patch BuildRequires: ant >= 1.6.5 BuildRequires: apache-commons-io >= 2.4 BuildRequires: apache-commons-logging @@ -88,6 +89,7 @@ %patch1 -p1 -b .cli %patch2 -p1 %patch3 -p1 +%patch4 -p1 cp %{SOURCE2} %{SOURCE3} %{SOURCE4} . # Replace keyword "VERSION" in XML files with the real one: ++++++ java8-compatibility.patch ++++++ --- fop-2.1/src/java/org/apache/fop/fo/FOText.java 2016-01-07 15:13:29.000000000 +0100 +++ fop-2.1/src/java/org/apache/fop/fo/FOText.java 2018-04-05 12:06:45.984476031 +0200 @@ -20,6 +20,7 @@ package org.apache.fop.fo; import java.awt.Color; +import java.nio.Buffer; import java.nio.CharBuffer; import java.text.CharacterIterator; import java.text.StringCharacterIterator; @@ -120,7 +121,7 @@ charBuffer = CharBuffer.allocate(newLength); } else { // allocate a larger buffer, and transfer contents - int requires = charBuffer.position() + length; + int requires = ((Buffer)charBuffer).position() + length; int capacity = charBuffer.capacity(); if (requires > capacity) { int newCapacity = capacity * 2; @@ -134,11 +135,11 @@ } } // extend limit to capacity - charBuffer.limit(charBuffer.capacity()); + ((Buffer)charBuffer).limit(charBuffer.capacity()); // append characters charBuffer.put(data, start, length); // shrink limit to position - charBuffer.limit(charBuffer.position()); + ((Buffer)charBuffer).limit(((Buffer)charBuffer).position()); } /** @@ -162,7 +163,7 @@ // not really removing, just make sure the char buffer // pointed to is really a different one if (charBuffer != null) { - ft.charBuffer = CharBuffer.allocate(charBuffer.limit()); + ft.charBuffer = CharBuffer.allocate(((Buffer)charBuffer).limit()); charBuffer.rewind(); ft.charBuffer.put(charBuffer); ft.charBuffer.rewind(); @@ -219,7 +220,7 @@ */ public boolean willCreateArea() { if (whiteSpaceCollapse == Constants.EN_FALSE - && charBuffer.limit() > 0) { + && ((Buffer)charBuffer).limit() > 0) { return true; } @@ -278,7 +279,7 @@ charBuffer.rewind(); CharBuffer tmp = charBuffer.slice(); char c; - int lim = charBuffer.limit(); + int lim = ((Buffer)charBuffer).limit(); int pos = -1; while (++pos < lim) { c = charBuffer.get(); @@ -522,13 +523,13 @@ /** {@inheritDoc} */ public boolean hasNext() { - return (this.currentPosition < charBuffer.limit()); + return (this.currentPosition < ((Buffer)charBuffer).limit()); } /** {@inheritDoc} */ public char nextChar() { - if (this.currentPosition < charBuffer.limit()) { + if (this.currentPosition < ((Buffer)charBuffer).limit()) { this.canRemove = true; this.canReplace = true; return charBuffer.get(currentPosition++); @@ -542,11 +543,11 @@ public void remove() { if (this.canRemove) { - charBuffer.position(currentPosition); + ((Buffer)charBuffer).position(currentPosition); // Slice the buffer at the current position CharBuffer tmp = charBuffer.slice(); // Reset position to before current character - charBuffer.position(--currentPosition); + ((Buffer)charBuffer).position(--currentPosition); if (tmp.hasRemaining()) { // Transfer any remaining characters charBuffer.mark(); @@ -554,7 +555,7 @@ charBuffer.reset(); } // Decrease limit - charBuffer.limit(charBuffer.limit() - 1); + ((Buffer)charBuffer).limit(((Buffer)charBuffer).limit() - 1); // Make sure following calls fail, unless nextChar() was called this.canRemove = false; } else { @@ -729,7 +730,7 @@ /** {@inheritDoc} */ public int length() { - return charBuffer.limit(); + return ((Buffer)charBuffer).limit(); } /**