db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel John Debrunner <...@debrunners.com>
Subject Re: [PATCH] Optimization of org.apache.derby.impl.services.uuid.BasicUUID.toByteArray()
Date Fri, 03 Sep 2004 00:13:22 GMT
-----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.
|
|
| Index: java/engine/org/apache/derby/impl/services/uuid/BasicUUID.java
| ===================================================================
| --- java/engine/org/apache/derby/impl/services/uuid/BasicUUID.java
| (revision 37291)
| +++ java/engine/org/apache/derby/impl/services/uuid/BasicUUID.java
| (working copy)
| @@ -279,26 +279,26 @@
| ~         byte[] result = new byte[16];
|
| ~         int lsequence = sequence;
| -        result[0] = (byte)((lsequence & 0xff000000) >>> 24);
| -        result[1] = (byte)((lsequence & 0x00ff0000) >>> 16);
| -        result[2] = (byte)((lsequence & 0x0000ff00) >>> 8);
| -        result[3] = (byte) (lsequence & 0x000000ff);
| +        result[0] = (byte)(lsequence >>> 24);
| +        result[1] = (byte)(lsequence >>> 16);
| +        result[2] = (byte)(lsequence >>> 8);
| +        result[3] = (byte)lsequence;
[remaining patch deleted to save space]

Can anyone get the original patch applied to the code?
Gnupatch rejects it with malformed patch at line 23, the tilde (~) seems
to throw it off. I tried replacing the tildes with spaces, tabs or
nothing, but then the patch is just rejected.

The other patches do not have tildes in front of unchanged lines.
Jan, any idea where the tildes came from?

Dan.



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

iD8DBQFBN7ciIv0S4qsbfuQRAtqBAJ9axySHoOwdlKKyyQpRMddOXZhAIgCfffmS
Ovw+BGQV41QUvr94AuG4TqE=
=xjkQ
-----END PGP SIGNATURE-----


Mime
View raw message