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.7
Milestone: Jython 2.7.1
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: zyasoft Nosy List: edwar187, fwierzbicki, zyasoft
Priority: low Keywords:

Created on 2011-07-25.13:23:00 by edwar187, last changed 2016-01-13.22:56:49 by zyasoft.

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
msg10593 (view) Author: Jim Baker (zyasoft) Date: 2016-01-06.18:59:16
Related to #2423
msg10594 (view) Author: Jim Baker (zyasoft) Date: 2016-01-06.21:43:09
Fixed as of https://hg.python.org/jython/rev/49d498968f34
History
Date User Action Args
2016-01-13 22:56:49zyasoftsetstatus: pending -> closed
2016-01-06 21:43:10zyasoftsetstatus: open -> pending
assignee: zyasoft
resolution: fixed
messages: + msg10594
2016-01-06 18:59:17zyasoftsetnosy: + zyasoft
milestone: Jython 2.7.1
messages: + msg10593
versions: + Jython 2.7, - Jython 2.5
2013-02-25 19:21:35fwierzbickisetpriority: low
nosy: + fwierzbicki
versions: + Jython 2.5, - 2.5.2
2011-07-25 13:23:00edwar187create