From: Scott M S. <st...@us...> - 2003-07-16 14:42:47
|
User: starksm Date: 03/07/16 07:42:46 Modified: src/main/org/jboss/ejb/plugins/keygenerator/uuid Tag: Branch_3_2 UUIDKeyGenerator.java Log: Fix a possible sign extension issue raised by bug 769731 UUIDKeyGenerator not correct Revision Changes Path No revision No revision 1.1.2.2 +3 -3 jboss/src/main/org/jboss/ejb/plugins/keygenerator/uuid/UUIDKeyGenerator.java Index: UUIDKeyGenerator.java =================================================================== RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/ejb/plugins/keygenerator/uuid/UUIDKeyGenerator.java,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -r1.1.2.1 -r1.1.2.2 --- UUIDKeyGenerator.java 24 Sep 2002 15:59:20 -0000 1.1.2.1 +++ UUIDKeyGenerator.java 16 Jul 2003 14:42:46 -0000 1.1.2.2 @@ -9,7 +9,6 @@ import org.jboss.ejb.plugins.keygenerator.KeyGenerator; import java.net.InetAddress; -import java.net.UnknownHostException; import java.security.SecureRandom; @@ -19,7 +18,7 @@ * * @author <a href="mailto:lou...@uk...">Alex Loubyansky</a> * - * @version $Revision: 1.1.2.1 $ + * @version $Revision: 1.1.2.2 $ */ public class UUIDKeyGenerator implements KeyGenerator @@ -108,7 +107,8 @@ while( ++i < bytes.length ) { value <<= 8; - value |= bytes[ i ]; + int b = bytes[ i ] & 0xff; + value |= b; } return value; } |