commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fanxu123 <...@git.apache.org>
Subject commons-lang pull request: Fix a Octal bug.
Date Mon, 06 May 2013 11:32:49 GMT
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 <fanxu.china@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


Mime
View raw message