mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
improved sql parser.
This commit is contained in:
@@ -200,7 +200,7 @@ public class Utils {
|
||||
if (className == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
return Class.forName(className);
|
||||
} catch (ClassNotFoundException e) {
|
||||
@@ -236,7 +236,7 @@ public class Utils {
|
||||
/**
|
||||
* murmur hash 2.0, The murmur hash is a relatively fast hash function from http://murmurhash.googlepages.com/ for
|
||||
* platforms with efficient multiplication.
|
||||
*
|
||||
*
|
||||
* @author Viliam Holub
|
||||
*/
|
||||
public static long murmurhash2_64(final byte[] data, int length, int seed) {
|
||||
@@ -250,13 +250,13 @@ public class Utils {
|
||||
for (int i = 0; i < length8; i++) {
|
||||
final int i8 = i * 8;
|
||||
long k = ((long) data[i8 + 0] & 0xff) //
|
||||
+ (((long) data[i8 + 1] & 0xff) << 8) //
|
||||
+ (((long) data[i8 + 2] & 0xff) << 16)//
|
||||
+ (((long) data[i8 + 3] & 0xff) << 24) //
|
||||
+ (((long) data[i8 + 4] & 0xff) << 32)//
|
||||
+ (((long) data[i8 + 5] & 0xff) << 40)//
|
||||
+ (((long) data[i8 + 6] & 0xff) << 48) //
|
||||
+ (((long) data[i8 + 7] & 0xff) << 56);
|
||||
+ (((long) data[i8 + 1] & 0xff) << 8) //
|
||||
+ (((long) data[i8 + 2] & 0xff) << 16)//
|
||||
+ (((long) data[i8 + 3] & 0xff) << 24) //
|
||||
+ (((long) data[i8 + 4] & 0xff) << 32)//
|
||||
+ (((long) data[i8 + 5] & 0xff) << 40)//
|
||||
+ (((long) data[i8 + 6] & 0xff) << 48) //
|
||||
+ (((long) data[i8 + 7] & 0xff) << 56);
|
||||
|
||||
k *= m;
|
||||
k ^= k >>> r;
|
||||
|
||||
Reference in New Issue
Block a user