Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 55598 invoked from network); 22 Jul 2006 17:12:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 22 Jul 2006 17:12:32 -0000 Received: (qmail 25271 invoked by uid 500); 22 Jul 2006 17:12:31 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 25208 invoked by uid 500); 22 Jul 2006 17:12:30 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 25197 invoked by uid 99); 22 Jul 2006 17:12:30 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 22 Jul 2006 10:12:30 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 22 Jul 2006 10:12:30 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 44AA2714204 for ; Sat, 22 Jul 2006 17:10:15 +0000 (GMT) Message-ID: <14303252.1153588215278.JavaMail.jira@brutus> Date: Sat, 22 Jul 2006 10:10:15 -0700 (PDT) From: "Oliver Heger (JIRA)" To: commons-dev@jakarta.apache.org Subject: [jira] Resolved: (CONFIGURATION-104) [configuration] Preserve file structure (line comments) when re-saving properties file MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/CONFIGURATION-104?page=all ] Oliver Heger resolved CONFIGURATION-104. ---------------------------------------- Resolution: Fixed A new class PropertiesConfigurationLayout was added. Objects of this class are associated with PropertiesConfiguration instances. They are able to preserve many structure related aspects of a properties file. Please have a look if this class fits your needs. > [configuration] Preserve file structure (line comments) when re-saving properties file > -------------------------------------------------------------------------------------- > > Key: CONFIGURATION-104 > URL: http://issues.apache.org/jira/browse/CONFIGURATION-104 > Project: Commons Configuration > Issue Type: Bug > Environment: Operating System: other > Platform: Other > Reporter: Oded Noam > Assigned To: Oliver Heger > Attachments: preserve-comments-patch, preserve-comments-patch-java1.3 > > > This bug applies when an application allows both manual editing of its > configuration files, and manipulation of the configuration via software. When > saving the configuration file after changing, its file structure - file, > section and line comments - will all be lost. Next time a human tries to edit > the configuration file, all property documentation will be lost. > I have created a fix for this problem, applicable to PropertiesConfiguration > and XMLPropertiesConfiguration. The fix allows these classes to preserve a > list of comment lines preceding each property line. By default, comments are > not preserved; in case the comment preservation is required, it should be > enabled prior to loading the configuration file using: > AbstractFileConfiguration.setDefaultPreserveComments(true); > The fix is implemented and tested, attached as a patch file to this bug. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org