You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by vd...@apache.org on 2003/11/20 10:01:04 UTC

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

vdkoogh     2003/11/20 01:01:04

  Modified:    src/org/apache/xml/security/utils HexDump.java XMLUtils.java
                        Base64.java
  Log:
  Some cleanup
  
  CVS: ----------------------------------------------------------------------
  CVS: PR:
  CVS:   If this change addresses a PR in the problem report tracking
  CVS:   database, then enter the PR number(s) here.
  CVS: Obtained from:
  CVS:   If this change has been taken from another system, such as NCSA,
  CVS:   then name the system in this line, otherwise delete it.
  CVS: Submitted by:
  CVS:   If this code has been contributed to Apache by someone else; i.e.,
  CVS:   they sent us a patch or a new module, then include their name/email
  CVS:   address here. If this is your work then delete this line.
  CVS: Reviewed by:
  CVS:   If we are doing pre-commit code reviews and someone else has
  CVS:   reviewed your changes, include their name(s) here.
  CVS:   If you have not had it reviewed then delete this line.
  
  Revision  Changes    Path
  1.9       +1 -28     xml-security/src/org/apache/xml/security/utils/HexDump.java
  
  Index: HexDump.java
  ===================================================================
  RCS file: /home/cvs/xml-security/src/org/apache/xml/security/utils/HexDump.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- HexDump.java	11 Feb 2003 16:02:53 -0000	1.8
  +++ HexDump.java	20 Nov 2003 09:01:03 -0000	1.9
  @@ -56,24 +56,18 @@
    * For more information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -package org.apache.xml.security.utils;
   
  +package org.apache.xml.security.utils;
   
   import java.io.ByteArrayOutputStream;
   
   import sun.misc.HexDumpEncoder;
   
  -
   /**
    *
    * @author Niko Schweitzer
    */
   public class HexDump {
  -
  -   private HexDump() {
  -     // we don't allow instantiation
  -   }
  -
      /**
       * Method prettyPrintHex
       *
  @@ -99,9 +93,6 @@
         return prettyPrintHex(sToConvert.getBytes());
      }
   
  -   /** Field DEBUG */
  -   private static boolean DEBUG = false;
  -
      /** Field HEX_DIGITS */
      private final static char[] HEX_DIGITS = { '0', '1', '2', '3', '4', '5', '6',
                                                 '7', '8', '9', 'A', 'B', 'C', 'D',
  @@ -122,14 +113,6 @@
      /** Field WITH_BYTE_SEPARATOR */
      private static boolean WITH_BYTE_SEPARATOR = true;
   
  -   /**
  -    *  Sets the Debug attribute of the Convert object
  -    *
  -    * @param  dbg  The new Debug value
  -    */
  -   public static void setDebug(boolean dbg) {
  -      DEBUG = dbg;
  -   }
   
      /**
       *  Sets the WithByteSeparator attribute of the Convert class
  @@ -322,7 +305,6 @@
       */
      public static String byteArrayToHexString(byte[] block) {
   
  -      long lTime = System.currentTimeMillis();
         StringBuffer buf = new StringBuffer();
         int len = block.length;
   
  @@ -361,7 +343,6 @@
      public static String byteArrayToHexString(byte[] block, int offset,
                                                int length) {
   
  -      long lTime = System.currentTimeMillis();
         StringBuffer buf = new StringBuffer();
         int len = block.length;
   
  @@ -473,7 +454,6 @@
       */
      public static String toHexString(byte[] ba, int offset, int length) {
   
  -      long lTime = System.currentTimeMillis();
         char[] buf;
   
         if (WITH_BYTE_SEPARATOR) {
  @@ -768,9 +748,6 @@
   
         System.out.println("-test and demo of the converter ");
   
  -      // enable debug outputs
  -      setDebug(false);
  -
         String str = new String("Niko");
         byte[] ba = str.getBytes();
   
  @@ -882,10 +859,6 @@
         System.out.println(strToConvert + " = "
                            + stringToHexString(strToConvert));
         System.out.println("Das ist die Hex-Darstellung des obigen Strings");
  -
  -      byte[] baConverted = new byte[strToConvert.length()];
  -
  -      baConverted = hexStringToByteArray(strToConvert);
   
         System.out.println("ba = " + toHexString(ba));
      }
  
  
  
  1.34      +0 -1      xml-security/src/org/apache/xml/security/utils/XMLUtils.java
  
  Index: XMLUtils.java
  ===================================================================
  RCS file: /home/cvs/xml-security/src/org/apache/xml/security/utils/XMLUtils.java,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- XMLUtils.java	23 May 2003 07:52:28 -0000	1.33
  +++ XMLUtils.java	20 Nov 2003 09:01:03 -0000	1.34
  @@ -323,7 +323,6 @@
      protected static ClassLoader findClassLoader()
              throws ClassNotFoundException {
   
  -      ClassLoader classLoader = null;
         Method m = null;
   
         try {
  
  
  
  1.11      +0 -4      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.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- Base64.java	29 Apr 2003 21:36:56 -0000	1.10
  +++ Base64.java	20 Nov 2003 09:01:03 -0000	1.11
  @@ -494,10 +494,6 @@
   
         int block = 0;
         int slack = raw.length - offset - 1;
  -      int end = (slack >= 2)
  -                ? 2
  -                : slack;
  -
         for (int i = 0; i < 3; i++) {
            byte b = (offset + i < raw.length)
                     ? raw[offset + i]