Kaydet (Commit) 53fc42e4 authored tarafından Fridrich Štrba's avatar Fridrich Štrba

beanshell: don't remove the getPeer call, access it by reflection

Change-Id: I031580c6edd0d80727d940b4fd300308a905a383
üst 81109314
...@@ -10,12 +10,16 @@ ...@@ -10,12 +10,16 @@
> >
--- src/bsh/util/AWTConsole.java --- src/bsh/util/AWTConsole.java
+++ src/bsh/util/AWTConsole.java +++ src/bsh/util/AWTConsole.java
@@ -214,8 +214,6 @@ @@ -214,8 +214,11 @@
Great. What a piece of crap. Great. What a piece of crap.
*/ */
public void setCaretPosition( int pos ) { public void setCaretPosition( int pos ) {
- ((java.awt.peer.TextComponentPeer)getPeer()).setCaretPosition( - ((java.awt.peer.TextComponentPeer)getPeer()).setCaretPosition(
- pos + countNLs() ); + try {
+ ((java.awt.peer.TextComponentPeer)getClass().getMethod("getPeer").invoke(this, null)).setCaretPosition(
pos + countNLs() );
+ } catch (Exception e) {
+ }
} }
/* /*
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment