[Libreoffice-commits] core.git: external/beanshell

Stephan Bergmann sbergman at redhat.com
Thu Aug 31 09:58:23 UTC 2017


 external/beanshell/UnpackedTarball_beanshell.mk |    1 +
 external/beanshell/java9.patch.0                |   21 +++++++++++++++++++++
 2 files changed, 22 insertions(+)

New commits:
commit f20810a1318a8dd55cb01e42a0fde7f0e1b36623
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Aug 31 11:47:28 2017 +0200

    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

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() );
+ 	}
+ 
+ 	/*


More information about the Libreoffice-commits mailing list