WaE: C6011 Dereferencing NULL pointer warnings
[LibreOffice.git] / external / beanshell / java9.patch.0
blob824e54286edf074fbd513970b445accd096070cf
1 --- build.xml
2 +++ build.xml
3 @@ -176,7 +176,6 @@
4                         deprecation="${deprecation}"
5                         optimize="on"
6                         debug="on"
7 -      target="1.5"
8                         includes="**/*.java"
9                         excludes="${excludes},**/bak/**"
10                 >
11 --- src/bsh/util/AWTConsole.java
12 +++ src/bsh/util/AWTConsole.java
13 @@ -214,8 +214,11 @@
14                 Great.  What a piece of crap.
15         */
16         public void setCaretPosition( int pos ) {
17 -               ((java.awt.peer.TextComponentPeer)getPeer()).setCaretPosition( 
18 +               try {
19 +                       ((java.awt.peer.TextComponentPeer)getClass().getMethod("getPeer").invoke(this, null)).setCaretPosition( 
20                         pos + countNLs() );
21 +               } catch (Exception e) {
22 +               }
23         }
25         /*