diff options
author | rbuj <robert.buj@gmail.com> | 2014-07-23 09:08:47 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-07-23 07:57:09 +0000 |
commit | 3c891408eada15276c8e814a895275900bdfd1a1 (patch) | |
tree | bfe5908050a671fa37752394c580b52b2d13f8e2 /external | |
parent | 37594357cb9c46aff7304c669a160ff7ec916a45 (diff) |
beanshell: encode(String) in URLEncoder has been deprecated
http://docs.oracle.com/javase/1.5.0/docs/api/java/net/URLEncoder.html
Change-Id: Ie21fdd12206c7954e99761826f98686c4567aa64
Reviewed-on: https://gerrit.libreoffice.org/10482
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'external')
-rw-r--r-- | external/beanshell/bsh-2.0b1-src.patch | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/external/beanshell/bsh-2.0b1-src.patch b/external/beanshell/bsh-2.0b1-src.patch index 786bc9b7c74e..6162e739d199 100644 --- a/external/beanshell/bsh-2.0b1-src.patch +++ b/external/beanshell/bsh-2.0b1-src.patch @@ -116,3 +116,31 @@ win.toFront(); splashScreen = win; } +--- misc/BeanShell/src/bsh/Remote.java 2003-12-19 17:14:29.000000000 +0100 ++++ misc/build/BeanShell/src/bsh/Remote.java 2014-07-23 08:52:39.000000000 +0200 +@@ -137,13 +137,14 @@ + static String doHttp( String postURL, String text ) + { + String returnValue = null; ++ ++ try { + StringBuffer sb = new StringBuffer(); + sb.append( "bsh.client=Remote" ); + sb.append( "&bsh.script=" ); +- sb.append( URLEncoder.encode( text ) ); ++ sb.append( URLEncoder.encode(text,"UTF-8") ); + String formData = sb.toString( ); + +- try { + URL url = new URL( postURL ); + HttpURLConnection urlcon = + (HttpURLConnection) url.openConnection( ); +@@ -172,6 +173,8 @@ + + System.out.println( "Return Value: "+returnValue ); + ++ } catch (UnsupportedEncodingException e) { ++ System.out.println(e); // bad character encoding + } catch (MalformedURLException e) { + System.out.println(e); // bad postURL + } catch (IOException e2) { |