[jboss-jira] [JBoss JIRA] (JBMETA-369) Compilation error in AbstractWebServiceRefProcessor with JDK7
Chao Wang (JIRA)
issues at jboss.org
Mon Mar 21 23:54:00 EDT 2016
[ https://issues.jboss.org/browse/JBMETA-369?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chao Wang closed JBMETA-369.
----------------------------
Resolution: Out of Date
> Compilation error in AbstractWebServiceRefProcessor with JDK7
> -------------------------------------------------------------
>
> Key: JBMETA-369
> URL: https://issues.jboss.org/browse/JBMETA-369
> Project: JBoss Metadata
> Issue Type: Bug
> 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 was sent by Atlassian JIRA
(v6.4.11#64026)
More information about the jboss-jira
mailing list