ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conor MacNeill" <co...@cortexebusiness.com.au>
Subject Re: cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs Javadoc.java
Date Sun, 18 Feb 2001 14:51:44 GMT
Perhaps this testing should be factored out into a private method?

Conor

----- Original Message -----
From: <nico@apache.org>
To: <jakarta-ant-cvs@apache.org>
Sent: Monday, February 19, 2001 1:07 AM
Subject: cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs
Javadoc.java


> nico        01/02/18 06:07:04
>
>   Modified:    src/main/org/apache/tools/ant/taskdefs Tag: ANT_13_BRANCH
>                         Javadoc.java
>   Log:
>   Don't append empty windowtitle, doctitle, header, footer, bottom or
charset-parameters.
>
>   Fix for Bug 622
>
>   Revision  Changes    Path
>   No                   revision
>
>
>   No                   revision
>
>
>   1.43.2.2  +42 -12
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
>
>   Index: Javadoc.java
>   ===================================================================
>   RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Javadoc.java,v
>   retrieving revision 1.43.2.1
>   retrieving revision 1.43.2.2
>   diff -u -r1.43.2.1 -r1.43.2.2
>   --- Javadoc.java 2001/02/06 14:26:10 1.43.2.1
>   +++ Javadoc.java 2001/02/18 14:07:04 1.43.2.2
>   @@ -388,32 +388,57 @@
>        }
>        public void setWindowtitle(String src) {
>            if (!javadoc1) {
>   -            cmd.createArgument().setValue("-windowtitle");
>   -            cmd.createArgument().setValue(src);
>   +            if (src != null && src.length() != 0) {
>   +                cmd.createArgument().setValue("-windowtitle");
>   +                cmd.createArgument().setValue(src);
>   +            } else {
>   +                project.log(this, "Warning: Leaving out empty
'windowtitle'",
>   +                            Project.MSG_WARN);
>   +            }
>            }
>        }
>        public void setDoctitle(String src) {
>            if (!javadoc1) {
>   -            cmd.createArgument().setValue("-doctitle");
>   -            cmd.createArgument().setValue(src);
>   +            if (src != null && src.length() != 0) {
>   +                cmd.createArgument().setValue("-doctitle");
>   +                cmd.createArgument().setValue(src);
>   +            } else {
>   +                project.log(this, "Warning: Leaving out empty
'doctitle'",
>   +                            Project.MSG_WARN);
>   +            }
>            }
>        }
>        public void setHeader(String src) {
>            if (!javadoc1) {
>   -            cmd.createArgument().setValue("-header");
>   -            cmd.createArgument().setValue(src);
>   +            if (src != null && src.length() != 0) {
>   +                cmd.createArgument().setValue("-header");
>   +                cmd.createArgument().setValue(src);
>   +            } else {
>   +                project.log(this, "Warning: Leaving out empty
'header'",
>   +                            Project.MSG_WARN);
>   +            }
>            }
>        }
>        public void setFooter(String src) {
>            if (!javadoc1) {
>   -            cmd.createArgument().setValue("-footer");
>   -            cmd.createArgument().setValue(src);
>   +            if (src != null && src.length() != 0) {
>   +                cmd.createArgument().setValue("-footer");
>   +                cmd.createArgument().setValue(src);
>   +            } else {
>   +                project.log(this, "Warning: Leaving out empty
'footer'",
>   +                            Project.MSG_WARN);
>   +            }
>            }
>        }
>        public void setBottom(String src) {
>            if (!javadoc1) {
>   -            cmd.createArgument().setValue("-bottom");
>   -            cmd.createArgument().setValue(src);
>   +            if (src != null && src.length() != 0) {
>   +                cmd.createArgument().setValue("-bottom");
>   +                cmd.createArgument().setValue(src);
>   +            } else {
>   +                project.log(this, "Warning: Leaving out empty
'bottom'",
>   +                            Project.MSG_WARN);
>   +            }
>            }
>        }
>        public void setLinkoffline(String src) {
>   @@ -554,8 +579,13 @@
>
>        public void setCharset(String src) {
>            if (!javadoc1) {
>   -            cmd.createArgument().setValue("-charset");
>   -            cmd.createArgument().setValue(src);
>   +            if (src != null && src.length() != 0) {
>   +                cmd.createArgument().setValue("-charset");
>   +                cmd.createArgument().setValue(src);
>   +            } else {
>   +                project.log(this, "Warning: Leaving out empty
'charset'",
>   +                            Project.MSG_WARN);
>   +            }
>            }
>        }
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ant-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: ant-dev-help@jakarta.apache.org
>
>


Mime
View raw message