[jboss-jira] [JBoss JIRA] (JBMETA-369) Compilation error in AbstractWebServiceRefProcessor with JDK7

Chao Wang (JIRA) jira-events at lists.jboss.org
Mon Dec 2 04:43:05 EST 2013


Chao Wang created JBMETA-369:
--------------------------------

             Summary: Compilation error in AbstractWebServiceRefProcessor with JDK7
                 Key: JBMETA-369
                 URL: https://issues.jboss.org/browse/JBMETA-369
             Project: JBoss Metadata
          Issue Type: Bug
      Security Level: Public (Everyone can see)
    Affects Versions: 1.0.6.GA
         Environment: Java version: 1.7.0_40, vendor: Oracle Corporation
            Reporter: Chao Wang
            Assignee: Chao Wang


When I built jboss metadata on https://svn.jboss.org/repos/jbossas/projects/metadata/trunk
I received a compilation error in AbstractWebServiceRefProcessor with JDK7, but I can build without this error with JDK6.
{noformat}
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.340s
[INFO] Finished at: Mon Dec 02 17:20:37 CST 2013
[INFO] Final Memory: 13M/211M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project jboss-metadata: Compilation failure
[ERROR] /home/wangchao/work/jbossas/EAP5/metadata/trunk/src/main/java/org/jboss/metadata/annotation/creator/ws/AbstractWebServiceRefProcessor.java:[116,28] error: incomparable types: Class<CAP#1> and Class<Object>
{noformat}

the error indicates to AbstractWebServiceRefProcessor.java:
{code:title=AbstractWebServiceRefProcessor.java|borderStyle=solid}
if(annotation.value() != Object.class && annotation.value() != Service.class)
  ref.setServiceInterface(annotation.value().getName());
{code}

>From JAX-WS 2.1 to 2.2 API, the value type and default value have been changed from Object.class to Service.class.

{code:title=WebServiceRef.java|borderStyle=solid}
    /**
     * The service class, alwiays a type extending
     * <code>javax.xml.ws.Service</code>. This element MUST be specified
     * whenever the type of the reference is a service endpoint interface.
     */
    // 2.1 has Class value() default Object.class;
    // Fixing this raw Class type correctly in 2.2 API. This shouldn't cause
    // any compatibility issues for applications.
    Class<? extends Service> value() default Service.class;
{code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list