diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/unix/Chmod.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/unix/Chmod.java index f442d2744..7c608c9ee 100644 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/unix/Chmod.java +++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/unix/Chmod.java @@ -107,10 +107,10 @@ public class Chmod extends ExecuteOn havePerm = true; } - public void setSkipEmptyFilesets( boolean skip ) - throws TaskException + public void setSkipEmptyFilesets( final boolean skip ) { - throw new TaskException( getName() + " doesn\'t support the skipemptyfileset attribute" ); + final String message = getName() + " doesn\'t support the skipemptyfileset attribute"; + throw new IllegalArgumentException( message ); } /** @@ -168,7 +168,8 @@ public class Chmod extends ExecuteOn } catch( IOException e ) { - throw new TaskException( "Execute failed: " + e, e ); + final String message = "Execute failed: " + e; + throw new TaskException( message, e ); } finally { diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/unix/Chmod.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/unix/Chmod.java index f442d2744..7c608c9ee 100644 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/unix/Chmod.java +++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/unix/Chmod.java @@ -107,10 +107,10 @@ public class Chmod extends ExecuteOn havePerm = true; } - public void setSkipEmptyFilesets( boolean skip ) - throws TaskException + public void setSkipEmptyFilesets( final boolean skip ) { - throw new TaskException( getName() + " doesn\'t support the skipemptyfileset attribute" ); + final String message = getName() + " doesn\'t support the skipemptyfileset attribute"; + throw new IllegalArgumentException( message ); } /** @@ -168,7 +168,8 @@ public class Chmod extends ExecuteOn } catch( IOException e ) { - throw new TaskException( "Execute failed: " + e, e ); + final String message = "Execute failed: " + e; + throw new TaskException( message, e ); } finally {