[jbosstools-commits] JBoss Tools SVN: r42008 - in trunk/cdi/tests/org.jboss.tools.cdi.core.test: resources/tck/tests/lookup/clientProxy/unproxyable/finalMethod and 2 other directories.
jbosstools-commits at lists.jboss.org
jbosstools-commits at lists.jboss.org
Fri Jun 15 20:45:11 EDT 2012
Author: scabanovich
Date: 2012-06-15 20:45:10 -0400 (Fri, 15 Jun 2012)
New Revision: 42008
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/clientProxy/unproxyable/finalClass/Opportunity.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/clientProxy/unproxyable/finalClass/Tuna.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/clientProxy/unproxyable/finalMethod/Tuna.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/clientProxy/unproxyable/privateConstructor/IUnproxyable.java
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/clientProxy/unproxyable/finalClass/FishFarm.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/clientProxy/unproxyable/finalClass/Tuna_Broken.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/clientProxy/unproxyable/finalMethod/FishFarm.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/clientProxy/unproxyable/finalMethod/Tuna_Broken.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/clientProxy/unproxyable/privateConstructor/InjectionPointBean.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/clientProxy/unproxyable/privateConstructor/Unproxyable_Broken.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DeploymentProblemsValidationTests.java
Log:
JBIDE-11460
https://issues.jboss.org/browse/JBIDE-11460
Validation of injection with unproxyable type resolved to a bean with a normal scope is fixed. Tests.
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/clientProxy/unproxyable/finalClass/FishFarm.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/clientProxy/unproxyable/finalClass/FishFarm.java 2012-06-16 00:15:04 UTC (rev 42007)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/clientProxy/unproxyable/finalClass/FishFarm.java 2012-06-16 00:45:10 UTC (rev 42008)
@@ -21,6 +21,7 @@
class FishFarm
{
- @Inject Tuna_Broken tuna;
+ @Inject Tuna_Broken tuna; //error
+ @Inject Tuna tuna2; //ok
}
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/clientProxy/unproxyable/finalClass/Opportunity.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/clientProxy/unproxyable/finalClass/Opportunity.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/clientProxy/unproxyable/finalClass/Opportunity.java 2012-06-16 00:45:10 UTC (rev 42008)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.lookup.clientProxy.unproxyable.finalClass;
+
+import javax.enterprise.context.RequestScoped;
+import javax.enterprise.inject.Produces;
+import javax.inject.Inject;
+import javax.inject.Named;
+
+public class Opportunity {
+
+ @Inject
+ @Named("iiOpportunity")
+ String s;
+
+ @Produces
+ @Named("iiOpportunity")
+ @RequestScoped
+ String t;
+
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/clientProxy/unproxyable/finalClass/Opportunity.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/clientProxy/unproxyable/finalClass/Tuna.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/clientProxy/unproxyable/finalClass/Tuna.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/clientProxy/unproxyable/finalClass/Tuna.java 2012-06-16 00:45:10 UTC (rev 42008)
@@ -0,0 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.lookup.clientProxy.unproxyable.finalClass;
+
+import javax.enterprise.context.RequestScoped;
+
+public interface Tuna
+{
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/clientProxy/unproxyable/finalClass/Tuna.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/clientProxy/unproxyable/finalClass/Tuna_Broken.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/clientProxy/unproxyable/finalClass/Tuna_Broken.java 2012-06-16 00:15:04 UTC (rev 42007)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/clientProxy/unproxyable/finalClass/Tuna_Broken.java 2012-06-16 00:45:10 UTC (rev 42008)
@@ -19,7 +19,7 @@
import javax.enterprise.context.RequestScoped;
@RequestScoped
-final class Tuna_Broken
+final class Tuna_Broken implements Tuna
{
}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/clientProxy/unproxyable/finalMethod/FishFarm.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/clientProxy/unproxyable/finalMethod/FishFarm.java 2012-06-16 00:15:04 UTC (rev 42007)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/clientProxy/unproxyable/finalMethod/FishFarm.java 2012-06-16 00:45:10 UTC (rev 42008)
@@ -20,5 +20,7 @@
class FishFarm
{
- @Inject Tuna_Broken tuna;
+ @Inject Tuna_Broken tuna; //error
+
+ @Inject Tuna tuna2; //ok
}
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/clientProxy/unproxyable/finalMethod/Tuna.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/clientProxy/unproxyable/finalMethod/Tuna.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/clientProxy/unproxyable/finalMethod/Tuna.java 2012-06-16 00:45:10 UTC (rev 42008)
@@ -0,0 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.lookup.clientProxy.unproxyable.finalMethod;
+
+import javax.enterprise.context.RequestScoped;
+
+ at RequestScoped
+punlic interface Tuna
+{
+}
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/clientProxy/unproxyable/finalMethod/Tuna.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/clientProxy/unproxyable/finalMethod/Tuna_Broken.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/clientProxy/unproxyable/finalMethod/Tuna_Broken.java 2012-06-16 00:15:04 UTC (rev 42007)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/clientProxy/unproxyable/finalMethod/Tuna_Broken.java 2012-06-16 00:45:10 UTC (rev 42008)
@@ -19,7 +19,7 @@
import javax.enterprise.context.RequestScoped;
@RequestScoped
-class Tuna_Broken
+class Tuna_Broken implements Tuna
{
public final String getFoo() { return null; }
}
\ No newline at end of file
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/clientProxy/unproxyable/privateConstructor/IUnproxyable.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/clientProxy/unproxyable/privateConstructor/IUnproxyable.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/clientProxy/unproxyable/privateConstructor/IUnproxyable.java 2012-06-16 00:45:10 UTC (rev 42008)
@@ -0,0 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.lookup.clientProxy.unproxyable.privateConstructor;
+
+import javax.enterprise.context.RequestScoped;
+
+public interface IUnproxyable
+{
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/clientProxy/unproxyable/privateConstructor/IUnproxyable.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/clientProxy/unproxyable/privateConstructor/InjectionPointBean.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/clientProxy/unproxyable/privateConstructor/InjectionPointBean.java 2012-06-16 00:15:04 UTC (rev 42007)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/clientProxy/unproxyable/privateConstructor/InjectionPointBean.java 2012-06-16 00:45:10 UTC (rev 42008)
@@ -20,5 +20,7 @@
class InjectionPointBean
{
- @Inject Unproxyable_Broken foo;
+ @Inject Unproxyable_Broken foo; //error
+
+ @Inject IUnproxyable foo2; //ok
}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/clientProxy/unproxyable/privateConstructor/Unproxyable_Broken.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/clientProxy/unproxyable/privateConstructor/Unproxyable_Broken.java 2012-06-16 00:15:04 UTC (rev 42007)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/clientProxy/unproxyable/privateConstructor/Unproxyable_Broken.java 2012-06-16 00:45:10 UTC (rev 42008)
@@ -19,7 +19,7 @@
import javax.enterprise.context.RequestScoped;
@RequestScoped
-class Unproxyable_Broken
+class Unproxyable_Broken implements IUnproxyable
{
private Unproxyable_Broken() {}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DeploymentProblemsValidationTests.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DeploymentProblemsValidationTests.java 2012-06-16 00:15:04 UTC (rev 42007)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DeploymentProblemsValidationTests.java 2012-06-16 00:45:10 UTC (rev 42008)
@@ -199,6 +199,7 @@
public void testClassWithPrivateConstructor() throws Exception {
IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/privateConstructor/InjectionPointBean.java");
AbstractResourceMarkerTest.assertMarkerIsCreated(file, MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_TYPE_WITH_NPC, "Unproxyable_Broken", "Unproxyable_Broken"), 23);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, CDIValidationMessages.UNPROXYABLE_BEAN_TYPE_WITH_NPC.substring(0, 0), 25);
}
/**
@@ -221,6 +222,10 @@
public void testInjectionPointWhichResolvesToNormalScopedFinalBean() throws Exception {
IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/finalClass/FishFarm.java");
AbstractResourceMarkerTest.assertMarkerIsCreated(file, MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_FINAL_TYPE, "Tuna_Broken", "Tuna_Broken"), 24);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, CDIValidationMessages.UNPROXYABLE_BEAN_FINAL_TYPE.substring(0, 0) + ".*", 26);
+
+ file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/finalClass/Opportunity.java");
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_FINAL_TYPE, "String", "Opportunity.t"), 26);
}
/**
@@ -234,6 +239,7 @@
public void testClassWithFinalMethodCannotBeProxied() throws Exception {
IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/finalMethod/FishFarm.java");
AbstractResourceMarkerTest.assertMarkerIsCreated(file, MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_TYPE_WITH_FM, "Tuna_Broken", "Tuna_Broken"), 23);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, CDIValidationMessages.UNPROXYABLE_BEAN_TYPE_WITH_FM.substring(0, 0) + ".*", 25);
}
/**
More information about the jbosstools-commits
mailing list