You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by fanxu123 <gi...@git.apache.org> on 2013/05/06 13:32:49 UTC

commons-lang pull request: Fix a Octal bug.

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 <fa...@gmail.com>
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