Return-Path: X-Original-To: apmail-commons-dev-archive@www.apache.org Delivered-To: apmail-commons-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7D0D91090C for ; Mon, 6 May 2013 11:32:53 +0000 (UTC) Received: (qmail 72847 invoked by uid 500); 6 May 2013 11:32:53 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 71815 invoked by uid 500); 6 May 2013 11:32:51 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 71765 invoked by uid 99); 6 May 2013 11:32:50 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 May 2013 11:32:50 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id ED126887776; Mon, 6 May 2013 11:32:49 +0000 (UTC) From: fanxu123 To: dev@commons.apache.org Subject: commons-lang pull request: Fix a Octal bug. Content-Type: text/plain Message-Id: <20130506113249.ED126887776@tyr.zones.apache.org> Date: Mon, 6 May 2013 11:32:49 +0000 (UTC) GitHub user fanxu123 opened a pull request: https://github.com/apache/commons-lang/pull/5 Fix a Octal bug. For escaped strings like "x\0365x", only "\036" is the octal number, but in the original codes, it consides "\0365" (5 added) as the octal number, and invoke a NumberFormatException at out.write( Integer.parseInt(input.subSequence(start, end).toString(), 8) ); As we know, octal number is only 3 chars. So I add a if-section. You can merge this pull request into a Git repository by running: $ git pull https://github.com/fanxu123/commons-lang trunk Alternatively you can review and apply these changes as the patch at: https://github.com/apache/commons-lang/pull/5.patch ---- commit e9b575898f638a2dc4778de6978c4b6e5936f9c1 Author: FX Date: 2013-05-06T11:32:14Z Fix a Octal bug. For escaped strings like "x\0365x", only "\036" is the octal number, but in the original codes, it consides "\0365" (5 added) as the octal number, and invoke a NumberFormatException at out.write( Integer.parseInt(input.subSequence(start, end).toString(), 8) ); As we know, octal number is only 3 chars. So I add a if-section. ---- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org