I've noticed that emacs is one of the better editors for this - it seems to
know how to save the files correctly no matter what the platform is. Many
of the primarily windows editors can cause this problem.
Here's the vi (or "vim" since you are using cygwin) command I use to clean
this up:
:0,$s/.$//
This simply deletes the last character on every line of the file.
Kevin
"Craig R. McClanahan" <[EMAIL PROTECTED]> on 11/08/2002 12:20:45 PM
Please respond to "Struts Developers List" <[EMAIL PROTECTED]>
To: Struts Developers List <[EMAIL PROTECTED]>
cc: (bcc: Kevin Bedell/Systems/USHO/SunLife)
Subject: Re: javadoc & Weird state of
org/apache/struts/util/AppException.java
On 7 Nov 2002, David M. Karr wrote:
> Date: 07 Nov 2002 22:10:21 -0800
> From: David M. Karr <[EMAIL PROTECTED]>
> Reply-To: Struts Developers List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: javadoc & Weird state of
org/apache/struts/util/AppException.java
>
> When I view the file "src/share/org/apache/struts/util/AppException.java"
in
> Cygwin/XEmacs (binmode), it shows up as a SINGLE line (the entire file),
with
> linefeeds ("\r" in "od") instead of newlines. I see just about the same
in
> "vi". I noticed David G. made some formatting changes in this file a
couple of
> weeks ago. Apparently every other line was a blank line, for some
reason?
> The blank lines appeared when Rob Leland made some minor changes about 7
weeks
> ago. In my copy, if I just replace the "^M"s (what shows in XEmacs) with
a
> newline, the file looks fine, and the "od" output shows normal newlines
(just
> like other files).
>
> I also notice that in "src/share/org/apache/struts/validator",
> "ValidatorForm.java" and "DynaValidatorForm.java" are in the same state.
>
As others have pointed out, this generally happens when you check
something out under DOS and check it in under Unix (real easy to do by
accident if you've got your CVS checkout directory mapped to both kinds of
systems). I don't use CYGWIN, but wouldn't be surprised if it is
sometimes schizophrenic with regard to it's true nature :-)
In the past, I've been able to fix this kind of thing as follows:
* Check out on a DOS system
* Use a text editor that knows how to reformat the
line endings to Unix style (I like Textpad for this)
* Check it back in on the DOS system.
The alternative is to delete and readd the file, but that makes the change
history harder to follow.
> These are noticeable because the build reports javadoc warnings on these
files
> (and some others which I'm still trying to figure out).
>
The most common one was introduced by JDK 1.4, and is really annoying --
it does not like a question mark at the end of the first sentence. This
makes it tough to document boolean getter methods and variables, where it
is quite natural to say things like:
/**
* Is this component active?
*/
boolean active = true;
Sigh.
> Looking at these errors also points out the "-breakiterator" option to
javadoc,
> which is new to me. Apparently this causes it to use a more intelligent
> algorithm for determining the end of a sentence (although it's apparently
the
> default in JDK 1.4). Apparently there are several examples of "i.e." in
Struts
> javadoc that causes a truncated string in the generated javadoc.
That one causes problems, too, because it is misinterpreted as a sentence
ending. I've taken to using "ie" instead of "i.e.".
> Unfortunately, I don't see any way to provide this option to the
"javadoc" task
> in Ant, so I can at least (easily) see what it does.
>
> --
> ===================================================================
> David M. Karr ; Java/J2EE/XML/Unix/C++
> [EMAIL PROTECTED] ; SCJP
>
>
Craig
--
To unsubscribe, e-mail: <mailto:struts-dev-unsubscribe@;jakarta.apache.org
>
For additional commands, e-mail: <mailto:struts-dev-help@;jakarta.apache.org
>
---------------------------------------------------------------------------
This e-mail message (including attachments, if any) is intended for the use
of the individual or entity to which it is addressed and may contain
information that is privileged, proprietary , confidential and exempt from
disclosure. If you are not the intended recipient, you are notified that
any dissemination, distribution or copying of this communication is
strictly prohibited. If you have received this communication in error,
please notify the sender and erase this e-mail message immediately.
---------------------------------------------------------------------------
--
To unsubscribe, e-mail: <mailto:struts-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-dev-help@;jakarta.apache.org>