JamesLuoau / gwt-ent

Automatically exported from code.google.com/p/gwt-ent
0 stars 0 forks source link

Reflection does not work using generics #3

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a class that has a field of a generic type; e.g.: private
List<String> names; 
2. add a getter / setter
3. add: implements Reflection

What is the expected output? What do you see instead?
Reflection should work as expected.
It brings a compile error at runtime:

[ERROR] Errors in 'transient source for
com.gwtent.client.reflection.TypeOracle_Visitor'
[ERROR] Line 1435: T cannot be resolved to a type

which is in generated code:
return (Object)content.toArray(((T extends java.lang.Object[])args[0]));

What version of the product are you using? On what operating system?
Windows XP SP3, GET 1.5.3, GWT ENT 0.5

Please provide any additional information below.
It can be reproduced by a simple example.

Original issue reported on code.google.com by georgraf...@gmail.com on 26 Jan 2009 at 7:13

GoogleCodeExporter commented 9 years ago
This is critical because generics are not usable

Original comment by flavius....@gmail.com on 4 Mar 2009 at 11:55

GoogleCodeExporter commented 9 years ago
Thank you guys.
This issue fixed, please see 
com.gwtent.client.test.reflection.ReflectionTestCase
for more information.

http://code.google.com/p/gwt-ent/source/browse/trunk/gwtent/test/com/gwtent/clie
nt/test/reflection/ReflectionTestCase.java

Original comment by JamesLuo...@gmail.com on 7 Mar 2009 at 5:16