jeremias 2003/07/29 06:07:39 Modified: io/src/java/org/apache/commons/io FileUtils.java IOUtils.java HexDump.java EndianUtils.java Log: Remove private constructors because of problems with Velocity which needs an instance (Christoph Reck) some todos. Revision Changes Path 1.13 +7 -9 jakarta-commons-sandbox/io/src/java/org/apache/commons/io/FileUtils.java Index: FileUtils.java =================================================================== RCS file: /home/cvs/jakarta-commons-sandbox/io/src/java/org/apache/commons/io/FileUtils.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- FileUtils.java 27 Jul 2003 17:20:23 -0000 1.12 +++ FileUtils.java 29 Jul 2003 13:07:39 -0000 1.13 @@ -123,14 +123,6 @@ public static final int ONE_GB = ONE_KB * ONE_MB; /** - * Private constructor to prevent instantiation. - * - */ - private FileUtils() - { - } - - /** * Returns a human-readable version of the file size (original is in * bytes). * @@ -158,6 +150,8 @@ * Matches the equally named unix command. * @param filename filename to inspect * @return The directory portion excluding the ending file separator. + * @deprecated use getPath() instead. + * TODO DELETE before 1.0 */ public static String dirname(String filename) { int i = filename.lastIndexOf(File.separator); @@ -168,6 +162,8 @@ * Returns the filename portion of a file specification string. * @param filename filename to inspect * @return The filename string with extension. + * @deprecated use removeExtension() instead. + * TODO DELETE before 1.0 */ public static String filename(String filename) { int i = filename.lastIndexOf(File.separator); @@ -179,6 +175,7 @@ * Matches the equally named unix command. * @param filename filename to inspect * @return The filename string without extension. + * TODO DELETE before 1.0 */ public static String basename(String filename) { return basename(filename, extension(filename)); @@ -212,6 +209,7 @@ * the dot). * @param filename filename to inspect * @return the extension + * TODO probably duplicate method. See getExtension */ public static String extension(String filename) { int lastDot = filename.lastIndexOf('.'); 1.4 +1 -8 jakarta-commons-sandbox/io/src/java/org/apache/commons/io/IOUtils.java Index: IOUtils.java =================================================================== RCS file: /home/cvs/jakarta-commons-sandbox/io/src/java/org/apache/commons/io/IOUtils.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- IOUtils.java 27 Jul 2003 17:21:27 -0000 1.3 +++ IOUtils.java 29 Jul 2003 13:07:39 -0000 1.4 @@ -151,13 +151,6 @@ private static final int DEFAULT_BUFFER_SIZE = 1024 * 4; /** - * Private constructor to prevent instantiation. - */ - private IOUtils() - { - } - - /** * Unconditionally close an <code>Reader</code>. * Equivalent to [EMAIL PROTECTED] Reader#close()}, except any exceptions will be ignored. * 1.3 +4 -8 jakarta-commons-sandbox/io/src/java/org/apache/commons/io/HexDump.java Index: HexDump.java =================================================================== RCS file: /home/cvs/jakarta-commons-sandbox/io/src/java/org/apache/commons/io/HexDump.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- HexDump.java 27 Jul 2003 17:20:59 -0000 1.2 +++ HexDump.java 29 Jul 2003 13:07:39 -0000 1.3 @@ -74,10 +74,6 @@ */ public class HexDump { - // all static methods, so no need for a public constructor - private HexDump() { - } - /** * dump an array of bytes to an OutputStream * 1.3 +1 -7 jakarta-commons-sandbox/io/src/java/org/apache/commons/io/EndianUtils.java Index: EndianUtils.java =================================================================== RCS file: /home/cvs/jakarta-commons-sandbox/io/src/java/org/apache/commons/io/EndianUtils.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- EndianUtils.java 27 Jul 2003 17:18:40 -0000 1.2 +++ EndianUtils.java 29 Jul 2003 13:07:39 -0000 1.3 @@ -69,12 +69,6 @@ public final class EndianUtils { - /** - * Private constructor to avoid instantiation. - */ - private EndianUtils() { - } - // ========================================== Swapping routines /**
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]