You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by bl...@apache.org on 2004/02/21 03:06:02 UTC

cvs commit: xml-security/src/org/apache/xml/security/utils Base64.java

blautenb    2004/02/20 18:06:02

  Modified:    src/org/apache/xml/security/utils Base64.java
  Log:
  Remove NL at end of exact length line
  
  Revision  Changes    Path
  1.13      +8 -5      xml-security/src/org/apache/xml/security/utils/Base64.java
  
  Index: Base64.java
  ===================================================================
  RCS file: /home/cvs/xml-security/src/org/apache/xml/security/utils/Base64.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- Base64.java	8 Feb 2004 06:11:50 -0000	1.12
  +++ Base64.java	21 Feb 2004 02:06:02 -0000	1.13
  @@ -394,12 +394,15 @@
            encoded.append(encodeFullBlock(raw, i));
         }
   
  -      if (outLen >= wrap) {    //this will produce an extra newline if needed !? Sun had it this way...
  -         encoded.append(LINE_SEPARATOR);
  -      }
  -
         if (len3 < raw.length) {
  -         encoded.append(encodeBlock(raw, len3));
  +
  +		  // BFL - Modified 21/2/2004.  
  +		  // Only add NL if we are appending more data
  +		  if (outLen >= wrap) {
  +			  encoded.append(LINE_SEPARATOR);
  +		  }
  +
  +		  encoded.append(encodeBlock(raw, len3));
         }
   
         return encoded.toString();