summaryrefslogtreecommitdiff
path: root/external/beanshell/java9.patch.0
blob: 824e54286edf074fbd513970b445accd096070cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
--- 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) {
+		}
 	}
 
 	/*