commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scolebou...@apache.org
Subject svn commit: r369075 - in /jakarta/commons/proper/io/trunk: ./ src/java/org/apache/commons/io/ src/java/org/apache/commons/io/filefilter/ src/java/org/apache/commons/io/input/ src/java/org/apache/commons/io/output/
Date Sat, 14 Jan 2006 18:23:51 GMT
Author: scolebourne
Date: Sat Jan 14 10:23:42 2006
New Revision: 369075

URL: http://svn.apache.org/viewcvs?rev=369075&view=rev
Log:
Fix checkstyle errors
bug 38145, from Niall Pemberton

Modified:
    jakarta/commons/proper/io/trunk/checkstyle.xml
    jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/HexDump.java
    jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/filefilter/AgeFileFilter.java
    jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/filefilter/FileFilterUtils.java
    jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/input/ClassLoaderObjectInputStream.java
    jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/output/ByteArrayOutputStream.java

Modified: jakarta/commons/proper/io/trunk/checkstyle.xml
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/io/trunk/checkstyle.xml?rev=369075&r1=369074&r2=369075&view=diff
==============================================================================
--- jakarta/commons/proper/io/trunk/checkstyle.xml (original)
+++ jakarta/commons/proper/io/trunk/checkstyle.xml Sat Jan 14 10:23:42 2006
@@ -31,6 +31,7 @@
     <module name="NeedBraces"/>
     <module name="RedundantThrows">
       <property name="allowUnchecked" value="true"/>
+      <property name="allowSubclasses" value="true"/>
     </module>
     <module name="LineLength">
       <property name="max" value="120"/>

Modified: jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/HexDump.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/HexDump.java?rev=369075&r1=369074&r2=369075&view=diff
==============================================================================
--- jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/HexDump.java (original)
+++ jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/HexDump.java Sat Jan 14
10:23:42 2006
@@ -1,5 +1,5 @@
 /*
- * Copyright 2002,2004-2005 The Apache Software Foundation.
+ * Copyright 2002,2004-2006 The Apache Software Foundation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -42,9 +42,9 @@
     /**
      * Dump an array of bytes to an OutputStream.
      *
-     * @param data the byte array to be dumped
-     * @param offset its offset, whatever that might mean
-     * @param stream the OutputStream to which the data is to be
+     * @param data  the byte array to be dumped
+     * @param offset  its offset, whatever that might mean
+     * @param stream  the OutputStream to which the data is to be
      *               written
      * @param index initial index into the byte array
      *
@@ -118,6 +118,12 @@
                 28, 24, 20, 16, 12, 8, 4, 0
             };
 
+    /**
+     * Dump a long value into a StringBuffer.
+     *
+     * @param value  the long value to be dumped
+     * @return StringBuffer containing the dumped value.
+     */
     private static StringBuffer dump(long value) {
         _lbuffer.setLength(0);
         for (int j = 0; j < 8; j++) {
@@ -127,6 +133,12 @@
         return _lbuffer;
     }
 
+    /**
+     * Dump a byte value into a StringBuffer.
+     *
+     * @param value  the byte value to be dumped
+     * @return StringBuffer containing the dumped value.
+     */
     private static StringBuffer dump(byte value) {
         _cbuffer.setLength(0);
         for (int j = 0; j < 2; j++) {
@@ -134,4 +146,5 @@
         }
         return _cbuffer;
     }
+
 }

