mirror of https://github.com/apache/openjpa.git
OPENJPA-2055: Added code to account for IPv6 addresses.
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@1295698 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8971fda1aa
commit
e07b3ce3cf
|
@ -118,7 +118,13 @@ public class UUIDGenerator {
|
|||
|
||||
IP = new byte[6];
|
||||
RANDOM.nextBytes(IP);
|
||||
System.arraycopy(ip, 0, IP, 2, ip.length);
|
||||
|
||||
//OPENJPA-2055: account for the fact that 'getAddress'
|
||||
//may return an IPv6 address which is 16 bytes wide.
|
||||
for( int i = 0 ; i < ip.length; ++i ) {
|
||||
IP[2+(i%4)] ^= ip[i];
|
||||
}
|
||||
|
||||
type1Initialized = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue