-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jan Hlavat� wrote:

| Removed unnecessary &'s (these are done automatically by conversion to
| byte).
| Saves 32 bytecode instructions as well as several long constants in the
| classfile,
| and should run a bit faster.

I think you are correct, but I also have a very vague memory of some
issues if we didn't use the &'s. I know this is early code and we
(Cloudscape engineers) were following the examples from Sun, e.g. look
at this extract from the Javadoc for java.io.DataOutput.writeShort.

http://java.sun.com/j2se/1.4.2/docs/api/java/io/DataOutput.html#writeShort(int)

The byte values to be written, in the order shown, are:

~ (byte)(0xff & (v >> 8))
~ (byte)(0xff & v)

Dan.


-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFBNfrKIv0S4qsbfuQRAgVkAKDLob2gjWID15pA+5EDY2UapwnmKQCfY8A0
60q99HbIUfJfOSr5DJOxSaQ=
=lOO5
-----END PGP SIGNATURE-----



Reply via email to