Modified: jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/filefilter/AgeFileFilter.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/filefilter/AgeFileFilter.java?rev=369075&r1=369074&r2=369075&view=diff
==============================================================================
--- jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/filefilter/AgeFileFilter.java
(original)
+++ jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/filefilter/AgeFileFilter.java
Sat Jan 14 10:23:42 2006
@@ -50,7 +50,7 @@
     /**
      * Constructs a new age file filter for files older than a certain cutoff.
      *
-     * @param age  the threshold age of the files
+     * @param cutoff  the threshold age of the files
      */
     public AgeFileFilter(long cutoff) {
         this(cutoff, true);
@@ -60,7 +60,7 @@
      * Constructs a new age file filter for files on any one side
      * of a certain cutoff.
      *
-     * @param age  the threshold age of the files
+     * @param cutoff  the threshold age of the files
      * @param acceptOlder  if true, older files are accepted, else newer ones
      */
     public AgeFileFilter(long cutoff, boolean acceptOlder) {
@@ -72,7 +72,7 @@
      * Constructs a new age file filter for files older than a certain
      * cutoff date.
      *
-     * @param age  the threshold age of the files
+     * @param cutoffDate  the threshold age of the files
      */
     public AgeFileFilter(Date cutoffDate) {
         this(cutoffDate, true);
@@ -82,7 +82,7 @@
      * Constructs a new age file filter for files on any one side
      * of a certain cutoff date.
      *
-     * @param age  the threshold age of the files
+     * @param cutoffDate  the threshold age of the files
      * @param acceptOlder  if true, older files are accepted, else newer ones
      */
     public AgeFileFilter(Date cutoffDate, boolean acceptOlder) {
@@ -93,7 +93,8 @@
      * Constructs a new age file filter for files older than a certain
      * File (whose last modification time will be used as reference).
      *
-     * @param age  the threshold age of the files
+     * @param cutoffReference  the file whose last modification
+     *        time is usesd as the threshold age of the files
      */
     public AgeFileFilter(File cutoffReference) {
         this(cutoffReference, true);
@@ -104,7 +105,8 @@
      * of a certain File (whose last modification time will be used as
      * reference).
      *
-     * @param age  the threshold age of the files
+     * @param cutoffReference  the file whose last modification
+     *        time is usesd as the threshold age of the files
      * @param acceptOlder  if true, older files are accepted, else newer ones
      */
     public AgeFileFilter(File cutoffReference, boolean acceptOlder) {

Modified: jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/filefilter/FileFilterUtils.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/filefilter/FileFilterUtils.java?rev=369075&r1=369074&r2=369075&view=diff
==============================================================================
--- jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/filefilter/FileFilterUtils.java
(original)
+++ jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/filefilter/FileFilterUtils.java
Sat Jan 14 10:23:42 2006
@@ -237,7 +237,7 @@
      * Returns a filter that returns true if the file was last modified after
      * the specified cutoff date.
      *
-     * @param cutoff  the time threshold
+     * @param cutoffDate  the time threshold
      * @return an appropriately configured age file filter
      * @since Commons IO 1.2
      */
@@ -248,7 +248,7 @@
     /**
      * Returns a filter that filters files based on a cutoff date.
      *
-     * @param cutoff  the time threshold
+     * @param cutoffDate  the time threshold
      * @param acceptOlder  if true, older files get accepted, if false, newer
      * @return an appropriately configured age file filter
      * @since Commons IO 1.2
@@ -261,7 +261,8 @@
      * Returns a filter that returns true if the file was last modified after
      * the specified reference file.
      *
-     * @param cutoff  the time threshold
+     * @param cutoffReference  the file whose last modification
+     *        time is usesd as the threshold age of the files
      * @return an appropriately configured age file filter
      * @since Commons IO 1.2
      */
@@ -272,7 +273,8 @@
     /**
      * Returns a filter that filters files based on a cutoff reference file.
      *
-     * @param cutoff  the time threshold
+     * @param cutoffReference  the file whose last modification
+     *        time is usesd as the threshold age of the files
      * @param acceptOlder  if true, older files get accepted, if false, newer
      * @return an appropriately configured age file filter
      * @since Commons IO 1.2
@@ -285,7 +287,7 @@
     /**
      * Returns a filter that returns true if the file is bigger than a certain size.
      *
-     * @param long  the file size threshold
+     * @param threshold  the file size threshold
      * @return an appropriately configured SizeFileFilter
      * @since Commons IO 1.2
      */
@@ -296,7 +298,7 @@
     /**
      * Returns a filter that filters based on file size.
      *
-     * @param long  the file size threshold
+     * @param threshold  the file size threshold
      * @param acceptLarger  if true, larger files get accepted, if false, smaller
      * @return an appropriately configured SizeFileFilter
      * @since Commons IO 1.2

Modified: jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/input/ClassLoaderObjectInputStream.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/input/ClassLoaderObjectInputStream.java?rev=369075&r1=369074&r2=369075&view=diff
==============================================================================
--- jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/input/ClassLoaderObjectInputStream.java
(original)
+++ jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/input/ClassLoaderObjectInputStream.java
Sat Jan 14 10:23:42 2006
@@ -1,5 +1,5 @@
 /*
- * Copyright 2001-2005 The Apache Software Foundation.
+ * Copyright 2001-2006 The Apache Software Foundation.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -51,7 +51,15 @@
         this.classLoader = classLoader;
     }
 
-    /** @inheritDoc */
+    /**
+     * Resolve a class specified by the descriptor using the
+     * specified ClassLoader or the super ClassLoader.
+     *
+     * @param objectStreamClass  descriptor of the class
+     * @return the Class object described by the ObjectStreamClass
+     * @throws IOException in case of an I/O error
+     * @throws ClassNotFoundException if the Class cannot be found
+     */
     protected Class resolveClass(ObjectStreamClass objectStreamClass)
             throws IOException, ClassNotFoundException {
         

Modified: jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/output/ByteArrayOutputStream.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/output/ByteArrayOutputStream.java?rev=369075&r1=369074&r2=369075&view=diff
==============================================================================
--- jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/output/ByteArrayOutputStream.java
(original)
+++ jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/output/ByteArrayOutputStream.java
Sat Jan 14 10:23:42 2006
@@ -1,5 +1,5 @@
 /*
- * Copyright 2003,2004 The Apache Software Foundation.
+ * Copyright 2003-2006 The Apache Software Foundation.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -64,8 +64,8 @@
      * Creates a new byte array output stream, with a buffer capacity of 
      * the specified size, in bytes. 
      *
-     * @param size the initial size.
-     * @exception IllegalArgumentException if size is negative.
+     * @param size  the initial size
+     * @throws IllegalArgumentException if size is negative
      */
     public ByteArrayOutputStream(int size) {
         if (size < 0) {
@@ -75,10 +75,23 @@
         needNewBuffer(size);
     }
 
+    /**
+     * Return the appropriate <code>byte[]</code> buffer 
+     * specified by index.
+     *
+     * @param index  the index of the buffer required
+     * @return the buffer
+     */
     private byte[] getBuffer(int index) {
         return (byte[])buffers.get(index);
     }
 
+    /**
+     * Makes a new buffer available either by allocating
+     * a new one or re-cycling an existing one.
+     *
+     * @param newcount  the size of the buffer if one is created
+     */
     private void needNewBuffer(int newcount) {
         if (currentBufferIndex < buffers.size() - 1) {
             //Recycling old buffer
@@ -168,7 +181,7 @@
         currentBufferIndex = 0;
         currentBuffer = getBuffer(currentBufferIndex);
     }
-    
+
     /**
      * @see java.io.ByteArrayOutputStream#writeTo(OutputStream)
      */



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message