You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by st...@apache.org on 2004/05/14 14:56:13 UTC

cvs commit: ws-axis/java/src/org/apache/axis/utils IOUtils.java JavaUtils.java SessionUtils.java StringUtils.java

stevel      2004/05/14 05:56:13

  Modified:    java/src/org/apache/axis/utils IOUtils.java JavaUtils.java
                        SessionUtils.java StringUtils.java
  Log:
  stopping these static classes from being instantiable
  
  Revision  Changes    Path
  1.3       +12 -2     ws-axis/java/src/org/apache/axis/utils/IOUtils.java
  
  Index: IOUtils.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/utils/IOUtils.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- IOUtils.java	25 Feb 2004 14:02:48 -0000	1.2
  +++ IOUtils.java	14 May 2004 12:56:13 -0000	1.3
  @@ -19,10 +19,20 @@
   import java.io.IOException;
   import java.io.InputStream;
   
  +/**
  + * Utility class containing IO helper methods
  + */
   public class IOUtils
   {
  +    private IOUtils() {
  +    }
  +
       /**
  +     * Read into a byte array; tries to ensure that the the
  +     * full buffer is read.
  +     *
        * Helper method, just calls <tt>readFully(in, b, 0, b.length)</tt>
  +     * @see #readFully(java.io.InputStream, byte[], int, int)
        */
       public static int readFully(InputStream in, byte[] b)
       throws IOException
  @@ -34,8 +44,8 @@
        * Same as the normal <tt>in.read(b, off, len)</tt>, but tries to ensure that
        * the entire len number of bytes is read.
        * <p>
  -     * If the end of file is reached before any bytes are read, returns -1.
  -     * Otherwise, returns the number of bytes read.
  +     * @returns the number of bytes read, or -1 if the end of file is
  +     *  reached before any bytes are read
        */
       public static int readFully(InputStream in, byte[] b, int off, int len)
       throws IOException
  
  
  
  1.109     +3 -0      ws-axis/java/src/org/apache/axis/utils/JavaUtils.java
  
  Index: JavaUtils.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/utils/JavaUtils.java,v
  retrieving revision 1.108
  retrieving revision 1.109
  diff -u -r1.108 -r1.109
  --- JavaUtils.java	8 Apr 2004 13:09:05 -0000	1.108
  +++ JavaUtils.java	14 May 2004 12:56:13 -0000	1.109
  @@ -57,6 +57,9 @@
    */
   public class JavaUtils
   {
  +    private JavaUtils() {
  +    }
  +
       protected static Log log =
           LogFactory.getLog(JavaUtils.class.getName());
       
  
  
  
  1.9       +2 -8      ws-axis/java/src/org/apache/axis/utils/SessionUtils.java
  
  Index: SessionUtils.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/utils/SessionUtils.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- SessionUtils.java	25 Feb 2004 14:02:48 -0000	1.8
  +++ SessionUtils.java	14 May 2004 12:56:13 -0000	1.9
  @@ -123,17 +123,11 @@
       /**
        * Method getEntropy
        *
  -     * @return a unique string
  +     * @return a nominally unique string
        */
       private static String getEntropy() {
           if (null == thisHost) {
  -            try {
  -                thisHost = java.net.InetAddress.getLocalHost().getHostName();
  -            } catch (java.net.UnknownHostException e) {
  -                log.error(Messages.getMessage("javaNetUnknownHostException00"),
  -                        e);
  -                thisHost = "localhost";
  -            }
  +            thisHost=NetworkUtils.getLocalHostname();
           }
           StringBuffer s = new StringBuffer();
   
  
  
  
  1.4       +3 -0      ws-axis/java/src/org/apache/axis/utils/StringUtils.java
  
  Index: StringUtils.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/utils/StringUtils.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- StringUtils.java	25 Feb 2004 14:02:48 -0000	1.3
  +++ StringUtils.java	14 May 2004 12:56:13 -0000	1.4
  @@ -20,6 +20,9 @@
   import java.util.List;
   
   public class StringUtils {
  +    private StringUtils() {
  +    }
  +
       /**
        * An empty immutable <code>String</code> array.
        */