Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
7a0c2456
Unverified
提交
7a0c2456
authored
12月 29, 2018
作者:
Evgenij Ryazanov
提交者:
GitHub
12月 29, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1637 from igor-suhorukov/master
Remove explicit unboxing
上级
da2b9dbd
297910b0
显示空白字符变更
内嵌
并排
正在显示
16 个修改的文件
包含
43 行增加
和
43 行删除
+43
-43
SysProperties.java
h2/src/main/org/h2/engine/SysProperties.java
+1
-1
DateTimeFunctions.java
...rc/main/org/h2/expression/function/DateTimeFunctions.java
+1
-1
FullText.java
h2/src/main/org/h2/fulltext/FullText.java
+1
-1
JdbcResultSet.java
h2/src/main/org/h2/jdbc/JdbcResultSet.java
+1
-1
ObjectDataType.java
h2/src/main/org/h2/mvstore/type/ObjectDataType.java
+3
-3
PgServer.java
h2/src/main/org/h2/server/pg/PgServer.java
+2
-2
WebApp.java
h2/src/main/org/h2/server/web/WebApp.java
+2
-2
FilePathSplit.java
h2/src/main/org/h2/store/fs/FilePathSplit.java
+1
-1
SmallMap.java
h2/src/main/org/h2/util/SmallMap.java
+1
-1
DataType.java
h2/src/main/org/h2/value/DataType.java
+7
-7
Function.java
h2/src/test/org/h2/samples/Function.java
+1
-1
FunctionMultiReturn.java
h2/src/test/org/h2/samples/FunctionMultiReturn.java
+6
-6
TestFunctions.java
h2/src/test/org/h2/test/db/TestFunctions.java
+2
-2
TestResultSet.java
h2/src/test/org/h2/test/jdbc/TestResultSet.java
+10
-10
MinimalPerfectHash.java
h2/src/tools/org/h2/dev/hash/MinimalPerfectHash.java
+2
-2
FileViewer.java
h2/src/tools/org/h2/dev/util/FileViewer.java
+2
-2
没有找到文件。
h2/src/main/org/h2/engine/SysProperties.java
浏览文件 @
7a0c2456
...
@@ -624,7 +624,7 @@ public class SysProperties {
...
@@ -624,7 +624,7 @@ public class SysProperties {
String
s
=
Utils
.
getProperty
(
key
,
null
);
String
s
=
Utils
.
getProperty
(
key
,
null
);
if
(
s
!=
null
)
{
if
(
s
!=
null
)
{
try
{
try
{
return
Integer
.
decode
(
s
)
.
intValue
()
;
return
Integer
.
decode
(
s
);
}
catch
(
NumberFormatException
e
)
{
}
catch
(
NumberFormatException
e
)
{
// ignore
// ignore
}
}
...
...
h2/src/main/org/h2/expression/function/DateTimeFunctions.java
浏览文件 @
7a0c2456
...
@@ -614,7 +614,7 @@ public final class DateTimeFunctions {
...
@@ -614,7 +614,7 @@ public final class DateTimeFunctions {
if
(
p
==
null
)
{
if
(
p
==
null
)
{
throw
DbException
.
getInvalidValueException
(
"date part"
,
part
);
throw
DbException
.
getInvalidValueException
(
"date part"
,
part
);
}
}
return
p
.
intValue
()
;
return
p
;
}
}
/**
/**
...
...
h2/src/main/org/h2/fulltext/FullText.java
浏览文件 @
7a0c2456
...
@@ -619,7 +619,7 @@ public class FullText {
...
@@ -619,7 +619,7 @@ public class FullText {
if
(
wId
==
null
)
{
if
(
wId
==
null
)
{
continue
;
continue
;
}
}
prepSelectMapByWordId
.
setInt
(
1
,
wId
.
intValue
()
);
prepSelectMapByWordId
.
setInt
(
1
,
wId
);
ResultSet
rs
=
prepSelectMapByWordId
.
executeQuery
();
ResultSet
rs
=
prepSelectMapByWordId
.
executeQuery
();
while
(
rs
.
next
())
{
while
(
rs
.
next
())
{
Integer
rId
=
rs
.
getInt
(
1
);
Integer
rId
=
rs
.
getInt
(
1
);
...
...
h2/src/main/org/h2/jdbc/JdbcResultSet.java
浏览文件 @
7a0c2456
...
@@ -3187,7 +3187,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet, JdbcResultS
...
@@ -3187,7 +3187,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet, JdbcResultS
if
(
index
==
null
)
{
if
(
index
==
null
)
{
throw
DbException
.
get
(
ErrorCode
.
COLUMN_NOT_FOUND_1
,
columnLabel
);
throw
DbException
.
get
(
ErrorCode
.
COLUMN_NOT_FOUND_1
,
columnLabel
);
}
}
return
index
.
intValue
()
+
1
;
return
index
+
1
;
}
}
for
(
int
i
=
0
;
i
<
columnCount
;
i
++)
{
for
(
int
i
=
0
;
i
<
columnCount
;
i
++)
{
if
(
columnLabel
.
equalsIgnoreCase
(
result
.
getAlias
(
i
)))
{
if
(
columnLabel
.
equalsIgnoreCase
(
result
.
getAlias
(
i
)))
{
...
...
h2/src/main/org/h2/mvstore/type/ObjectDataType.java
浏览文件 @
7a0c2456
...
@@ -596,7 +596,7 @@ public class ObjectDataType implements DataType {
...
@@ -596,7 +596,7 @@ public class ObjectDataType implements DataType {
return
;
return
;
}
}
buff
.
put
((
byte
)
TYPE_BYTE
);
buff
.
put
((
byte
)
TYPE_BYTE
);
buff
.
put
((
(
Byte
)
obj
).
byteValue
()
);
buff
.
put
((
Byte
)
obj
);
}
}
@Override
@Override
...
@@ -637,7 +637,7 @@ public class ObjectDataType implements DataType {
...
@@ -637,7 +637,7 @@ public class ObjectDataType implements DataType {
return
;
return
;
}
}
buff
.
put
((
byte
)
TYPE_CHAR
);
buff
.
put
((
byte
)
TYPE_CHAR
);
buff
.
putChar
((
(
Character
)
obj
).
charValue
()
);
buff
.
putChar
((
Character
)
obj
);
}
}
@Override
@Override
...
@@ -678,7 +678,7 @@ public class ObjectDataType implements DataType {
...
@@ -678,7 +678,7 @@ public class ObjectDataType implements DataType {
return
;
return
;
}
}
buff
.
put
((
byte
)
TYPE_SHORT
);
buff
.
put
((
byte
)
TYPE_SHORT
);
buff
.
putShort
((
(
Short
)
obj
).
shortValue
()
);
buff
.
putShort
((
Short
)
obj
);
}
}
@Override
@Override
...
...
h2/src/main/org/h2/server/pg/PgServer.java
浏览文件 @
7a0c2456
...
@@ -308,7 +308,7 @@ public class PgServer implements Service {
...
@@ -308,7 +308,7 @@ public class PgServer implements Service {
@SuppressWarnings
(
"unused"
)
@SuppressWarnings
(
"unused"
)
public
static
String
getIndexColumn
(
Connection
conn
,
int
indexId
,
public
static
String
getIndexColumn
(
Connection
conn
,
int
indexId
,
Integer
ordinalPosition
,
Boolean
pretty
)
throws
SQLException
{
Integer
ordinalPosition
,
Boolean
pretty
)
throws
SQLException
{
if
(
ordinalPosition
==
null
||
ordinalPosition
.
intValue
()
==
0
)
{
if
(
ordinalPosition
==
null
||
ordinalPosition
==
0
)
{
PreparedStatement
prep
=
conn
.
prepareStatement
(
PreparedStatement
prep
=
conn
.
prepareStatement
(
"select sql from information_schema.indexes where id=?"
);
"select sql from information_schema.indexes where id=?"
);
prep
.
setInt
(
1
,
indexId
);
prep
.
setInt
(
1
,
indexId
);
...
@@ -322,7 +322,7 @@ public class PgServer implements Service {
...
@@ -322,7 +322,7 @@ public class PgServer implements Service {
"select column_name from information_schema.indexes "
+
"select column_name from information_schema.indexes "
+
"where id=? and ordinal_position=?"
);
"where id=? and ordinal_position=?"
);
prep
.
setInt
(
1
,
indexId
);
prep
.
setInt
(
1
,
indexId
);
prep
.
setInt
(
2
,
ordinalPosition
.
intValue
()
);
prep
.
setInt
(
2
,
ordinalPosition
);
ResultSet
rs
=
prep
.
executeQuery
();
ResultSet
rs
=
prep
.
executeQuery
();
if
(
rs
.
next
())
{
if
(
rs
.
next
())
{
return
rs
.
getString
(
1
);
return
rs
.
getString
(
1
);
...
...
h2/src/main/org/h2/server/web/WebApp.java
浏览文件 @
7a0c2456
...
@@ -1451,7 +1451,7 @@ public class WebApp {
...
@@ -1451,7 +1451,7 @@ public class WebApp {
String
s
=
sql
;
String
s
=
sql
;
for
(
Integer
type
:
params
)
{
for
(
Integer
type
:
params
)
{
idx
=
s
.
indexOf
(
'?'
);
idx
=
s
.
indexOf
(
'?'
);
if
(
type
.
intValue
()
==
1
)
{
if
(
type
==
1
)
{
s
=
s
.
substring
(
0
,
idx
)
+
random
.
nextInt
(
count
)
+
s
.
substring
(
idx
+
1
);
s
=
s
.
substring
(
0
,
idx
)
+
random
.
nextInt
(
count
)
+
s
.
substring
(
idx
+
1
);
}
else
{
}
else
{
s
=
s
.
substring
(
0
,
idx
)
+
i
+
s
.
substring
(
idx
+
1
);
s
=
s
.
substring
(
0
,
idx
)
+
i
+
s
.
substring
(
idx
+
1
);
...
@@ -1471,7 +1471,7 @@ public class WebApp {
...
@@ -1471,7 +1471,7 @@ public class WebApp {
for
(
int
i
=
0
;
!
stop
&&
i
<
count
;
i
++)
{
for
(
int
i
=
0
;
!
stop
&&
i
<
count
;
i
++)
{
for
(
int
j
=
0
;
j
<
params
.
size
();
j
++)
{
for
(
int
j
=
0
;
j
<
params
.
size
();
j
++)
{
Integer
type
=
params
.
get
(
j
);
Integer
type
=
params
.
get
(
j
);
if
(
type
.
intValue
()
==
1
)
{
if
(
type
==
1
)
{
prep
.
setInt
(
j
+
1
,
random
.
nextInt
(
count
));
prep
.
setInt
(
j
+
1
,
random
.
nextInt
(
count
));
}
else
{
}
else
{
prep
.
setInt
(
j
+
1
,
i
);
prep
.
setInt
(
j
+
1
,
i
);
...
...
h2/src/main/org/h2/store/fs/FilePathSplit.java
浏览文件 @
7a0c2456
...
@@ -161,7 +161,7 @@ public class FilePathSplit extends FilePathWrapper {
...
@@ -161,7 +161,7 @@ public class FilePathSplit extends FilePathWrapper {
}
}
private
long
getDefaultMaxLength
()
{
private
long
getDefaultMaxLength
()
{
return
1L
<<
Integer
.
decode
(
parse
(
name
)[
0
])
.
intValue
()
;
return
1L
<<
Integer
.
decode
(
parse
(
name
)[
0
]);
}
}
private
void
closeAndThrow
(
int
id
,
FileChannel
[]
array
,
FileChannel
o
,
private
void
closeAndThrow
(
int
id
,
FileChannel
[]
array
,
FileChannel
o
,
...
...
h2/src/main/org/h2/util/SmallMap.java
浏览文件 @
7a0c2456
...
@@ -44,7 +44,7 @@ public class SmallMap {
...
@@ -44,7 +44,7 @@ public class SmallMap {
Iterator
<
Integer
>
it
=
map
.
keySet
().
iterator
();
Iterator
<
Integer
>
it
=
map
.
keySet
().
iterator
();
while
(
it
.
hasNext
())
{
while
(
it
.
hasNext
())
{
Integer
k
=
it
.
next
();
Integer
k
=
it
.
next
();
if
(
k
.
intValue
()
+
maxElements
<
lastId
)
{
if
(
k
+
maxElements
<
lastId
)
{
it
.
remove
();
it
.
remove
();
}
}
}
}
...
...
h2/src/main/org/h2/value/DataType.java
浏览文件 @
7a0c2456
...
@@ -1196,23 +1196,23 @@ public class DataType {
...
@@ -1196,23 +1196,23 @@ public class DataType {
}
else
if
(
x
instanceof
Value
)
{
}
else
if
(
x
instanceof
Value
)
{
return
(
Value
)
x
;
return
(
Value
)
x
;
}
else
if
(
x
instanceof
Long
)
{
}
else
if
(
x
instanceof
Long
)
{
return
ValueLong
.
get
((
(
Long
)
x
).
longValue
()
);
return
ValueLong
.
get
((
Long
)
x
);
}
else
if
(
x
instanceof
Integer
)
{
}
else
if
(
x
instanceof
Integer
)
{
return
ValueInt
.
get
((
(
Integer
)
x
).
intValue
()
);
return
ValueInt
.
get
((
Integer
)
x
);
}
else
if
(
x
instanceof
BigInteger
)
{
}
else
if
(
x
instanceof
BigInteger
)
{
return
ValueDecimal
.
get
(
new
BigDecimal
((
BigInteger
)
x
));
return
ValueDecimal
.
get
(
new
BigDecimal
((
BigInteger
)
x
));
}
else
if
(
x
instanceof
BigDecimal
)
{
}
else
if
(
x
instanceof
BigDecimal
)
{
return
ValueDecimal
.
get
((
BigDecimal
)
x
);
return
ValueDecimal
.
get
((
BigDecimal
)
x
);
}
else
if
(
x
instanceof
Boolean
)
{
}
else
if
(
x
instanceof
Boolean
)
{
return
ValueBoolean
.
get
((
(
Boolean
)
x
).
booleanValue
()
);
return
ValueBoolean
.
get
((
Boolean
)
x
);
}
else
if
(
x
instanceof
Byte
)
{
}
else
if
(
x
instanceof
Byte
)
{
return
ValueByte
.
get
((
(
Byte
)
x
).
byteValue
()
);
return
ValueByte
.
get
((
Byte
)
x
);
}
else
if
(
x
instanceof
Short
)
{
}
else
if
(
x
instanceof
Short
)
{
return
ValueShort
.
get
((
(
Short
)
x
).
shortValue
()
);
return
ValueShort
.
get
((
Short
)
x
);
}
else
if
(
x
instanceof
Float
)
{
}
else
if
(
x
instanceof
Float
)
{
return
ValueFloat
.
get
((
(
Float
)
x
).
floatValue
()
);
return
ValueFloat
.
get
((
Float
)
x
);
}
else
if
(
x
instanceof
Double
)
{
}
else
if
(
x
instanceof
Double
)
{
return
ValueDouble
.
get
((
(
Double
)
x
).
doubleValue
()
);
return
ValueDouble
.
get
((
Double
)
x
);
}
else
if
(
x
instanceof
byte
[])
{
}
else
if
(
x
instanceof
byte
[])
{
return
ValueBytes
.
get
((
byte
[])
x
);
return
ValueBytes
.
get
((
byte
[])
x
);
}
else
if
(
x
instanceof
Date
)
{
}
else
if
(
x
instanceof
Date
)
{
...
...
h2/src/test/org/h2/samples/Function.java
浏览文件 @
7a0c2456
...
@@ -145,7 +145,7 @@ public class Function {
...
@@ -145,7 +145,7 @@ public class Function {
if
(
url
.
equals
(
"jdbc:columnlist:connection"
))
{
if
(
url
.
equals
(
"jdbc:columnlist:connection"
))
{
return
rs
;
return
rs
;
}
}
for
(
int
s
=
size
.
intValue
()
,
x
=
0
;
x
<
s
;
x
++)
{
for
(
int
s
=
size
,
x
=
0
;
x
<
s
;
x
++)
{
for
(
int
y
=
0
;
y
<
s
;
y
++)
{
for
(
int
y
=
0
;
y
<
s
;
y
++)
{
rs
.
addRow
(
x
,
y
);
rs
.
addRow
(
x
,
y
);
}
}
...
...
h2/src/test/org/h2/samples/FunctionMultiReturn.java
浏览文件 @
7a0c2456
...
@@ -71,8 +71,8 @@ public class FunctionMultiReturn {
...
@@ -71,8 +71,8 @@ public class FunctionMultiReturn {
double
a
=
rs
.
getDouble
(
2
);
double
a
=
rs
.
getDouble
(
2
);
Object
o
=
rs
.
getObject
(
3
);
Object
o
=
rs
.
getObject
(
3
);
Object
[]
xy
=
(
Object
[])
o
;
Object
[]
xy
=
(
Object
[])
o
;
double
x
=
(
(
Double
)
xy
[
0
]).
doubleValue
()
;
double
x
=
(
Double
)
xy
[
0
]
;
double
y
=
(
(
Double
)
xy
[
1
]).
doubleValue
()
;
double
y
=
(
Double
)
xy
[
1
]
;
System
.
out
.
println
(
"(r="
+
r
+
" a="
+
a
+
") :"
+
System
.
out
.
println
(
"(r="
+
r
+
" a="
+
a
+
") :"
+
" (x="
+
x
+
", y="
+
y
+
")"
);
" (x="
+
x
+
", y="
+
y
+
")"
);
}
}
...
@@ -108,8 +108,8 @@ public class FunctionMultiReturn {
...
@@ -108,8 +108,8 @@ public class FunctionMultiReturn {
rs
.
addColumn
(
"X"
,
Types
.
DOUBLE
,
0
,
0
);
rs
.
addColumn
(
"X"
,
Types
.
DOUBLE
,
0
,
0
);
rs
.
addColumn
(
"Y"
,
Types
.
DOUBLE
,
0
,
0
);
rs
.
addColumn
(
"Y"
,
Types
.
DOUBLE
,
0
,
0
);
if
(
r
!=
null
&&
alpha
!=
null
)
{
if
(
r
!=
null
&&
alpha
!=
null
)
{
double
x
=
r
.
doubleValue
()
*
Math
.
cos
(
alpha
.
doubleValue
()
);
double
x
=
r
*
Math
.
cos
(
alpha
);
double
y
=
r
.
doubleValue
()
*
Math
.
sin
(
alpha
.
doubleValue
()
);
double
y
=
r
*
Math
.
sin
(
alpha
);
rs
.
addRow
(
x
,
y
);
rs
.
addRow
(
x
,
y
);
}
}
return
rs
;
return
rs
;
...
@@ -125,8 +125,8 @@ public class FunctionMultiReturn {
...
@@ -125,8 +125,8 @@ public class FunctionMultiReturn {
* @return an array two values: x and y
* @return an array two values: x and y
*/
*/
public
static
Object
[]
polar2CartesianArray
(
Double
r
,
Double
alpha
)
{
public
static
Object
[]
polar2CartesianArray
(
Double
r
,
Double
alpha
)
{
double
x
=
r
.
doubleValue
()
*
Math
.
cos
(
alpha
.
doubleValue
()
);
double
x
=
r
*
Math
.
cos
(
alpha
);
double
y
=
r
.
doubleValue
()
*
Math
.
sin
(
alpha
.
doubleValue
()
);
double
y
=
r
*
Math
.
sin
(
alpha
);
return
new
Object
[]{
x
,
y
};
return
new
Object
[]{
x
,
y
};
}
}
...
...
h2/src/test/org/h2/test/db/TestFunctions.java
浏览文件 @
7a0c2456
...
@@ -2375,10 +2375,10 @@ public class TestFunctions extends TestDb implements AggregateFunction {
...
@@ -2375,10 +2375,10 @@ public class TestFunctions extends TestDb implements AggregateFunction {
sp
!=
1
||
lp
!=
1
||
byParam
!=
1
)
{
sp
!=
1
||
lp
!=
1
||
byParam
!=
1
)
{
throw
new
AssertionError
(
"params not 1/true"
);
throw
new
AssertionError
(
"params not 1/true"
);
}
}
if
(
rowCount
.
intValue
()
>=
1
)
{
if
(
rowCount
>=
1
)
{
rs
.
addRow
(
0
,
"Hello"
);
rs
.
addRow
(
0
,
"Hello"
);
}
}
if
(
rowCount
.
intValue
()
>=
2
)
{
if
(
rowCount
>=
2
)
{
rs
.
addRow
(
1
,
"World"
);
rs
.
addRow
(
1
,
"World"
);
}
}
}
}
...
...
h2/src/test/org/h2/test/jdbc/TestResultSet.java
浏览文件 @
7a0c2456
...
@@ -693,19 +693,19 @@ public class TestResultSet extends TestDb {
...
@@ -693,19 +693,19 @@ public class TestResultSet extends TestDb {
o
=
rs
.
getObject
(
"value"
);
o
=
rs
.
getObject
(
"value"
);
trace
(
o
.
getClass
().
getName
());
trace
(
o
.
getClass
().
getName
());
assertTrue
(
o
instanceof
Integer
);
assertTrue
(
o
instanceof
Integer
);
assertTrue
((
(
Integer
)
o
).
intValue
()
==
-
1
);
assertTrue
((
Integer
)
o
==
-
1
);
o
=
rs
.
getObject
(
"value"
,
Integer
.
class
);
o
=
rs
.
getObject
(
"value"
,
Integer
.
class
);
trace
(
o
.
getClass
().
getName
());
trace
(
o
.
getClass
().
getName
());
assertTrue
(
o
instanceof
Integer
);
assertTrue
(
o
instanceof
Integer
);
assertTrue
((
(
Integer
)
o
).
intValue
()
==
-
1
);
assertTrue
((
Integer
)
o
==
-
1
);
o
=
rs
.
getObject
(
2
);
o
=
rs
.
getObject
(
2
);
trace
(
o
.
getClass
().
getName
());
trace
(
o
.
getClass
().
getName
());
assertTrue
(
o
instanceof
Integer
);
assertTrue
(
o
instanceof
Integer
);
assertTrue
((
(
Integer
)
o
).
intValue
()
==
-
1
);
assertTrue
((
Integer
)
o
==
-
1
);
o
=
rs
.
getObject
(
2
,
Integer
.
class
);
o
=
rs
.
getObject
(
2
,
Integer
.
class
);
trace
(
o
.
getClass
().
getName
());
trace
(
o
.
getClass
().
getName
());
assertTrue
(
o
instanceof
Integer
);
assertTrue
(
o
instanceof
Integer
);
assertTrue
((
(
Integer
)
o
).
intValue
()
==
-
1
);
assertTrue
((
Integer
)
o
==
-
1
);
assertTrue
(
rs
.
getBoolean
(
"Value"
));
assertTrue
(
rs
.
getBoolean
(
"Value"
));
assertTrue
(
rs
.
getByte
(
"Value"
)
==
(
byte
)
-
1
);
assertTrue
(
rs
.
getByte
(
"Value"
)
==
(
byte
)
-
1
);
assertTrue
(
rs
.
getShort
(
"Value"
)
==
(
short
)
-
1
);
assertTrue
(
rs
.
getShort
(
"Value"
)
==
(
short
)
-
1
);
...
@@ -816,7 +816,7 @@ public class TestResultSet extends TestDb {
...
@@ -816,7 +816,7 @@ public class TestResultSet extends TestDb {
o
=
rs
.
getObject
(
"value"
,
Short
.
class
);
o
=
rs
.
getObject
(
"value"
,
Short
.
class
);
trace
(
o
.
getClass
().
getName
());
trace
(
o
.
getClass
().
getName
());
assertTrue
(
o
instanceof
Short
);
assertTrue
(
o
instanceof
Short
);
assertTrue
((
(
Short
)
o
).
shortValue
()
==
-
1
);
assertTrue
((
Short
)
o
==
-
1
);
o
=
rs
.
getObject
(
2
);
o
=
rs
.
getObject
(
2
);
trace
(
o
.
getClass
().
getName
());
trace
(
o
.
getClass
().
getName
());
assertTrue
(
o
.
getClass
()
==
(
SysProperties
.
OLD_RESULT_SET_GET_OBJECT
?
Short
.
class
:
Integer
.
class
));
assertTrue
(
o
.
getClass
()
==
(
SysProperties
.
OLD_RESULT_SET_GET_OBJECT
?
Short
.
class
:
Integer
.
class
));
...
@@ -824,7 +824,7 @@ public class TestResultSet extends TestDb {
...
@@ -824,7 +824,7 @@ public class TestResultSet extends TestDb {
o
=
rs
.
getObject
(
2
,
Short
.
class
);
o
=
rs
.
getObject
(
2
,
Short
.
class
);
trace
(
o
.
getClass
().
getName
());
trace
(
o
.
getClass
().
getName
());
assertTrue
(
o
instanceof
Short
);
assertTrue
(
o
instanceof
Short
);
assertTrue
((
(
Short
)
o
).
shortValue
()
==
-
1
);
assertTrue
((
Short
)
o
==
-
1
);
assertTrue
(
rs
.
getBoolean
(
"Value"
));
assertTrue
(
rs
.
getBoolean
(
"Value"
));
assertTrue
(
rs
.
getByte
(
"Value"
)
==
(
byte
)
-
1
);
assertTrue
(
rs
.
getByte
(
"Value"
)
==
(
byte
)
-
1
);
assertTrue
(
rs
.
getInt
(
"Value"
)
==
-
1
);
assertTrue
(
rs
.
getInt
(
"Value"
)
==
-
1
);
...
@@ -935,11 +935,11 @@ public class TestResultSet extends TestDb {
...
@@ -935,11 +935,11 @@ public class TestResultSet extends TestDb {
o
=
rs
.
getObject
(
"value"
);
o
=
rs
.
getObject
(
"value"
);
trace
(
o
.
getClass
().
getName
());
trace
(
o
.
getClass
().
getName
());
assertTrue
(
o
instanceof
Long
);
assertTrue
(
o
instanceof
Long
);
assertTrue
((
(
Long
)
o
).
longValue
()
==
-
1
);
assertTrue
((
Long
)
o
==
-
1
);
o
=
rs
.
getObject
(
"value"
,
Long
.
class
);
o
=
rs
.
getObject
(
"value"
,
Long
.
class
);
trace
(
o
.
getClass
().
getName
());
trace
(
o
.
getClass
().
getName
());
assertTrue
(
o
instanceof
Long
);
assertTrue
(
o
instanceof
Long
);
assertTrue
((
(
Long
)
o
).
longValue
()
==
-
1
);
assertTrue
((
Long
)
o
==
-
1
);
o
=
rs
.
getObject
(
"value"
,
BigInteger
.
class
);
o
=
rs
.
getObject
(
"value"
,
BigInteger
.
class
);
trace
(
o
.
getClass
().
getName
());
trace
(
o
.
getClass
().
getName
());
assertTrue
(
o
instanceof
BigInteger
);
assertTrue
(
o
instanceof
BigInteger
);
...
@@ -947,11 +947,11 @@ public class TestResultSet extends TestDb {
...
@@ -947,11 +947,11 @@ public class TestResultSet extends TestDb {
o
=
rs
.
getObject
(
2
);
o
=
rs
.
getObject
(
2
);
trace
(
o
.
getClass
().
getName
());
trace
(
o
.
getClass
().
getName
());
assertTrue
(
o
instanceof
Long
);
assertTrue
(
o
instanceof
Long
);
assertTrue
((
(
Long
)
o
).
longValue
()
==
-
1
);
assertTrue
((
Long
)
o
==
-
1
);
o
=
rs
.
getObject
(
2
,
Long
.
class
);
o
=
rs
.
getObject
(
2
,
Long
.
class
);
trace
(
o
.
getClass
().
getName
());
trace
(
o
.
getClass
().
getName
());
assertTrue
(
o
instanceof
Long
);
assertTrue
(
o
instanceof
Long
);
assertTrue
((
(
Long
)
o
).
longValue
()
==
-
1
);
assertTrue
((
Long
)
o
==
-
1
);
o
=
rs
.
getObject
(
2
,
BigInteger
.
class
);
o
=
rs
.
getObject
(
2
,
BigInteger
.
class
);
trace
(
o
.
getClass
().
getName
());
trace
(
o
.
getClass
().
getName
());
assertTrue
(
o
instanceof
BigInteger
);
assertTrue
(
o
instanceof
BigInteger
);
...
...
h2/src/tools/org/h2/dev/hash/MinimalPerfectHash.java
浏览文件 @
7a0c2456
...
@@ -656,7 +656,7 @@ public class MinimalPerfectHash<K> {
...
@@ -656,7 +656,7 @@ public class MinimalPerfectHash<K> {
if
(
index
==
0
)
{
if
(
index
==
0
)
{
return
o
.
hashCode
();
return
o
.
hashCode
();
}
else
if
(
index
<
8
)
{
}
else
if
(
index
<
8
)
{
long
x
=
o
.
longValue
()
;
long
x
=
o
;
x
+=
index
;
x
+=
index
;
x
=
((
x
>>>
32
)
^
x
)
*
0x45d9f3b
;
x
=
((
x
>>>
32
)
^
x
)
*
0x45d9f3b
;
x
=
((
x
>>>
32
)
^
x
)
*
0x45d9f3b
;
x
=
((
x
>>>
32
)
^
x
)
*
0x45d9f3b
;
...
@@ -664,7 +664,7 @@ public class MinimalPerfectHash<K> {
...
@@ -664,7 +664,7 @@ public class MinimalPerfectHash<K> {
}
}
// get the lower or higher 32 bit depending on the index
// get the lower or higher 32 bit depending on the index
int
shift
=
(
index
&
1
)
*
32
;
int
shift
=
(
index
&
1
)
*
32
;
return
(
int
)
(
o
.
longValue
()
>>>
shift
);
return
(
int
)
(
o
>>>
shift
);
}
}
}
}
...
...
h2/src/tools/org/h2/dev/util/FileViewer.java
浏览文件 @
7a0c2456
...
@@ -57,13 +57,13 @@ public class FileViewer extends Tool {
...
@@ -57,13 +57,13 @@ public class FileViewer extends Tool {
}
else
if
(
arg
.
equals
(
"-find"
))
{
}
else
if
(
arg
.
equals
(
"-find"
))
{
find
=
args
[++
i
];
find
=
args
[++
i
];
}
else
if
(
arg
.
equals
(
"-start"
))
{
}
else
if
(
arg
.
equals
(
"-start"
))
{
start
=
Long
.
decode
(
args
[++
i
])
.
longValue
()
;
start
=
Long
.
decode
(
args
[++
i
]);
}
else
if
(
arg
.
equals
(
"-head"
))
{
}
else
if
(
arg
.
equals
(
"-head"
))
{
head
=
true
;
head
=
true
;
}
else
if
(
arg
.
equals
(
"-tail"
))
{
}
else
if
(
arg
.
equals
(
"-tail"
))
{
tail
=
true
;
tail
=
true
;
}
else
if
(
arg
.
equals
(
"-lines"
))
{
}
else
if
(
arg
.
equals
(
"-lines"
))
{
lines
=
Integer
.
decode
(
args
[++
i
])
.
intValue
()
;
lines
=
Integer
.
decode
(
args
[++
i
]);
}
else
if
(
arg
.
equals
(
"-quiet"
))
{
}
else
if
(
arg
.
equals
(
"-quiet"
))
{
quiet
=
true
;
quiet
=
true
;
}
else
if
(
arg
.
equals
(
"-help"
)
||
arg
.
equals
(
"-?"
))
{
}
else
if
(
arg
.
equals
(
"-help"
)
||
arg
.
equals
(
"-?"
))
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论