tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@us.ibm.com
Subject Re: [PATCH] Cast error
Date Sat, 12 Feb 2000 22:28:16 GMT


Daniel Rall wrote:
> Error assigning char data to a byte (Blackdown JDK 1.2.2).  Fixed by
> casting the char to a byte.  Possible lost of data?  Please review and
> commit if okay (I am not a committer).

Thanks!  I quickly converted a C++ program to Java, and did my development
on JDK 1.1.8.  JDK 1.2 compilers appear to be stricter - in general a good
thing.  However, in this case, no loss of data possible - the conversions
are on simple constants which could have been determined to be in range at
compile time.

Of course, this points out that the overall design (where the file is
parsed at the byte level) is not very tolerant of multi-byte encodings.
Probably not a major problem in most of the cases where this code is needed
most - batch files, shell scripts, Makefiles, etc.

- Sam Ruby



Mime
View raw message