http://bugzilla.novell.com/show_bug.cgi?id=555419
Michal Vyskocil changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |mvyskocil@novell.com
Resolution| |INVALID
--- Comment #1 from Michal Vyskocil 2009-11-16 11:59:04 UTC ---
Your code is not valid. Even if the compiler error message is cryptic, it is
clear - it says there is no method named handle. You might be surprised why, as
you already declared it. The reason is you try to call a *generic* method (and
therefor compiler adds the mess with capture#31 to the error message).
The Java Language Specification [1] says in 8.4.4 Generic Methods: A method is
generic if it declares one or more type variables.
So the simple
- public void handle(T obj) {
+ public <T> void handle(T obj) {
corrects it. For more explanation follow the Generic methods chapter [2] in
Generics Tutorial.
[1] http://java.sun.com/docs/books/jls/third_edition/html/classes.html#40420
[2] http://java.sun.com/docs/books/tutorial/extra/generics/methods.html
--
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.