Summary: | [1.5][compiler] unnecessary warning when creating an array of varargs | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Rémi Forax <forax> |
Component: | Core | Assignee: | Srikanth Sankaran <srikanth_sankaran> |
Status: | VERIFIED WONTFIX | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | jarthana, Olivier_Thomann, srikanth_sankaran |
Version: | 3.4 | ||
Target Milestone: | 3.8 M5 | ||
Hardware: | PC | ||
OS: | Linux | ||
Whiteboard: |
Description
Rémi Forax
2008-03-20 17:19:31 EDT
Argh, the previous test case doesn't exhibit the problem. Should be: HashSet<Class<?>> constantClassSet=new HashSet<Class<?>>(); Collections.addAll(constantClassSet, String.class, Object.class ); This equivalence is not accounted in the spec, hence the compiler diagnosis is accurate I believe. I agree that the underlying bounds are equivalent, but Class<?> is unbound, and benefits from certain privileges wrt to reification where Class<? extends Object>. So unless the spec was to account for it, then we wouldn't be allowed to change this. Note that javac exhibits the same behavior as we do. Added VarargsTest#test061 Rémi, As you are aware, SE7 adds linguistic support for this via @SafeVarargs annotation. OK to close as is for compliance < 1.7 ? (In reply to comment #4) > Rémi, As you are aware, SE7 adds linguistic support > for this via @SafeVarargs annotation. OK to close > as is for compliance < 1.7 ? Ok to close. Philippe was right and could have closed that bug. cheers, Rémi Closing as WONTFIX. Verified for 3.8M5 |