[armedbear-cvs] r12160 - trunk/abcl/src/org/armedbear/lisp/scripting
Alessio Stalla
astalla at common-lisp.net
Sun Sep 20 21:12:23 UTC 2009
Author: astalla
Date: Sun Sep 20 17:12:22 2009
New Revision: 12160
Log:
JSR-223: methods returning lists in the script engine factory now return immutable lists.
Thanks to Clemens Blamauer.
Modified:
trunk/abcl/src/org/armedbear/lisp/scripting/AbclScriptEngineFactory.java
Modified: trunk/abcl/src/org/armedbear/lisp/scripting/AbclScriptEngineFactory.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/scripting/AbclScriptEngineFactory.java (original)
+++ trunk/abcl/src/org/armedbear/lisp/scripting/AbclScriptEngineFactory.java Sun Sep 20 17:12:22 2009
@@ -21,6 +21,7 @@
package org.armedbear.lisp.scripting;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
import javax.script.ScriptEngine;
@@ -44,7 +45,7 @@
public List<String> getExtensions() {
List<String> extensions = new ArrayList<String>(1);
extensions.add("lisp");
- return extensions;
+ return Collections.unmodifiableList(extensions);
}
@Override
@@ -89,7 +90,7 @@
@Override
public List<String> getMimeTypes() {
- return new ArrayList<String>();
+ return Collections.unmodifiableList(new ArrayList<String>());
}
@Override
@@ -99,7 +100,7 @@
names.add("cl");
names.add("Lisp");
names.add("Common Lisp");
- return names;
+ return Collections.unmodifiableList(names);
}
@Override
More information about the armedbear-cvs
mailing list