Return-Path: X-Original-To: apmail-openwebbeans-commits-archive@www.apache.org Delivered-To: apmail-openwebbeans-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A5E33177A7 for ; Sun, 31 May 2015 07:55:15 +0000 (UTC) Received: (qmail 11715 invoked by uid 500); 31 May 2015 07:55:15 -0000 Delivered-To: apmail-openwebbeans-commits-archive@openwebbeans.apache.org Received: (qmail 11674 invoked by uid 500); 31 May 2015 07:55:15 -0000 Mailing-List: contact commits-help@openwebbeans.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openwebbeans.apache.org Delivered-To: mailing list commits@openwebbeans.apache.org Received: (qmail 11663 invoked by uid 99); 31 May 2015 07:55:15 -0000 Received: from eris.apache.org (HELO hades.apache.org) (140.211.11.105) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 31 May 2015 07:55:15 +0000 Received: from hades.apache.org (localhost [127.0.0.1]) by hades.apache.org (ASF Mail Server at hades.apache.org) with ESMTP id 42637AC035B for ; Sun, 31 May 2015 07:55:15 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1682689 - in /openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/generics: MyAbstract.java MyBean.java MyInterface.java StringBean.java StringBeanAbstract.java Date: Sun, 31 May 2015 07:55:15 -0000 To: commits@openwebbeans.apache.org From: struberg@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20150531075515.42637AC035B@hades.apache.org> Author: struberg Date: Sun May 31 07:55:14 2015 New Revision: 1682689 URL: http://svn.apache.org/r1682689 Log: OWB-654 fix manual lookup of beans with generic types Missed to add a few classes from the patch. Txs to Daniel Cunha (soro) for the patch! Added: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/generics/MyAbstract.java (with props) openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/generics/MyBean.java (with props) openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/generics/MyInterface.java (with props) openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/generics/StringBean.java (with props) openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/generics/StringBeanAbstract.java (with props) Added: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/generics/MyAbstract.java URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/generics/MyAbstract.java?rev=1682689&view=auto ============================================================================== --- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/generics/MyAbstract.java (added) +++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/generics/MyAbstract.java Sun May 31 07:55:14 2015 @@ -0,0 +1,24 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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.apache.webbeans.test.injection.generics; + +public abstract class MyAbstract +{ + abstract T getValue(); +} Propchange: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/generics/MyAbstract.java ------------------------------------------------------------------------------ svn:eol-style = native Added: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/generics/MyBean.java URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/generics/MyBean.java?rev=1682689&view=auto ============================================================================== --- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/generics/MyBean.java (added) +++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/generics/MyBean.java Sun May 31 07:55:14 2015 @@ -0,0 +1,43 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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.apache.webbeans.test.injection.generics; + +import org.apache.webbeans.component.InstanceBean; + +import javax.enterprise.inject.Instance; +import javax.inject.Inject; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; + +public class MyBean +{ + @Inject + private Instance stringBean; + + @Inject + private Instance stringAbstractBean; + + public void checkAll() { + assertNotNull(stringBean); + assertNotNull(stringAbstractBean); + assertEquals(StringBean.class.getName(), stringBean.get().getValue()); + assertEquals(StringBeanAbstract.class.getName(), stringAbstractBean.get().getValue()); + } +} Propchange: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/generics/MyBean.java ------------------------------------------------------------------------------ svn:eol-style = native Added: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/generics/MyInterface.java URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/generics/MyInterface.java?rev=1682689&view=auto ============================================================================== --- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/generics/MyInterface.java (added) +++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/generics/MyInterface.java Sun May 31 07:55:14 2015 @@ -0,0 +1,24 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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.apache.webbeans.test.injection.generics; + +public interface MyInterface +{ + T getValue(); +} Propchange: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/generics/MyInterface.java ------------------------------------------------------------------------------ svn:eol-style = native Added: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/generics/StringBean.java URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/generics/StringBean.java?rev=1682689&view=auto ============================================================================== --- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/generics/StringBean.java (added) +++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/generics/StringBean.java Sun May 31 07:55:14 2015 @@ -0,0 +1,31 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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.apache.webbeans.test.injection.generics; + +import javax.enterprise.context.ApplicationScoped; + +@ApplicationScoped +public class StringBean implements MyInterface +{ + @Override + public String getValue() + { + return getClass().getName(); + } +} Propchange: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/generics/StringBean.java ------------------------------------------------------------------------------ svn:eol-style = native Added: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/generics/StringBeanAbstract.java URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/generics/StringBeanAbstract.java?rev=1682689&view=auto ============================================================================== --- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/generics/StringBeanAbstract.java (added) +++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/generics/StringBeanAbstract.java Sun May 31 07:55:14 2015 @@ -0,0 +1,31 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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.apache.webbeans.test.injection.generics; + +import javax.enterprise.context.ApplicationScoped; + +@ApplicationScoped +public class StringBeanAbstract extends MyAbstract +{ + @Override + public String getValue() + { + return getClass().getName(); + } +} Propchange: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/injection/generics/StringBeanAbstract.java ------------------------------------------------------------------------------ svn:eol-style = native