Accepting request 733686 from Java:packages
Restore compatibility with Java 8 OBS-URL: https://build.opensuse.org/request/show/733686 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/jline?expand=0&rev=24
This commit is contained in:
commit
d84a4b1340
67
jline-java8compat.patch
Normal file
67
jline-java8compat.patch
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
diff -urEbwB jline2-jline-2.14.6/src/main/java/jline/internal/InputStreamReader.java jline2-jline-2.14.6.new/src/main/java/jline/internal/InputStreamReader.java
|
||||||
|
--- jline2-jline-2.14.6/src/main/java/jline/internal/InputStreamReader.java 2018-03-26 11:14:37.000000000 +0200
|
||||||
|
+++ jline2-jline-2.14.6.new/src/main/java/jline/internal/InputStreamReader.java 2019-09-27 09:31:17.518979605 +0200
|
||||||
|
@@ -13,6 +13,7 @@
|
||||||
|
import java.io.OutputStreamWriter;
|
||||||
|
import java.io.Reader;
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
|
+import java.nio.Buffer;
|
||||||
|
import java.nio.ByteBuffer;
|
||||||
|
import java.nio.CharBuffer;
|
||||||
|
import java.nio.charset.Charset;
|
||||||
|
@@ -68,7 +69,7 @@
|
||||||
|
decoder = Charset.defaultCharset().newDecoder().onMalformedInput(
|
||||||
|
CodingErrorAction.REPLACE).onUnmappableCharacter(
|
||||||
|
CodingErrorAction.REPLACE);
|
||||||
|
- bytes.limit(0);
|
||||||
|
+ ((Buffer)bytes).limit(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
@@ -101,7 +102,7 @@
|
||||||
|
throw (UnsupportedEncodingException)
|
||||||
|
new UnsupportedEncodingException(enc).initCause(e);
|
||||||
|
}
|
||||||
|
- bytes.limit(0);
|
||||||
|
+ ((Buffer)bytes).limit(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
@@ -118,7 +119,7 @@
|
||||||
|
dec.averageCharsPerByte();
|
||||||
|
this.in = in;
|
||||||
|
decoder = dec;
|
||||||
|
- bytes.limit(0);
|
||||||
|
+ ((Buffer)bytes).limit(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
@@ -136,7 +137,7 @@
|
||||||
|
decoder = charset.newDecoder().onMalformedInput(
|
||||||
|
CodingErrorAction.REPLACE).onUnmappableCharacter(
|
||||||
|
CodingErrorAction.REPLACE);
|
||||||
|
- bytes.limit(0);
|
||||||
|
+ ((Buffer)bytes).limit(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
@@ -262,7 +263,7 @@
|
||||||
|
} else if (was_red == 0) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
- bytes.limit(bytes.limit() + was_red);
|
||||||
|
+ ((Buffer)bytes).limit(bytes.limit() + was_red);
|
||||||
|
needInput = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -273,8 +274,8 @@
|
||||||
|
// compact the buffer if no space left
|
||||||
|
if (bytes.limit() == bytes.capacity()) {
|
||||||
|
bytes.compact();
|
||||||
|
- bytes.limit(bytes.position());
|
||||||
|
- bytes.position(0);
|
||||||
|
+ ((Buffer)bytes).limit(bytes.position());
|
||||||
|
+ ((Buffer)bytes).position(0);
|
||||||
|
}
|
||||||
|
needInput = true;
|
||||||
|
} else {
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Sep 27 07:34:45 UTC 2019 - Fridrich Strba <fstrba@suse.com>
|
||||||
|
|
||||||
|
- Added patch:
|
||||||
|
* jline-java8compat.patch
|
||||||
|
+ build binaries compatible with Java 8
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Jun 27 09:06:19 UTC 2019 - Fridrich Strba <fstrba@suse.com>
|
Thu Jun 27 09:06:19 UTC 2019 - Fridrich Strba <fstrba@suse.com>
|
||||||
|
|
||||||
|
@ -25,6 +25,7 @@ Group: Development/Libraries/Java
|
|||||||
URL: https://github.com/jline/jline2
|
URL: https://github.com/jline/jline2
|
||||||
Source0: https://github.com/jline/jline2/archive/jline-%{version}.tar.gz
|
Source0: https://github.com/jline/jline2/archive/jline-%{version}.tar.gz
|
||||||
Source1: %{name}-build.xml
|
Source1: %{name}-build.xml
|
||||||
|
Patch0: jline-java8compat.patch
|
||||||
BuildRequires: ant
|
BuildRequires: ant
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: hawtjni-runtime
|
BuildRequires: hawtjni-runtime
|
||||||
@ -50,6 +51,7 @@ This package contains the API documentation for %{name}.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n jline2-jline-%{version}
|
%setup -q -n jline2-jline-%{version}
|
||||||
|
%patch0 -p1
|
||||||
%pom_change_dep org.fusesource.jansi:jansi org.fusesource.jansi:jansi:1.12
|
%pom_change_dep org.fusesource.jansi:jansi org.fusesource.jansi:jansi:1.12
|
||||||
cp %{SOURCE1} build.xml
|
cp %{SOURCE1} build.xml
|
||||||
mkdir -p lib
|
mkdir -p lib
|
||||||
|
Loading…
Reference in New Issue
Block a user