office-gobmx/external/beanshell/java9.patch.0
Fridrich Štrba 53fc42e4be beanshell: don't remove the getPeer call, access it by reflection
Change-Id: I031580c6edd0d80727d940b4fd300308a905a383
2017-09-20 10:49:32 +02:00

25 lines
622 B
Text

--- 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,11 @@
Great. What a piece of crap.
*/
public void setCaretPosition( int pos ) {
- ((java.awt.peer.TextComponentPeer)getPeer()).setCaretPosition(
+ try {
+ ((java.awt.peer.TextComponentPeer)getClass().getMethod("getPeer").invoke(this, null)).setCaretPosition(
pos + countNLs() );
+ } catch (Exception e) {
+ }
}
/*