From cf5cfa87da881d1c20b24fe183008bb73eaa9fb2 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Oct 28 2019 13:10:14 +0000 Subject: Don't use Java APIs removed in Java 9 --- diff --git a/bsh-java-9.patch b/bsh-java-9.patch new file mode 100644 index 0000000..165be5b --- /dev/null +++ b/bsh-java-9.patch @@ -0,0 +1,11 @@ +--- beanshell-2.0b6/src/bsh/util/AWTConsole.java~ 2016-02-05 18:16:07.000000000 +0100 ++++ beanshell-2.0b6/src/bsh/util/AWTConsole.java 2019-10-28 14:07:07.370526037 +0100 +@@ -212,7 +212,7 @@ + We have to get to the peer because TextComponent will refuse to + let us set us set a caret position greater than the text length. + Great. What a piece of crap. +- */ ++ // + public void setCaretPosition( int pos ) { + ((java.awt.peer.TextComponentPeer)getPeer()).setCaretPosition( + pos + countNLs() ); diff --git a/bsh.spec b/bsh.spec index c905c93..5d89316 100644 --- a/bsh.spec +++ b/bsh.spec @@ -48,6 +48,7 @@ Source0: %{name}-2.0-b6.tar.gz Source2: generate-tarball.sh Patch0: %{name}-source-1.6.patch +Patch1: %{name}-java-9.patch BuildRequires: javapackages-local BuildRequires: ant @@ -105,6 +106,7 @@ This package provides %{summary}. %prep %setup -q -n beanshell-%{upstream_version} %patch0 -p1 +%patch1 -p1 sed -i 's,org.apache.xalan.xslt.extensions.Redirect,http://xml.apache.org/xalan/redirect,' docs/manual/xsl/*.xsl