Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 31536 invoked from network); 6 Feb 2009 13:20:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Feb 2009 13:20:30 -0000 Received: (qmail 99921 invoked by uid 500); 6 Feb 2009 13:20:22 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 99721 invoked by uid 500); 6 Feb 2009 13:20:21 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 99628 invoked by uid 99); 6 Feb 2009 13:20:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Feb 2009 05:20:21 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Feb 2009 13:20:20 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 19945234C4B0 for ; Fri, 6 Feb 2009 05:20:00 -0800 (PST) Message-ID: <1734875184.1233926400103.JavaMail.jira@brutus> Date: Fri, 6 Feb 2009 05:20:00 -0800 (PST) From: "Rob Walker (JIRA)" To: issues@commons.apache.org Subject: [jira] Commented: (CONFIGURATION-363) Consider enhancing to allow nested variable interpolation In-Reply-To: <131451589.1233908044918.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CONFIGURATION-363?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12671120#action_12671120 ] Rob Walker commented on CONFIGURATION-363: ------------------------------------------ It looks like this would be an enhancement to the StrSubstitution class in Commons Lang. Will raise a JIRA their and also see if I can figure and submit a patch > Consider enhancing to allow nested variable interpolation > --------------------------------------------------------- > > Key: CONFIGURATION-363 > URL: https://issues.apache.org/jira/browse/CONFIGURATION-363 > Project: Commons Configuration > Issue Type: Improvement > Components: Interpolation > Reporter: Rob Walker > Priority: Minor > > It would be really handy of Commons Configuration could support nested variable interpolation: > org.osgi.framework.system.packages=org.osgi.framework; version=1.4.0, \ > org.osgi.service.packageadmin; version=1.2.0, \ > org.osgi.service.startlevel; version=1.1.0, \ > org.osgi.service.url; version=1.0.0, \ > org.osgi.util.tracker; version=1.3.3 \ > ${jre-${java.specification.version}} > The process being to expand innermost variable references first and work outwards - this allows for very advance config, such as the above, which can dynamically detect the Java version and expand a JRE version specific property into the property being defined. > Care is needed to avoid recursion, which can been handled through use of a "Cycle Map" that detects of an inner variable has already been referenced. > An example of this can be found in the substVars method of the Apache Felix org.apache.felix.framework.util.Util class. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.