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 <[email protected]>
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: [email protected]
For additional commands, e-mail: [email protected]