Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 96802 invoked from network); 23 Jan 2010 16:46:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 23 Jan 2010 16:46:42 -0000 Received: (qmail 80559 invoked by uid 500); 23 Jan 2010 16:46:41 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 80428 invoked by uid 500); 23 Jan 2010 16:46:41 -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 80393 invoked by uid 99); 23 Jan 2010 16:46:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 23 Jan 2010 16:46:40 +0000 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; Sat, 23 Jan 2010 16:46:38 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id E44B1234C4AD for ; Sat, 23 Jan 2010 08:46:17 -0800 (PST) Message-ID: <1366832934.3971264265177933.JavaMail.jira@brutus.apache.org> Date: Sat, 23 Jan 2010 16:46:17 +0000 (UTC) From: "Oliver Heger (JIRA)" To: issues@commons.apache.org Subject: [jira] Resolved: (CONFIGURATION-403) XMLConfiguration isEmpty has altered behaviour between 1.4 and 1.6 In-Reply-To: <314769501.237631263472614571.JavaMail.jira@brutus.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CONFIGURATION-403?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Oliver Heger resolved CONFIGURATION-403. ---------------------------------------- Resolution: Fixed Fix Version/s: 1.7 Should be fixed in subversion now (revision 902439). I applied a slightly different solution: IMO the problem was caused by the load() method which used to assign the root node an empty text even if the XML root element had no content. So I added a condition here rather than in the isEmpty() method. Nevertheless thank you very much for the patch and your analyis. > XMLConfiguration isEmpty has altered behaviour between 1.4 and 1.6 > ------------------------------------------------------------------- > > Key: CONFIGURATION-403 > URL: https://issues.apache.org/jira/browse/CONFIGURATION-403 > Project: Commons Configuration > Issue Type: Bug > Affects Versions: 1.6 > Environment: Windows Vista 64, JDK 1.6 > Reporter: Daniel Berg > Assignee: Oliver Heger > Priority: Minor > Fix For: 1.7 > > Attachments: configuration-403.patch > > > Given xml configuration file > {code:xml} > > > {code} > {code} > XMLConfiguration xml = new XMLConfiguration(file); > assertTrue(xml.isEmpty()); > {code} > isEmpty() returned true on version 1.4 ?, now it returns false, and the configuration contains a single empty string as key. > Not sure if this should be considered a bug, but the documnetation reads: Checks if this configuration is empty. Empty means that there are no keys with any values, though there can be some (empty) nodes. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.