Summary: | JDT compiler doesn't report recursive constructor invocation | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Craig Miskell <cmiskell> |
Component: | Core | Assignee: | Philipe Mulet <philippe_mulet> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | ||
Version: | 2.0.1 | ||
Target Milestone: | 2.1 M4 | ||
Hardware: | PC | ||
OS: | Linux-GTK | ||
Whiteboard: |
Description
Craig Miskell
2002-11-13 15:42:40 EST
We have to report these errors. On following test case, I get 2 errors: Kind Status Priority Description Resource In Folder Location Error Recursive constructor invocation RC() RC.java Crap/src line 4 in RC.RC(int) Error Recursive constructor invocation RC(int) RC.java Crap/src line 7 in RC.RC() public class RC { RC(int i){ this(); } RC(){ this(0); } } Can you provide a test case reproducing what you see ? Sure can. I should have initially, but I thought it was a simple case (obviously it's not, and I apologize for assuming you guys had missed something simple). It appears to be when the constructor would recurse to itself, but there's another constructor with the same number of args or something like that. Test case below: public class TestEclipseBug { private Object root; private Number count; public TestEclipseBug(Class rootClass) { this(rootClass, null); } public TestEclipseBug(Class rootClass, Number count) { this.root=rootClass; this.count=count; } public TestEclipseBug(String objEntityName) { this(objEntityName); } public TestEclipseBug(String aName, Number count) { this.root=aName; this.count=count; } } Indeed, we have a problem. 3rd constructor should be blamed. Fixed in latest Verified. |