Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 91380

Summary: [Infer Type Arguments] generates illegal code
Product: [Eclipse Project] JDT Reporter: Stefan Matthias Aust <sma>
Component: UIAssignee: Markus Keller <markus.kell.r>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: mlists
Version: 3.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug

Description Stefan Matthias Aust CLA 2005-04-14 05:39:33 EDT
Eclipse 3.1M6, JDK 1.5.0_02, in a scenario similar to this

 class T {
  protected Hashtable t;
  T() { t = new Hashtable(); }
  Object get(String n) { return t.get(n); }
  void set(String n, Object v) { t.put(n, v); }
 }

the preview of "Refactor|Infer..." will correctly show the type "<String,
Object>" but somehow, "<Object, Object>" is generated for the Hashtable inside
the constructor.  

Unfortunately, I cannot find a simple case where this happens, it happens only,
if I try to infer the types of a larger number of classes at once.

It is reproducable if you use simple-core-2.5.4 from simpleweb.sf.net and try to
infer the types of package "simple.http".
Comment 1 Dirk Baeumer CLA 2005-04-14 19:25:52 EDT
Markus, can you please investigate. Before accessing the code, please make sure
that there aren't any licensing issues.
Comment 2 Markus Keller CLA 2005-05-27 10:38:34 EDT
Sorry, I probably won't have time to look at this for 3.1.
Comment 3 Eclipse Genie CLA 2020-02-08 11:57:00 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.