Bug 223334 - [1.5][compiler] java 1.5 compiler bug
Summary: [1.5][compiler] java 1.5 compiler bug
Status: RESOLVED DUPLICATE of bug 216565
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3.1   Edit
Hardware: All All
: P3 blocker (vote)
Target Milestone: 3.4 M5   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-20 06:57 EDT by Jacques Leroy CLA
Modified: 2008-03-21 16:06 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jacques Leroy CLA 2008-03-20 06:57:16 EDT
Build ID: M20071023-1652

Steps To Reproduce:
0. the bug itself is hard to describe: for short, something that used to compile with Eclipse 3.2 doesn't any more with 3.3.1.1 
1. create a simple java project
2. add the classes provided below
3. see by yourself the project doesn't compile
 (it won't with Eclipse 3.3.1.1, but it will with any 3.2.X) - for sources, see below. It may be necessary to clean up the project or remove the .class files if you switch from an Eclipse version to another
4. the quick fix feature is screwed up - the suggestion is useless, the operation too...
5. the problem occurs weather you're using Sun VM or BEA JRockit...

More information:
package bug.report;

import java.util.Collection;
import java.util.List;
import java.util.Map;

public class ConflictManager<T>
{

   public List<Map.Entry<Integer, ? extends Collection<T>>> getConflictsSortedBySize()
   {
      return null;
   }
}

// --------

package bug.report;

public class LayoutOrganizable<T>
{

   private T t;
   
   public LayoutOrganizable(T t)
   {
      this.t = t;
      
   }
}

// ----

package bug.report;

import java.util.Collection;
import java.util.List;
import java.util.ListIterator;
import java.util.Map;

public class LayoutOrganizer<T>
{
   ConflictManager<LayoutOrganizable<T>> conflictManager =
      new ConflictManager<LayoutOrganizable<T>>();
   
   
   private boolean optimizeEqual()
   {
      List<Map.Entry<Integer, ? extends Collection<LayoutOrganizable<T>>>> list;
      ListIterator<Map.Entry<Integer, ? extends Collection<LayoutOrganizable<T>>>> i;

      // create sorted list of pairs
      // (#conflicts, list of LayoutOrganizable sharing this #conflicts)
      // Here is the problem...
      list = conflictManager.getConflictsSortedBySize();

      return null == list;
   }
}
Comment 1 Philipe Mulet CLA 2008-03-21 01:25:33 EDT
Cannot reproduce any issue.
What error do you get ?

Also, you may want to use 3.3.2 instead, since some compiler error got addressed.
Comment 2 Philipe Mulet CLA 2008-03-21 01:28:07 EDT
Added GenericTypeTest#test1305
Comment 3 Philipe Mulet CLA 2008-03-21 16:01:22 EDT
Problem only occur after an incremental recompilation of LayoutOrganizer (against binaries for 2 others).
Comment 4 Philipe Mulet CLA 2008-03-21 16:05:09 EDT
Closing as dup of bug 216565

*** This bug has been marked as a duplicate of bug 216565 ***
Comment 5 Philipe Mulet CLA 2008-03-21 16:06:57 EDT
Note that I did backport fix for bug 216565 already to 3.3 maintenance (post 3.2).
Jerome - we may want to post a patch on our update page.

Jacques - if you take a 3.4M5 build, you shouldn't see the problem any longer.