I was looking at that method yesterday and wondering why it was
deprecated. Anyone know?

--
Martin Cooper


On 25 Oct 2004 23:27:42 -0000, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> scolebourne    2004/10/25 16:27:41
> 
>  Modified:    io/src/java/org/apache/commons/io FilenameUtils.java
>  Log:
>  Remove deprecated method for first release
> 
>  Revision  Changes    Path
>  1.14      +2 -28     
> jakarta-commons/io/src/java/org/apache/commons/io/FilenameUtils.java
> 
>  Index: FilenameUtils.java
>  ===================================================================
>  RCS file: 
> /home/cvs/jakarta-commons/io/src/java/org/apache/commons/io/FilenameUtils.java,v
>  retrieving revision 1.13
>  retrieving revision 1.14
>  diff -u -r1.13 -r1.14
>  --- FilenameUtils.java        24 Oct 2004 18:34:23 -0000      1.13
>  +++ FilenameUtils.java        25 Oct 2004 23:27:41 -0000      1.14
>  @@ -56,6 +56,7 @@
>    * @author Martin Cooper
>    * @author <a href="mailto:[EMAIL PROTECTED]">Jeremias Maerki</a>
>    * @version $Id$
>  + * @since Commons IO 1.1
>    */
>   public class FilenameUtils {
> 
>  @@ -462,33 +463,6 @@
>               path = path.replace(INTERNAL_SEPARATOR_CHAR, File.separatorChar);
>           }
>           return path;
>  -    }
>  -
>  -    // DEPRECATED. Though no replacement exists.
>  -
>  -    /**
>  -     * Returns the filename portion of a file specification string.
>  -     * Matches the equally named unix command.
>  -     * @param filename filename to inspect
>  -     * @param suffix additional remaining portion of name that if matches will
>  -     * be removed
>  -     * @return The filename string without the suffix.
>  -     * @deprecated This method will be deleted.
>  -     */
>  -    public static String basename(String filename, String suffix) {
>  -        int i = filename.lastIndexOf(File.separator) + 1;
>  -        int lastDot =
>  -            ((suffix != null) && (suffix.length() > 0))
>  -                ? filename.lastIndexOf(suffix)
>  -                : -1;
>  -
>  -        if (lastDot >= 0) {
>  -            return filename.substring(i, lastDot);
>  -        } else if (i > 0) {
>  -            return filename.substring(i);
>  -        } else {
>  -            return filename; // else returns all (no path and no extension)
>  -        }
>       }
> 
>   }
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to