Community
Participate
Working Groups
Created attachment 106686 [details] Java source files for this issue Build ID: I20080617-2000 Steps To Reproduce: 1.Create an interface named IServiceAction like below: package com.example.test; public interface IServiceAction<Response, Request, Fault extends Exception> { Response execute(Request parameter) throws Fault; } 2. Create an interface named IServiceOperation like below: package com.example.test; public interface IServiceOperation<Response, Request, Fault extends Exception> extends IServiceAction<Response, Request, Fault> { Response execute(Request parameter) throws Fault; } 3.Create a class named MyServiceAction like below: package com.example.test; import java.io.IOException; public class MyServiceAction { public String execute(String parameter) throws IOException { return serviceOperation.execute(parameter); } private final IServiceOperation<String, String, IOException> serviceOperation = null; } These three classes should be able to be compiled, but in JEE version of Eclipse 3.4, MyServiceAction class failed to be compiled. and the error message is "Unhandled exception type Fault". More information: I have tried to compile them in Eclipse 3.3 and IntelliJ IDEA 7.0.3, and both of them compile these classes without any error.
Reproduced with simple testcase: import java.io.IOException; interface IServiceAction<Response, Request, Fault extends Exception> { Response execute(Request parameter) throws Fault; } interface IServiceOperation<Response, Request, Fault extends Exception> extends IServiceAction<Response, Request, Fault> { Response execute(Request parameter) throws Fault; } public class MyServiceAction { public String execute(String parameter) throws IOException { return serviceOperation.execute(parameter); } private final IServiceOperation<String, String, IOException> serviceOperation = null; }
Removing any of the super methods (execute(...)) does make the problem go away.
Removing any of the super methods (execute(...)) does make the problem go away. Problem got introduced during 3.4M7
This is another consequence from fix for bug 79798. It was merging exceptions from original methods, instead of substituted parameterized ones; thus surfacing Fault in place of substitute IOException.
Created attachment 106709 [details] Patch for 3.4.x
Need to backport to 3.3.x as well, since fix for 79798 made it there as well. To be released for 3.5M1 too.
Created attachment 106710 [details] Proposed patch for HEAD
Released for 3.5M1. Added GenericTypeTest#test1366
Released for 3.4.1
Released in 3.3.x maintenance branch (post 3.3.2). Fixed
Verified for 3.5M1 using I20080805-1307
Verified for 3.4.1 using M20080827-2000