Author: sebb Date: Tue Mar 24 23:53:47 2009 New Revision: 758094 URL: http://svn.apache.org/viewvc?rev=758094&view=rev Log: iterator.next() can throw an Error
Modified: jakarta/bsf/trunk/bsf3/bsf-api/src/main/java/javax/script/ScriptEngineManager.java Modified: jakarta/bsf/trunk/bsf3/bsf-api/src/main/java/javax/script/ScriptEngineManager.java URL: http://svn.apache.org/viewvc/jakarta/bsf/trunk/bsf3/bsf-api/src/main/java/javax/script/ScriptEngineManager.java?rev=758094&r1=758093&r2=758094&view=diff ============================================================================== --- jakarta/bsf/trunk/bsf3/bsf-api/src/main/java/javax/script/ScriptEngineManager.java (original) +++ jakarta/bsf/trunk/bsf3/bsf-api/src/main/java/javax/script/ScriptEngineManager.java Tue Mar 24 23:53:47 2009 @@ -69,10 +69,9 @@ while (iterator.hasNext()) { ScriptEngineFactory factory; - final Object item = iterator.next(); - if (item instanceof ScriptEngineFactory){ - factory = (ScriptEngineFactory) item; - } else { + try { + factory = (ScriptEngineFactory) iterator.next(); + } catch (Error ignored) { continue; } engineSpis.add(factory); --------------------------------------------------------------------- To unsubscribe, e-mail: bsf-dev-unsubscr...@jakarta.apache.org For additional commands, e-mail: bsf-dev-h...@jakarta.apache.org