This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 108279 - Generated code for arrays is not compilable
Summary: Generated code for arrays is not compilable
Status: VERIFIED FIXED
Alias: None
Product: javame
Classification: Unclassified
Component: Web Services (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Petr Suchomel
URL:
Keywords:
Depends on: 108628
Blocks: 109140
  Show dependency tree
 
Reported: 2007-06-27 13:13 UTC by Michal Skvor
Modified: 2007-10-12 16:50 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
web project (34.13 KB, application/octet-stream)
2007-09-11 16:19 UTC, Lukas Hasik
Details
generated mobile part (13.94 KB, text/plain)
2007-09-11 16:25 UTC, Lukas Hasik
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michal Skvor 2007-06-27 13:13:40 UTC
Generated code for arrays is not generated properly.
Comment 1 Jiri Prazak 2007-06-27 18:03:30 UTC
I take it you mean that methods which return arrays are not shown in the tree where you select what you want to generate
for.  At least that is what I'm seeing since I cannot find any even though the classes have them.
Comment 2 Jiri Prazak 2007-07-02 14:04:35 UTC
It throws an exception for a byte array, but also generates wrong code for other types of arrays, e.g. int[]
Comment 3 Jiri Prazak 2007-07-02 15:39:29 UTC
i have tracked down the problem down to the following:

we are trying to get a component type in the template

out.writeShort(${registry.getRegisteredTypeId( type.getComponentType())});

which in this case is byte but that type is not in the class data registry.  The problem is that only byte[] is in the
class data registry but not its component type.  If I use byte alone anywhere in the web project it gets added and the
exception does not occur.  So the problem is in the ArrayTypeSerializer, it should add array component type to the
registry automatically.  Fix in progress.
Comment 4 Jiri Prazak 2007-08-06 03:06:40 UTC
the problem mentioned is fixed, but there are still some issues such as incompatible object types.  Problem is in the
primitive type serializer.  Fix in progress.
Comment 5 Jiri Prazak 2007-08-27 11:04:08 UTC
fixed
Comment 6 Lukas Hasik 2007-09-11 16:14:21 UTC
the generated code for arrays is not working. I'm attaching the web app project.
The methods returning arrays are in package "echo.arrays"
In "test0911.arrays" package is the code generated by MC2WA
Comment 7 Lukas Hasik 2007-09-11 16:19:45 UTC
Created attachment 48583 [details]
web project
Comment 8 Lukas Hasik 2007-09-11 16:25:21 UTC
Created attachment 48586 [details]
generated mobile part
Comment 9 Petr Suchomel 2007-09-11 17:31:44 UTC
Thanks for testcase. I doubt if multidimensional arrays are supported, simple arrays support should be fixed
Comment 10 Michal Skvor 2007-09-12 15:28:19 UTC
Fixed. Seems to be working for multidimensional arrays.
Comment 11 Lukas Hasik 2007-10-12 16:50:21 UTC
verified in 20071012030351