From: <fwi...@us...> - 2009-04-10 03:53:10
|
Revision: 6200 http://jython.svn.sourceforge.net/jython/?rev=6200&view=rev Author: fwierzbicki Date: 2009-04-10 03:53:07 +0000 (Fri, 10 Apr 2009) Log Message: ----------- Fix ClassCastException when not PySequence and not List. Modified Paths: -------------- branches/newlist/src/org/python/core/PyList.java Modified: branches/newlist/src/org/python/core/PyList.java =================================================================== --- branches/newlist/src/org/python/core/PyList.java 2009-04-10 03:49:01 UTC (rev 6199) +++ branches/newlist/src/org/python/core/PyList.java 2009-04-10 03:53:07 UTC (rev 6200) @@ -129,11 +129,13 @@ if (stop < start) { stop = start; } - if ((value instanceof PySequence) || (!(value instanceof List))) { + if (value instanceof PySequence) { if (value == this) { // copy value = new PyList((PySequence) value); } setsliceIterator(start, stop, step, value.asIterable().iterator()); + } else if (!(value instanceof List)) { + setsliceIterator(start, stop, step, value.asIterable().iterator()); } else { System.err.println("List"); List valueList = (List) value.__tojava__(List.class); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |