Bug 388948

Summary: package-info.java not compilable in Eclipse 4.2
Product: [Eclipse Project] JDT Reporter: Dmitry Vyazelenko <vyazelenko>
Component: CoreAssignee: Stephan Herrmann <stephan.herrmann>
Status: VERIFIED DUPLICATE QA Contact:
Severity: blocker    
Priority: P3 CC: srikanth_sankaran, stephan.herrmann
Version: 4.2   
Target Milestone: 3.8.1   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Dmitry Vyazelenko CLA 2012-09-06 10:09:47 EDT

    
Comment 1 Dmitry Vyazelenko CLA 2012-09-06 10:19:25 EDT
I have a project in which none of the package-info.java classes are compilable in Eclipse 4.2. The same project compiles without problems in Eclipse 3.7.2.

Eclipse 4.2 info:
Version: 4.2.0
Build id: I20120608-1400

Eclipse 3.7.2 info:
Version: 3.7.2
Build id: M20120208-0800


Both Eclipses started using same JDK 1.7.0_07 (i.e. "-vm" switch in the eclipse.ini file). Each Eclipse has it's own workspace (for Eclipse 4.2 workspace was created fresh and project imported).


Compilation error reported is:
Type mismatch: cannot convert from Class<DateAdapter> to Class<? extends XmlAdapter>


package-info.java are identical and contain the following definitions:
@javax.xml.bind.annotation.XmlSchema (
    namespace = "http://mycompany.com",
    elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED 
)
@javax.xml.bind.annotation.XmlAccessorType (
    value = javax.xml.bind.annotation.XmlAccessType.PROPERTY
)
@javax.xml.bind.annotation.adapters.XmlJavaTypeAdapters({
  @javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter(
      value = com.mycompany.util.jaxb.DateAdapter.class
  )
}) 
package com.mycompany.somepackage;


Class DateAdapter extends javax.xml.bind.annotation.adapters.XmlAdapter:
public class DateAdapter extends XmlAdapter<Calendar, Date> {
...
}


All in all this seems to be compiler problem!?
Comment 2 Stephan Herrmann CLA 2012-09-06 12:23:17 EDT
Reminds me of bug 386356 which is fixed for SR1.

Could you please try a 4.2.1 release candidate from
http://download.eclipse.org/eclipse/downloads/drops4/M20120905-2300/ and report back if the problem persists?

Thanks
Comment 3 Dmitry Vyazelenko CLA 2012-09-07 03:34:55 EDT
(In reply to comment #2)
> Reminds me of bug 386356 which is fixed for SR1.
> 
> Could you please try a 4.2.1 release candidate from
> http://download.eclipse.org/eclipse/downloads/drops4/M20120905-2300/ and
> report back if the problem persists?
> 
> Thanks

Hi Stephan,

The new build seems to fix the problem! ;-)

When is 4.2.1 release expected?

Thanks
Comment 4 Stephan Herrmann CLA 2012-09-07 04:03:42 EDT
(In reply to comment #3)
> The new build seems to fix the problem! ;-)

thanks for confirming.
 
> When is 4.2.1 release expected?

Sept 28, see http://wiki.eclipse.org/Juno/Simultaneous_Release_Plan#SR1

*** This bug has been marked as a duplicate of bug 386356 ***
Comment 5 Srikanth Sankaran CLA 2012-09-17 23:31:43 EDT
Verified for 4.3 M2. See comment#3