Return-Path: X-Original-To: apmail-ace-commits-archive@www.apache.org Delivered-To: apmail-ace-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 162AA9E54 for ; Fri, 13 Apr 2012 12:53:41 +0000 (UTC) Received: (qmail 60186 invoked by uid 500); 13 Apr 2012 12:53:41 -0000 Delivered-To: apmail-ace-commits-archive@ace.apache.org Received: (qmail 60166 invoked by uid 500); 13 Apr 2012 12:53:41 -0000 Mailing-List: contact commits-help@ace.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ace.apache.org Delivered-To: mailing list commits@ace.apache.org Received: (qmail 60157 invoked by uid 99); 13 Apr 2012 12:53:41 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Apr 2012 12:53:41 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Apr 2012 12:53:38 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 2E6C1369308 for ; Fri, 13 Apr 2012 12:53:16 +0000 (UTC) Date: Fri, 13 Apr 2012 12:53:16 +0000 (UTC) From: "Matthijs Hendriks (Commented) (JIRA)" To: commits@ace.apache.org Message-ID: <1492112274.21760.1334321596191.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1530564694.17604.1334245759863.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (ACE-259) Support for metatype schema v1.1 (and beyond) 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/ACE-259?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13253339#comment-13253339 ] Matthijs Hendriks commented on ACE-259: --------------------------------------- A side note here: the recognizer checks the first attribute of the config file, of which it assumes it is the MetaData. This, however, is a really naive implementation, as Bram and I found out. If, before the MetaData attribute a comment is placed the recognizer will see the comment as the first attributes, generating a NullPointerException and therefore leaving it unrecognized... The fix should, obviously, find the MetaData attribute rather than simply the first. This 'breaks', for example, since the comment is used: > Support for metatype schema v1.1 (and beyond) > --------------------------------------------- > > Key: ACE-259 > URL: https://issues.apache.org/jira/browse/ACE-259 > Project: ACE > Issue Type: Improvement > Reporter: Bram de Kruijff > Assignee: Bram de Kruijff > > The configuration helper implementation hardcodes a check for "http://www.osgi.org/xmlns/metatype/v1.0.0", but v1.1 and v.1.2 are also valid schemas. AFAICS there is no regression risk in accepting v1.1 and 1.2 as long as the provider autoconf rp can handle them. Unfortunatly, there is no way to express version constraints on this level. > So.. > 1) Create seperate helpers for v1.1. & v1.2 > 2) Make this helper accept v1.1 & v.1.2 > 3) Rely on org.apache.felix.metatype.MetaDataReader to determine validity > IMHO option 1 is unnecessarily heavy, option 2 is the easiest fix and option 3 the most elegant and robust solution. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira