Ignore:
Timestamp:
2019-11-27T23:41:30+13:00 (4 years ago)
Author:
ak19
Message:
  1. A bugfix to Base64.decode(String s) to handle null strings returned from Base64.decode(byte[], ...) variant. 2. Adding a copy of the stringToHex function debugUnicodeString() to gli code.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/gli/src/org/greenstone/gatherer/feedback/Base64.java

    r24915 r33724  
    720720    {   
    721721        byte[] bytes = s.getBytes();
     722        byte[] origBytes = bytes;
    722723        bytes = decode( bytes, 0, bytes.length );
    723        
     724       
     725        // if something went wrong base64 decoding the string, just return the original bytes
     726        if(bytes == null) {
     727            return origBytes;
     728        }
     729       
    724730        // Check to see if it's gzip-compressed
    725731        // GZIP Magic Two-Byte Number: 0x8b1f (35615)
Note: See TracChangeset for help on using the changeset viewer.