Return-Path: X-Original-To: apmail-aries-dev-archive@www.apache.org Delivered-To: apmail-aries-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 54E9B1892D for ; Mon, 14 Dec 2015 17:11:47 +0000 (UTC) Received: (qmail 21319 invoked by uid 500); 14 Dec 2015 17:11:47 -0000 Delivered-To: apmail-aries-dev-archive@aries.apache.org Received: (qmail 21249 invoked by uid 500); 14 Dec 2015 17:11:47 -0000 Mailing-List: contact dev-help@aries.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@aries.apache.org Delivered-To: mailing list dev@aries.apache.org Received: (qmail 20970 invoked by uid 99); 14 Dec 2015 17:11:47 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Dec 2015 17:11:47 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id D63722C1F56 for ; Mon, 14 Dec 2015 17:11:46 +0000 (UTC) Date: Mon, 14 Dec 2015 17:11:46 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: dev@aries.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (ARIES-1481) blueprint-maven-plugin: fix detection of inherited @OsgiService/@PersistenceContext/Unit-annotated fields MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/ARIES-1481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15056296#comment-15056296 ] ASF GitHub Bot commented on ARIES-1481: --------------------------------------- GitHub user samwright opened a pull request: https://github.com/apache/aries/pull/36 [Aries-1481] Fix inheritance of @OsgiService and @PersistenceContext/Unit fields https://issues.apache.org/jira/browse/ARIES-1481 You can merge this pull request into a Git repository by running: $ git pull https://github.com/samwright/aries ARIES-1481 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/aries/pull/36.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #36 ---- commit a905bd2917d7b5272418449c53b1d86879c226cd Author: Samuel Wright Date: 2015-12-12T16:38:35Z [ARIES-1474] Fix init/destroy method inheritence. commit 154b046302d7dcd6a64d82da41aa8f960c94da8e Author: Sam Wright Date: 2015-12-12T11:44:41Z [ARIES-1475] Implement per-method transaction support. commit 74d0b144c742b4f9b0ee2f8227a65eb9aa4b1a73 Author: Samuel Wright Date: 2015-12-12T18:29:25Z [ARIES-1476] Support 0 or multiple OsgiServiceProvider#classes. - 0 classes adds auto-export="interfaces" to the service element - multiple classes adds the interfaces (e.g. A and B) to the interfaces element: A B commit 237fa704928b63d379cf4066b678ab213af37f06 Author: Sam Wright Date: 2015-12-14T16:48:45Z [ARIES-1481] Fix inheritance of @OsgiService and @PersistenceContext/Unit fields @Inject fields are inherited from parent classes, but @OsgiService and @PersistenceContext/Unit annotations on fields declared in parent classes are ignored. This commit extracts the field-getting algorithm used for finding @Inject fields to a utility method which is used for finding fields for the other annotations. ---- > blueprint-maven-plugin: fix detection of inherited @OsgiService/@PersistenceContext/Unit-annotated fields > --------------------------------------------------------------------------------------------------------- > > Key: ARIES-1481 > URL: https://issues.apache.org/jira/browse/ARIES-1481 > Project: Aries > Issue Type: Bug > Components: Blueprint > Reporter: Sam Wright > > Fields inherited from parent classes annotated with @Inject are properly detected by blueprint-maven-plugin, but the presence of @OsgiService, > @PersistenceContext, and @PersistenceUnit annotations on fields declared in parent classes is ignored. > This is because @Inject-annotated fields are found in the Bean.resolve(Matcher) method which recursively searches all parent classes for declared fields, whereas @PersistenceContext/Unit-annotated fields are discovered in Bean.getPersistenceFields() by simply using the fields declared in the bean class. Similarly, @OsgiService-annotated fields are discovered in Context.addServiceRefs(Class) by looking through the fields declared in the bean class. > This commit extracts the field-getting algorithm used for finding > @Inject fields to a utility method which is used for finding fields for the other > annotations. -- This message was sent by Atlassian JIRA (v6.3.4#6332)