Community
Participate
Working Groups
The built-in compiler in JDT allows me to implement an Generic interface multiple times with different arguments, for example: interface Handler<T> { void handle(T foo); } class MultiHandler implements Handler<String>, Handler<Integer> { public void handle(String foo) { System.out.println("Handling String..."); } public void handle(Integer foo) { System.out.println("Handling Integer..."); } } This compiles cleanly with no warnings in Eclipse JDT, but is not legal Java. The resulting classfile cannot be run in the Sun JVM.
Sorry, this is in 3.1 M4
The compiler now reports: ---------- 1. ERROR in c:\tests_sources\X.java (at line 4) class X implements Handler<String>, Handler<Integer> { ^ Duplicate interface Handler<T> for the type X ---------- 1 problem
*** This bug has been marked as a duplicate of 81824 ***