Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 99760 invoked from network); 25 Jun 2009 12:49:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 25 Jun 2009 12:49:09 -0000 Received: (qmail 34761 invoked by uid 500); 25 Jun 2009 12:49:20 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 34741 invoked by uid 500); 25 Jun 2009 12:49:20 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 34733 invoked by uid 99); 25 Jun 2009 12:49:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Jun 2009 12:49:20 +0000 X-ASF-Spam-Status: No, hits=2.9 required=10.0 tests=HTML_MESSAGE,SPF_SOFTFAIL X-Spam-Check-By: apache.org Received-SPF: softfail (nike.apache.org: transitioning domain of tiago@espinhas.net does not designate 209.85.219.211 as permitted sender) Received: from [209.85.219.211] (HELO mail-ew0-f211.google.com) (209.85.219.211) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Jun 2009 12:49:10 +0000 Received: by ewy7 with SMTP id 7so2162887ewy.7 for ; Thu, 25 Jun 2009 05:48:49 -0700 (PDT) MIME-Version: 1.0 Received: by 10.210.38.5 with SMTP id l5mr2091267ebl.53.1245934118691; Thu, 25 Jun 2009 05:48:38 -0700 (PDT) In-Reply-To: <4A4370B3.9020003@sbcglobal.net> References: <4A4370B3.9020003@sbcglobal.net> Date: Thu, 25 Jun 2009 13:48:38 +0100 Message-ID: Subject: Re: Java 1.4.2 or Java6? From: Tiago Espinha To: derby-dev@db.apache.org Content-Type: multipart/alternative; boundary=001517478be88eec48046d2ba4f0 X-Virus-Checked: Checked by ClamAV on apache.org --001517478be88eec48046d2ba4f0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit It is available in 1.4.2 indeed and that will have to do. The thing is that replaceAll uses regex and not regular string matching. I'm thinking I'll end up dropping the replacing altogether. This was just for pruning the output that I am parsing as I go, but I can just not prune it and it'll be fine anyway. The trade-off between doing a regex search and having to search through some more characters is probably balanced, and regex would introduce some more issues in the end. On Thu, Jun 25, 2009 at 1:42 PM, Kathey Marsden wrote: > Tiago Espinha wrote: > >> >> Finally, for some background, the overload is the >> String.replace(CharSequence, CharSequence);. On 1.4.2 there is only a >> replace method in Strings that takes two chars and it doesn't allow us to >> replace whole chunks of a string, so that's why I got the error. If I have >> to make it 1.4.2-compatible I am also open to suggestions on replacing >> chunks of a string, in this case with an empty string (so in essence, >> removing whole pieces of a string a string). >> >> I think replaceAll is available on 1.4.2. Will that work for you? > > --001517478be88eec48046d2ba4f0 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable It is available in 1.4.2 indeed and that will have to do. The thing is that= replaceAll uses regex and not regular string matching.

I'm thin= king I'll end up dropping the replacing altogether. This was just for p= runing the output that I am parsing as I go, but I can just not prune it an= d it'll be fine anyway. The trade-off between doing a regex search and = having to search through some more characters is probably balanced, and reg= ex would introduce some more issues in the end.

On Thu, Jun 25, 2009 at 1:42 PM, Kathey Mars= den <km= arsdenderby@sbcglobal.net> wrote:
Tiago Espinha wrote:

Finally, for some background, the overload is the String.replace(CharSequen= ce, CharSequence);. On 1.4.2 there is only a replace method in Strings that= takes two chars and it doesn't allow us to replace whole chunks of a s= tring, so that's why I got the error. If I have to make it 1.4.2-compat= ible I am also open to suggestions on replacing chunks of a string, in this= case with an empty string (so in essence, removing whole pieces of a strin= g a string).

I think replaceAll is available on 1.4.2. Will that work for you?


--001517478be88eec48046d2ba4f0--