Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2341] Android: incorrect method parameter binding if first parameter is Object[] and a value is passed for second parameter

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:58:49.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.6.0 M05
ComponentsAndroid
Labelsandroid, android_refactor, defect, kroll, release-1.6.0
ReporterBill Dawson
AssigneeMarshall Culpepper
Created2011-04-15T03:17:11.000+0000
Updated2011-04-17T01:58:49.000+0000

Description

If you look at my fix for #2065, you'll see what I mean. If these conditions are met ...

  • The method has more than one parameter. In the original failcase, the second parameter was optional. setData(Object[], @Kroll.argument(optional=true) KrollDict options).

  • The first parameter is of type Object[], as in the failcase above.

  • The method is called with values supplied for both the first and second parameters.

... then the value bound to the first parameter ends up being an Object[] of the arguments themselves (like old style method calling).

Comments

  1. Marshall Culpepper 2011-04-15

    (from [62132044eb36ad0255fcdf251c1b55ee1913cbeb]) varargs objects are only recognized at the end of the list, allowing Object[] to be correctly filled in the initial part of a method call
    [#2341 state:fixed-in-qa] https://github.com/appcelerator/titanium_mobile/commit/62132044eb36ad0255fcdf251c1b55ee1913cbeb"> https://github.com/appcelerator/titanium_mobile/commit/62132044eb36...

  2. Thomas Huelbert 2011-04-15

    [INFO] Titanium SDK version: 1.6.0 (01/14/11 10:32 43fff62)

JSON Source