summaryrefslogtreecommitdiff
path: root/external/beanshell
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-08-31 11:47:28 +0200
committerStephan Bergmann <sbergman@redhat.com>2017-08-31 11:52:50 +0200
commitf20810a1318a8dd55cb01e42a0fde7f0e1b36623 (patch)
treec235a44afa4108ccf0cea249e22cbd33c5b4ea32 /external/beanshell
parent4082b5874adddedf8332fe977b6bb47b6949b302 (diff)
Adapt external/beanshell to Java 9
For one, drop a spurious target="1.5" so that ant instead uses the passed-in JAVA_TARGET_VER (which needs to be 1.6 for Java 9). For another, the deprecated java.awt.Component.getPeer method finally got removed, so bsh.util.AWTConsole would no longer compile. But it looks like that class is not used by us anyway, so just remove the problematic code. (workdir/UnpackedTarball/beanshell/docs/manual/bshmanual.html: "Web Browser Access: After starting the server you can connect your web browser to the port you specified. BeanShell will respond by sending an HTML page offering you a choice of the Swing based JConsole or the older AWTConsole. You may choose whichever is appropriate for your web browser. [...] The bsh.util.AWTConsole is a legacy implementation of the GUI Console using AWT instead of Swing. This console does work, but it is not as slick or pretty as the JConsole. The primary reason it is still here is to support remote access from generic web browsers using only Java 1.1.") Change-Id: I9f1112caebae9a55e4eec7f9baa0114b2254ccda
Diffstat (limited to 'external/beanshell')
-rw-r--r--external/beanshell/UnpackedTarball_beanshell.mk1
-rw-r--r--external/beanshell/java9.patch.021
2 files changed, 22 insertions, 0 deletions
diff --git a/external/beanshell/UnpackedTarball_beanshell.mk b/external/beanshell/UnpackedTarball_beanshell.mk
index f35dd7d794a1..dc0ce6dc6cb5 100644
--- a/external/beanshell/UnpackedTarball_beanshell.mk
+++ b/external/beanshell/UnpackedTarball_beanshell.mk
@@ -18,6 +18,7 @@ $(eval $(call gb_UnpackedTarball_fix_end_of_line,beanshell,\
$(eval $(call gb_UnpackedTarball_add_patches,beanshell,\
external/beanshell/bsh-2.0b1-src.patch \
external/beanshell/beanshell-invoke.patch \
+ external/beanshell/java9.patch.0 \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/beanshell/java9.patch.0 b/external/beanshell/java9.patch.0
new file mode 100644
index 000000000000..2dfd5074afdf
--- /dev/null
+++ b/external/beanshell/java9.patch.0
@@ -0,0 +1,21 @@
+--- build.xml
++++ build.xml
+@@ -176,7 +176,6 @@
+ deprecation="${deprecation}"
+ optimize="on"
+ debug="on"
+- target="1.5"
+ includes="**/*.java"
+ excludes="${excludes},**/bak/**"
+ >
+--- src/bsh/util/AWTConsole.java
++++ src/bsh/util/AWTConsole.java
+@@ -214,8 +214,6 @@
+ Great. What a piece of crap.
+ */
+ public void setCaretPosition( int pos ) {
+- ((java.awt.peer.TextComponentPeer)getPeer()).setCaretPosition(
+- pos + countNLs() );
+ }
+
+ /*