[jbosstools-issues] [JBoss JIRA] (JBIDE-17716) An error "TypeParameter cannot be cast to IType" occurs when quick fix is used

Denis Golovin (JIRA) issues at jboss.org
Thu Jul 10 15:48:26 EDT 2014


    [ https://issues.jboss.org/browse/JBIDE-17716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12984047#comment-12984047 ] 

Denis Golovin commented on JBIDE-17716:
---------------------------------------

No need to export huge project. It can be replicated on posted steps to reproduce, but test class should be template:

{code}
package jaxrs;

import java.util.ArrayList;
import java.util.List;

import javax.ejb.Stateless;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

@Stateless
@Path("/path")
public class Converter<T> {
	@GET
	@Produces(MediaType.APPLICATION_JSON)
	public List<T> getConverter() {
		return new ArrayList<T>();
	}

}
{code}

Example above throws the same exception. problem is in <T> processing, it fails because it cannot be converted to actual type.

> An error "TypeParameter cannot be cast to IType" occurs when quick fix is used
> ------------------------------------------------------------------------------
>
>                 Key: JBIDE-17716
>                 URL: https://issues.jboss.org/browse/JBIDE-17716
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: webservices
>    Affects Versions: 4.2.0.Beta3
>            Reporter: Radoslav Rábara
>              Labels: respin-a
>             Fix For: 4.2.0.Beta3
>
>




--
This message was sent by Atlassian JIRA
(v6.2.6#6264)



More information about the jbosstools-issues mailing list