Author: scabanovich
Date: 2010-12-20 08:53:27 -0500 (Mon, 20 Dec 2010)
New Revision: 27612
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/definition/bean/AbstractJavaSource.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/definition/bean/JavaSource.java
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/BeanDefinitionTest.java
Log:
JBIDE-7951
https://issues.jboss.org/browse/JBIDE-7951
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/definition/bean/AbstractJavaSource.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/definition/bean/AbstractJavaSource.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/definition/bean/AbstractJavaSource.java 2010-12-20
13:53:27 UTC (rev 27612)
@@ -0,0 +1,7 @@
+package org.jboss.jsr299.tck.tests.definition.bean;
+
+public class AbstractJavaSource<O extends JavaSource<O>> implements
+JavaSource<O> {
+ int i2q;
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/definition/bean/AbstractJavaSource.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/definition/bean/JavaSource.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/definition/bean/JavaSource.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/definition/bean/JavaSource.java 2010-12-20
13:53:27 UTC (rev 27612)
@@ -0,0 +1,5 @@
+package org.jboss.jsr299.tck.tests.definition.bean;
+
+public interface JavaSource<T extends JavaSource<T>> {
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/definition/bean/JavaSource.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/BeanDefinitionTest.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/BeanDefinitionTest.java 2010-12-20
13:23:04 UTC (rev 27611)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/BeanDefinitionTest.java 2010-12-20
13:53:27 UTC (rev 27612)
@@ -10,15 +10,18 @@
******************************************************************************/
package org.jboss.tools.cdi.core.test.tck;
+import java.util.List;
import java.util.Set;
import org.eclipse.core.resources.IFile;
+import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaModelException;
import org.jboss.tools.cdi.core.IBean;
import org.jboss.tools.cdi.core.IParametedType;
import org.jboss.tools.cdi.core.IQualifier;
import org.jboss.tools.cdi.core.IScope;
import org.jboss.tools.cdi.core.ITypeDeclaration;
+import org.jboss.tools.cdi.internal.core.impl.ClassBean;
/**
* @author Alexey Kazakov
@@ -206,4 +209,24 @@
IBean bean = beans.iterator().next();
assertEquals("Wrong Bean Class type of
org.jboss.jsr299.tck.tests.definition.bean.Horse bean",
"org.jboss.jsr299.tck.tests.definition.bean.Horse",
bean.getBeanClass().getFullyQualifiedName());
}
+
+ public void testCyclicParametedType() throws JavaModelException {
+ Set<IBean> beans =
getBeans("org.jboss.jsr299.tck.tests.definition.bean.AbstractJavaSource");
+ assertFalse(beans.isEmpty());
+ IBean bean = beans.iterator().next();
+ IParametedType t = ((ClassBean)bean).getDefinition().getParametedType();
+ assertNotNull(t);
+ List<? extends IParametedType> ps = t.getParameters();
+ assertFalse(ps.isEmpty());
+ IParametedType p = ps.get(0);
+ ps = p.getParameters();
+ assertFalse(ps.isEmpty());
+ IParametedType p1 = ps.get(0);
+ ps = p1.getParameters();
+ assertFalse(ps.isEmpty());
+ IParametedType p2 = ps.get(0);
+ IType type = p2.getType();
+ assertEquals("org.jboss.jsr299.tck.tests.definition.bean.JavaSource",
type.getFullyQualifiedName());
+ assertTrue(p1 == p2);
+ }
}
\ No newline at end of file