Issue1780

classification
Title: jarray not properly converted to list with java.util.Arrays.asList(T... a)
Type: behaviour Severity: major
Components: Core Versions: Jython 2.5
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: edwar187, fwierzbicki
Priority: low Keywords:

Created on 2011-07-25.13:23:00 by edwar187, last changed 2013-02-25.19:21:35 by fwierzbicki.

Messages
msg6583 (view) Author: Kevin Edwards (edwar187) Date: 2011-07-25.13:23:00
The arguments to java.util.Arrays.asList(T... a) get treated as a single item instead of a series of items. This is does not match previous versions of Jython or how it works in native Java.

#Jython 2.5.2
import jarray
b = jarray().array([1, 2, 3, 4, 5], Integer)
a = java.util.Arrays.asList(b)
print a    #[[Ljava.lang.Integer;@676825b5]
print b.__class__   # <type 'array.array'>

#Jython 2.1
import jarray
b = jarray().array([1, 2, 3, 4, 5], Integer)
a = java.util.Arrays.asList(b)
print a   # [1, 2, 3, 4, 5]
print b.__class__ # org.python.core.PyArray
History
Date User Action Args
2013-02-25 19:21:35fwierzbickisetpriority: low
nosy: + fwierzbicki
versions: + Jython 2.5, - 2.5.2
2011-07-25 13:23:00edwar187create