diff options
author | Noel Grandin <noel@peralex.com> | 2015-10-16 11:52:41 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-10-16 12:50:49 +0200 |
commit | a2fa0ded8acb4e6c6e48f40b8ebe99aafe0f9899 (patch) | |
tree | 4ce6b8458ec3092b9ae324a2c85429ee7c7cb319 /scripting/java | |
parent | 84ec34e08e87da58a995006d4b1c9d298a438485 (diff) |
cid#1326721 to cid#1326726 Dm: Dubious method used
Change-Id: I98e5590f61434ed1b1081b5b592622f9bcf037ec
Diffstat (limited to 'scripting/java')
-rw-r--r-- | scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptEditorForBeanShell.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptEditorForBeanShell.java b/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptEditorForBeanShell.java index deef40e4b801..d63eb84e0c84 100644 --- a/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptEditorForBeanShell.java +++ b/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptEditorForBeanShell.java @@ -59,9 +59,9 @@ public class ScriptEditorForBeanShell implements ScriptEditor, ActionListener { // global ScriptEditorForBeanShell returned for getEditor() calls private static ScriptEditorForBeanShell theScriptEditorForBeanShell; - // global list of ScriptEditors, key is URL of file being edited - private static Map<URL, ScriptEditorForBeanShell> BEING_EDITED = - new HashMap<URL, ScriptEditorForBeanShell>(); + // global list of ScriptEditors, key is [external form of URL] of file being edited + private static Map<String, ScriptEditorForBeanShell> BEING_EDITED = + new HashMap<String, ScriptEditorForBeanShell>(); // template for new BeanShell scripts private static String BSHTEMPLATE; @@ -112,7 +112,7 @@ public class ScriptEditorForBeanShell implements ScriptEditor, ActionListener { */ public static ScriptEditorForBeanShell getEditor(URL url) { synchronized (BEING_EDITED) { - return BEING_EDITED.get(url); + return BEING_EDITED.get(url.toExternalForm()); } } @@ -194,12 +194,12 @@ public class ScriptEditorForBeanShell implements ScriptEditor, ActionListener { ScriptEditorForBeanShell editor; synchronized (BEING_EDITED) { - editor = BEING_EDITED.get(url); + editor = BEING_EDITED.get(url.toExternalForm()); if (editor == null) { editor = new ScriptEditorForBeanShell( context, theCl, url); - BEING_EDITED.put(url, editor); + BEING_EDITED.put(url.toExternalForm(), editor); } } @@ -353,7 +353,7 @@ public class ScriptEditorForBeanShell implements ScriptEditor, ActionListener { private void shutdown() { synchronized (BEING_EDITED) { - BEING_EDITED.remove(scriptURL); + BEING_EDITED.remove(scriptURL.toExternalForm()); } } |