On 19/06/2008, Julius Davies <[EMAIL PROTECTED]> wrote: > Yeah, testing against Java-1.2 is almost impossible these days unless > you dig out an old Debian "Potato" CD, or, gulp, install windows. > (I'll give Windows credit for being reverse-compatible with itself!)
Even with Windows, it's not easy. I've yet to find a suitable version of Ant and JUnit, and quite a few projects don't have uptodate Ant build files (though CODEC does seem to) Testing against 1.3 is much easier... > CODEC appears to be Java-1.2 compatible except for the > String.replaceAll() [java-1.4!] calls in Caverphone, and some missing > (byte) casts. > > The CODEC website says it's compatible with Java-1.3: > > http://commons.apache.org/codec/dependencies.html > pom.xml was updated on Mar 09 in r635220 to 1.4 - perhaps as a part of the general update to M2 and 1.4. project.properties also says 1.4 build.xml does not specify source or target versions for javac. > > yours, > > > Julius > > > > > On Thu, Jun 19, 2008 at 1:40 PM, sebb <[EMAIL PROTECTED]> wrote: > > On 19/06/2008, Julius Davies <[EMAIL PROTECTED]> wrote: > >> Hi, Sebb, > >> > >> Are you sure those are unnecessary? I cannot compile under Java 1.2.2 > >> without them. But maybe Java 1.2.2 can still run jar files created by > >> later compilers when the code has this. > >> > >> (Java 1.3.1 compiles just fine). > >> > > > > The CODEC pom says that the source and target Java versions are 1.4, > > which is what I have been testing with. > > > > So apologies if some of the changes break 1.2 compatibility. > > (the modulus cast was definitely not needed). > > > > Some Commons code is still 1.3 compatible, and perhaps CODEC should > > be, but I don't personally think it's worth trying to support 1.2. > > It's difficult enough testing against 1.3. > > > >> > >> yours, > >> > >> Julius > >> > >> > >> > >> On Thu, Jun 19, 2008 at 1:03 PM, <[EMAIL PROTECTED]> wrote: > >> > Author: sebb > >> > Date: Thu Jun 19 13:03:20 2008 > >> > New Revision: 669667 > >> > > >> > URL: http://svn.apache.org/viewvc?rev=669667&view=rev > >> > Log: > >> > Remove some more unnecessary casts > >> > > >> > Modified: > >> > > commons/proper/codec/trunk/src/java/org/apache/commons/codec/binary/Base64.java > >> > > >> > Modified: > commons/proper/codec/trunk/src/java/org/apache/commons/codec/binary/Base64.java > >> > URL: > http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/java/org/apache/commons/codec/binary/Base64.java?rev=669667&r1=669666&r2=669667&view=diff > >> > > ============================================================================== > >> > --- > commons/proper/codec/trunk/src/java/org/apache/commons/codec/binary/Base64.java > (original) > >> > +++ > commons/proper/codec/trunk/src/java/org/apache/commons/codec/binary/Base64.java > Thu Jun 19 13:03:20 2008 > >> > @@ -61,7 +61,7 @@ > >> > /** > >> > * Byte used to pad output. > >> > */ > >> > - private static final byte PAD = (byte) '='; > >> > + private static final byte PAD = '='; > >> > > >> > > >> > // The static final fields above are used for the original static > byte[] methods on Base64. > >> > @@ -434,7 +434,7 @@ > >> > if (b >= 0 && b < base64ToInt.length) { > >> > int result = base64ToInt[b]; > >> > if (result >= 0) { > >> > - modulus = (byte) ((++modulus) % 4); > >> > + modulus = (++modulus) % 4; > >> > x = (x << 6) + result; > >> > if (modulus == 0) { > >> > buf[pos++] = (byte) ((x >> 16) & 0xff); > >> > @@ -614,10 +614,10 @@ > >> > > >> > for (int i = 0; i < data.length; i++) { > >> > switch (data[i]) { > >> > - case (byte) ' ' : > >> > - case (byte) '\n' : > >> > - case (byte) '\r' : > >> > - case (byte) '\t' : > >> > + case ' ' : > >> > + case '\n' : > >> > + case '\r' : > >> > + case '\t' : > >> > break; > >> > default : > >> > groomedData[bytesCopied++] = data[i]; > >> > > >> > > >> > > >> > >> > >> > >> -- > >> yours, > >> > >> Julius Davies > >> 250-592-2284 (Home) > >> 250-893-4579 (Mobile) > >> http://juliusdavies.ca/ > >> > >> --------------------------------------------------------------------- > >> 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] > > > > > > > > > -- > > yours, > > Julius Davies > 250-592-2284 (Home) > 250-893-4579 (Mobile) > http://juliusdavies.ca/ > > --------------------------------------------------------------------- > 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]
