Return-Path: X-Original-To: apmail-commons-user-archive@www.apache.org Delivered-To: apmail-commons-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 904618E23 for ; Tue, 13 Sep 2011 22:07:24 +0000 (UTC) Received: (qmail 44924 invoked by uid 500); 13 Sep 2011 22:07:23 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 44686 invoked by uid 500); 13 Sep 2011 22:07:23 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 44661 invoked by uid 99); 13 Sep 2011 22:07:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Sep 2011 22:07:22 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of sebbaz@gmail.com designates 209.85.216.171 as permitted sender) Received: from [209.85.216.171] (HELO mail-qy0-f171.google.com) (209.85.216.171) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Sep 2011 22:07:15 +0000 Received: by qyk29 with SMTP id 29so2635207qyk.9 for ; Tue, 13 Sep 2011 15:06:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=BPU4sdykLCr0fNfwCkQBLxuBH+TXaxoBEiqkdKMaxe0=; b=NGrwCimw2GRYTuOv19ynMLKlWnGGVZzap+W7E32DznnEaNsiT1+1FxYP7zuCuNVGVA zMClUB97R0zvfhJzFOHhrFUwCSsHmXSg1Ph3r3mrITCUPbIQRXjh+2Hfz/cti1IautQp /CQDTNtVxcd2i3Y8rv3CEZSHNgiDmZH05upd8= MIME-Version: 1.0 Received: by 10.52.99.38 with SMTP id en6mr1304676vdb.308.1315951614340; Tue, 13 Sep 2011 15:06:54 -0700 (PDT) Received: by 10.220.155.147 with HTTP; Tue, 13 Sep 2011 15:06:54 -0700 (PDT) In-Reply-To: <4E6FBD94.5030502@oliver-heger.de> References: <4E6FBD94.5030502@oliver-heger.de> Date: Tue, 13 Sep 2011 23:06:54 +0100 Message-ID: Subject: Re: [CONFIGURATION] preserve mulitline property over load and save From: sebb To: Commons Users List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On 13 September 2011 21:31, Oliver Heger wro= te: > Hi Wieland, > > Am 13.09.2011 18:19, schrieb Wieland Gmeiner: >> >> Hi, >> >> i have property values spanning multiple lines like >> >> =A0 =A0 =A0 value =3D aaa, \ >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0bbb >> >> When I load this into a PropertiesConfiguration and later store to a >> file I can only achieve two results, >> >> * having everything on one line like >> >> =A0 =A0 =A0value =3D aaa,bbb >> >> * or a mulitvalue property like >> >> =A0 =A0 =A0value =3D aaa >> =A0 =A0 =A0value =3D bbb >> >> Is there a possiblity to tweak the PropertiesConfiguration so that it >> preserves the original layout over a load/store cycle? Why do you want to do this? > unfortunately, there is no such possibility currently. When the propertie= s > file is read the backslash as line combiner is processed, and the value i= s > stored without any information about a line break. > > I fear that implementing such a feature would not be trivial. You would > probably have to invent a format which tells the configuration that a > property should span multiple lines, but the line break character must no= t > be mixed up with regular content of the property value. > > If you have concrete ideas how to solve this, you might want to open a > feature request in our bug tracking system [1]. It would be quite easy to save all multi-valued properties with \ and line-break between values (as 3rd option), but that would not necessarily preserve the exact original format. And of course the order would almost certainly be different. > Oliver > > [1] http://commons.apache.org/configuration/issue-tracking.html > >> >> Thanks, >> Wieland >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org >> For additional commands, e-mail: user-help@commons.apache.org >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@commons.apache.org > For additional commands, e-mail: user-help@commons.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org