Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
5b81d2b9
提交
5b81d2b9
authored
6月 05, 2017
作者:
Noel Grandin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
clean up or annotate unused parameters
上级
3e77d2fb
显示空白字符变更
内嵌
并排
正在显示
30 个修改的文件
包含
53 行增加
和
46 行删除
+53
-46
Command.java
h2/src/main/org/h2/command/Command.java
+1
-1
Prepared.java
h2/src/main/org/h2/command/Prepared.java
+1
-0
CreateView.java
h2/src/main/org/h2/command/ddl/CreateView.java
+1
-1
Constraint.java
h2/src/main/org/h2/constraint/Constraint.java
+1
-1
Expression.java
h2/src/main/org/h2/expression/Expression.java
+3
-1
SpatialTreeIndex.java
h2/src/main/org/h2/index/SpatialTreeIndex.java
+2
-3
JdbcStatement.java
h2/src/main/org/h2/jdbc/JdbcStatement.java
+0
-1
StreamStore.java
h2/src/main/org/h2/mvstore/StreamStore.java
+1
-0
CacheLongKeyLIRS.java
h2/src/main/org/h2/mvstore/cache/CacheLongKeyLIRS.java
+1
-0
MVSpatialIndex.java
h2/src/main/org/h2/mvstore/db/MVSpatialIndex.java
+1
-2
MVRTreeMap.java
h2/src/main/org/h2/mvstore/rtree/MVRTreeMap.java
+1
-1
PgServer.java
h2/src/main/org/h2/server/pg/PgServer.java
+5
-1
FileStore.java
h2/src/main/org/h2/store/FileStore.java
+1
-0
FilePath.java
h2/src/main/org/h2/store/fs/FilePath.java
+1
-0
Table.java
h2/src/main/org/h2/table/Table.java
+5
-0
TableView.java
h2/src/main/org/h2/table/TableView.java
+1
-2
Profiler.java
h2/src/main/org/h2/util/Profiler.java
+1
-1
ToChar.java
h2/src/main/org/h2/util/ToChar.java
+2
-2
Value.java
h2/src/main/org/h2/value/Value.java
+8
-5
TestBase.java
h2/src/test/org/h2/test/TestBase.java
+1
-1
TaskProcess.java
h2/src/test/org/h2/test/db/TaskProcess.java
+1
-11
TestFunctions.java
h2/src/test/org/h2/test/db/TestFunctions.java
+2
-2
TestBatchUpdates.java
h2/src/test/org/h2/test/jdbc/TestBatchUpdates.java
+1
-2
TestMVStore.java
h2/src/test/org/h2/test/store/TestMVStore.java
+1
-0
TestSort.java
h2/src/test/org/h2/test/unit/TestSort.java
+1
-1
H2Utils.java
h2/src/tools/org/h2/android/H2Utils.java
+1
-1
XMLParser.java
h2/src/tools/org/h2/build/doc/XMLParser.java
+1
-1
CacheLIRS.java
h2/src/tools/org/h2/dev/cache/CacheLIRS.java
+2
-1
TableInspector.java
h2/src/tools/org/h2/jaqu/TableInspector.java
+4
-4
PrintStream.java
h2/src/tools/org/h2/java/io/PrintStream.java
+1
-0
没有找到文件。
h2/src/main/org/h2/command/Command.java
浏览文件 @
5b81d2b9
...
@@ -112,7 +112,7 @@ public abstract class Command implements CommandInterface {
...
@@ -112,7 +112,7 @@ public abstract class Command implements CommandInterface {
* @return the local result set
* @return the local result set
* @throws DbException if the command is not a query
* @throws DbException if the command is not a query
*/
*/
public
ResultInterface
query
(
int
maxrows
)
{
public
ResultInterface
query
(
@SuppressWarnings
(
"unused"
)
int
maxrows
)
{
throw
DbException
.
get
(
ErrorCode
.
METHOD_ONLY_ALLOWED_FOR_QUERY
);
throw
DbException
.
get
(
ErrorCode
.
METHOD_ONLY_ALLOWED_FOR_QUERY
);
}
}
...
...
h2/src/main/org/h2/command/Prepared.java
浏览文件 @
5b81d2b9
...
@@ -208,6 +208,7 @@ public abstract class Prepared {
...
@@ -208,6 +208,7 @@ public abstract class Prepared {
* @return the result set
* @return the result set
* @throws DbException if it is not a query
* @throws DbException if it is not a query
*/
*/
@SuppressWarnings
(
"unused"
)
public
ResultInterface
query
(
int
maxrows
)
{
public
ResultInterface
query
(
int
maxrows
)
{
throw
DbException
.
get
(
ErrorCode
.
METHOD_ONLY_ALLOWED_FOR_QUERY
);
throw
DbException
.
get
(
ErrorCode
.
METHOD_ONLY_ALLOWED_FOR_QUERY
);
}
}
...
...
h2/src/main/org/h2/command/ddl/CreateView.java
浏览文件 @
5b81d2b9
...
@@ -118,7 +118,7 @@ public class CreateView extends SchemaCommand {
...
@@ -118,7 +118,7 @@ public class CreateView extends SchemaCommand {
view
=
new
TableView
(
getSchema
(),
id
,
viewName
,
querySQL
,
null
,
view
=
new
TableView
(
getSchema
(),
id
,
viewName
,
querySQL
,
null
,
columnTemplates
,
sysSession
,
false
);
columnTemplates
,
sysSession
,
false
);
}
else
{
}
else
{
view
.
replace
(
querySQL
,
columnNames
,
sysSession
,
false
,
force
);
view
.
replace
(
querySQL
,
sysSession
,
false
,
force
);
view
.
setModified
();
view
.
setModified
();
}
}
}
finally
{
}
finally
{
...
...
h2/src/main/org/h2/constraint/Constraint.java
浏览文件 @
5b81d2b9
...
@@ -192,7 +192,7 @@ public abstract class Constraint extends SchemaObjectBase implements
...
@@ -192,7 +192,7 @@ public abstract class Constraint extends SchemaObjectBase implements
* @return true if every visited expression returned true, or if there are
* @return true if every visited expression returned true, or if there are
* no expressions
* no expressions
*/
*/
public
boolean
isEverything
(
ExpressionVisitor
visitor
)
{
public
boolean
isEverything
(
@SuppressWarnings
(
"unused"
)
ExpressionVisitor
visitor
)
{
return
true
;
return
true
;
}
}
...
...
h2/src/main/org/h2/expression/Expression.java
浏览文件 @
5b81d2b9
...
@@ -134,7 +134,7 @@ public abstract class Expression {
...
@@ -134,7 +134,7 @@ public abstract class Expression {
* @param session the session
* @param session the session
* @return the negated expression, or null
* @return the negated expression, or null
*/
*/
public
Expression
getNotIfPossible
(
Session
session
)
{
public
Expression
getNotIfPossible
(
@SuppressWarnings
(
"unused"
)
Session
session
)
{
// by default it is not possible
// by default it is not possible
return
null
;
return
null
;
}
}
...
@@ -184,6 +184,7 @@ public abstract class Expression {
...
@@ -184,6 +184,7 @@ public abstract class Expression {
* @param session the session
* @param session the session
* @param filter the table filter
* @param filter the table filter
*/
*/
@SuppressWarnings
(
"unused"
)
public
void
createIndexConditions
(
Session
session
,
TableFilter
filter
)
{
public
void
createIndexConditions
(
Session
session
,
TableFilter
filter
)
{
// default is do nothing
// default is do nothing
}
}
...
@@ -292,6 +293,7 @@ public abstract class Expression {
...
@@ -292,6 +293,7 @@ public abstract class Expression {
* @param session the session
* @param session the session
* @return array of expression columns if applicable, null otherwise
* @return array of expression columns if applicable, null otherwise
*/
*/
@SuppressWarnings
(
"unused"
)
public
Expression
[]
getExpressionColumns
(
Session
session
)
{
public
Expression
[]
getExpressionColumns
(
Session
session
)
{
return
null
;
return
null
;
}
}
...
...
h2/src/main/org/h2/index/SpatialTreeIndex.java
浏览文件 @
5b81d2b9
...
@@ -180,11 +180,10 @@ public class SpatialTreeIndex extends BaseIndex implements SpatialIndex {
...
@@ -180,11 +180,10 @@ public class SpatialTreeIndex extends BaseIndex implements SpatialIndex {
/**
/**
* Compute spatial index cost
* Compute spatial index cost
* @param masks Search mask
* @param masks Search mask
* @param rowCount Table row count
* @param columns Table columns
* @param columns Table columns
* @return Index cost hint
* @return Index cost hint
*/
*/
public
static
long
getCostRangeIndex
(
int
[]
masks
,
long
rowCount
,
Column
[]
columns
)
{
public
static
long
getCostRangeIndex
(
int
[]
masks
,
Column
[]
columns
)
{
// Never use spatial tree index without spatial filter
// Never use spatial tree index without spatial filter
if
(
columns
.
length
==
0
)
{
if
(
columns
.
length
==
0
)
{
return
Long
.
MAX_VALUE
;
return
Long
.
MAX_VALUE
;
...
@@ -203,7 +202,7 @@ public class SpatialTreeIndex extends BaseIndex implements SpatialIndex {
...
@@ -203,7 +202,7 @@ public class SpatialTreeIndex extends BaseIndex implements SpatialIndex {
public
double
getCost
(
Session
session
,
int
[]
masks
,
public
double
getCost
(
Session
session
,
int
[]
masks
,
TableFilter
[]
filters
,
int
filter
,
SortOrder
sortOrder
,
TableFilter
[]
filters
,
int
filter
,
SortOrder
sortOrder
,
HashSet
<
Column
>
allColumnsSet
)
{
HashSet
<
Column
>
allColumnsSet
)
{
return
getCostRangeIndex
(
masks
,
table
.
getRowCountApproximation
(),
columns
);
return
getCostRangeIndex
(
masks
,
columns
);
}
}
...
...
h2/src/main/org/h2/jdbc/JdbcStatement.java
浏览文件 @
5b81d2b9
...
@@ -12,7 +12,6 @@ import java.sql.SQLWarning;
...
@@ -12,7 +12,6 @@ import java.sql.SQLWarning;
import
java.sql.Statement
;
import
java.sql.Statement
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
org.h2.api.ErrorCode
;
import
org.h2.api.ErrorCode
;
import
org.h2.command.Command
;
import
org.h2.command.CommandInterface
;
import
org.h2.command.CommandInterface
;
import
org.h2.engine.SessionInterface
;
import
org.h2.engine.SessionInterface
;
import
org.h2.engine.SysProperties
;
import
org.h2.engine.SysProperties
;
...
...
h2/src/main/org/h2/mvstore/StreamStore.java
浏览文件 @
5b81d2b9
...
@@ -206,6 +206,7 @@ public class StreamStore {
...
@@ -206,6 +206,7 @@ public class StreamStore {
*
*
* @param len the length of the stored block.
* @param len the length of the stored block.
*/
*/
@SuppressWarnings
(
"unused"
)
protected
void
onStore
(
int
len
)
{
protected
void
onStore
(
int
len
)
{
// do nothing by default
// do nothing by default
}
}
...
...
h2/src/main/org/h2/mvstore/cache/CacheLongKeyLIRS.java
浏览文件 @
5b81d2b9
...
@@ -174,6 +174,7 @@ public class CacheLongKeyLIRS<V> {
...
@@ -174,6 +174,7 @@ public class CacheLongKeyLIRS<V> {
* @param value the value
* @param value the value
* @return the size
* @return the size
*/
*/
@SuppressWarnings
(
"unused"
)
protected
int
sizeOf
(
V
value
)
{
protected
int
sizeOf
(
V
value
)
{
return
1
;
return
1
;
}
}
...
...
h2/src/main/org/h2/mvstore/db/MVSpatialIndex.java
浏览文件 @
5b81d2b9
...
@@ -253,8 +253,7 @@ public class MVSpatialIndex extends BaseIndex implements SpatialIndex, MVIndex {
...
@@ -253,8 +253,7 @@ public class MVSpatialIndex extends BaseIndex implements SpatialIndex, MVIndex {
public
double
getCost
(
Session
session
,
int
[]
masks
,
TableFilter
[]
filters
,
public
double
getCost
(
Session
session
,
int
[]
masks
,
TableFilter
[]
filters
,
int
filter
,
SortOrder
sortOrder
,
int
filter
,
SortOrder
sortOrder
,
HashSet
<
Column
>
allColumnsSet
)
{
HashSet
<
Column
>
allColumnsSet
)
{
return
SpatialTreeIndex
.
getCostRangeIndex
(
masks
,
return
SpatialTreeIndex
.
getCostRangeIndex
(
masks
,
columns
);
table
.
getRowCountApproximation
(),
columns
);
}
}
@Override
@Override
...
...
h2/src/main/org/h2/mvstore/rtree/MVRTreeMap.java
浏览文件 @
5b81d2b9
...
@@ -7,7 +7,6 @@ package org.h2.mvstore.rtree;
...
@@ -7,7 +7,6 @@ package org.h2.mvstore.rtree;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Iterator
;
import
java.util.Iterator
;
import
org.h2.mvstore.CursorPos
;
import
org.h2.mvstore.CursorPos
;
import
org.h2.mvstore.DataUtils
;
import
org.h2.mvstore.DataUtils
;
import
org.h2.mvstore.MVMap
;
import
org.h2.mvstore.MVMap
;
...
@@ -556,6 +555,7 @@ public class MVRTreeMap<V> extends MVMap<SpatialKey, V> {
...
@@ -556,6 +555,7 @@ public class MVRTreeMap<V> extends MVMap<SpatialKey, V> {
* @param test the user-supplied test key
* @param test the user-supplied test key
* @return true if there is a match
* @return true if there is a match
*/
*/
@SuppressWarnings
(
"unused"
)
protected
boolean
check
(
boolean
leaf
,
SpatialKey
key
,
SpatialKey
test
)
{
protected
boolean
check
(
boolean
leaf
,
SpatialKey
key
,
SpatialKey
test
)
{
return
true
;
return
true
;
}
}
...
...
h2/src/main/org/h2/server/pg/PgServer.java
浏览文件 @
5b81d2b9
...
@@ -19,7 +19,6 @@ import java.util.Collections;
...
@@ -19,7 +19,6 @@ import java.util.Collections;
import
java.util.HashSet
;
import
java.util.HashSet
;
import
java.util.Set
;
import
java.util.Set
;
import
java.util.concurrent.atomic.AtomicInteger
;
import
java.util.concurrent.atomic.AtomicInteger
;
import
org.h2.api.ErrorCode
;
import
org.h2.api.ErrorCode
;
import
org.h2.engine.Constants
;
import
org.h2.engine.Constants
;
import
org.h2.message.DbException
;
import
org.h2.message.DbException
;
...
@@ -311,6 +310,7 @@ public class PgServer implements Service {
...
@@ -311,6 +310,7 @@ public class PgServer implements Service {
* @param pretty this flag is ignored
* @param pretty this flag is ignored
* @return the SQL statement or the column name
* @return the SQL statement or the column name
*/
*/
@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
.
intValue
()
==
0
)
{
...
@@ -438,6 +438,7 @@ public class PgServer implements Service {
...
@@ -438,6 +438,7 @@ public class PgServer implements Service {
* @param privilege the privilege to check
* @param privilege the privilege to check
* @return true
* @return true
*/
*/
@SuppressWarnings
(
"unused"
)
public
static
boolean
hasDatabasePrivilege
(
int
id
,
String
privilege
)
{
public
static
boolean
hasDatabasePrivilege
(
int
id
,
String
privilege
)
{
return
true
;
return
true
;
}
}
...
@@ -450,6 +451,7 @@ public class PgServer implements Service {
...
@@ -450,6 +451,7 @@ public class PgServer implements Service {
* @param privilege the privilege to check
* @param privilege the privilege to check
* @return true
* @return true
*/
*/
@SuppressWarnings
(
"unused"
)
public
static
boolean
hasTablePrivilege
(
String
table
,
String
privilege
)
{
public
static
boolean
hasTablePrivilege
(
String
table
,
String
privilege
)
{
return
true
;
return
true
;
}
}
...
@@ -462,6 +464,7 @@ public class PgServer implements Service {
...
@@ -462,6 +464,7 @@ public class PgServer implements Service {
* @param id the id
* @param id the id
* @return 1
* @return 1
*/
*/
@SuppressWarnings
(
"unused"
)
public
static
int
getCurrentTid
(
String
table
,
String
id
)
{
public
static
int
getCurrentTid
(
String
table
,
String
id
)
{
return
1
;
return
1
;
}
}
...
@@ -475,6 +478,7 @@ public class PgServer implements Service {
...
@@ -475,6 +478,7 @@ public class PgServer implements Service {
* @param relationOid the relation object id
* @param relationOid the relation object id
* @return always null
* @return always null
*/
*/
@SuppressWarnings
(
"unused"
)
public
static
String
getPgExpr
(
String
exprText
,
int
relationOid
)
{
public
static
String
getPgExpr
(
String
exprText
,
int
relationOid
)
{
return
null
;
return
null
;
}
}
...
...
h2/src/main/org/h2/store/FileStore.java
浏览文件 @
5b81d2b9
...
@@ -147,6 +147,7 @@ public class FileStore {
...
@@ -147,6 +147,7 @@ public class FileStore {
*
*
* @param salt the salt
* @param salt the salt
*/
*/
@SuppressWarnings
(
"unused"
)
protected
void
initKey
(
byte
[]
salt
)
{
protected
void
initKey
(
byte
[]
salt
)
{
// do nothing
// do nothing
}
}
...
...
h2/src/main/org/h2/store/fs/FilePath.java
浏览文件 @
5b81d2b9
...
@@ -254,6 +254,7 @@ public abstract class FilePath {
...
@@ -254,6 +254,7 @@ public abstract class FilePath {
* @param inTempDir if the file should be stored in the temporary directory
* @param inTempDir if the file should be stored in the temporary directory
* @return the name of the created file
* @return the name of the created file
*/
*/
@SuppressWarnings
(
"unused"
)
public
FilePath
createTempFile
(
String
suffix
,
boolean
deleteOnExit
,
public
FilePath
createTempFile
(
String
suffix
,
boolean
deleteOnExit
,
boolean
inTempDir
)
throws
IOException
{
boolean
inTempDir
)
throws
IOException
{
while
(
true
)
{
while
(
true
)
{
...
...
h2/src/main/org/h2/table/Table.java
浏览文件 @
5b81d2b9
...
@@ -155,6 +155,7 @@ public abstract class Table extends SchemaObjectBase {
...
@@ -155,6 +155,7 @@ public abstract class Table extends SchemaObjectBase {
* @param key the primary key
* @param key the primary key
* @return the row
* @return the row
*/
*/
@SuppressWarnings
(
"unused"
)
public
Row
getRow
(
Session
session
,
long
key
)
{
public
Row
getRow
(
Session
session
,
long
key
)
{
return
null
;
return
null
;
}
}
...
@@ -189,6 +190,7 @@ public abstract class Table extends SchemaObjectBase {
...
@@ -189,6 +190,7 @@ public abstract class Table extends SchemaObjectBase {
* @param operation the operation
* @param operation the operation
* @param row the row
* @param row the row
*/
*/
@SuppressWarnings
(
"unused"
)
public
void
commit
(
short
operation
,
Row
row
)
{
public
void
commit
(
short
operation
,
Row
row
)
{
// nothing to do
// nothing to do
}
}
...
@@ -226,6 +228,7 @@ public abstract class Table extends SchemaObjectBase {
...
@@ -226,6 +228,7 @@ public abstract class Table extends SchemaObjectBase {
* @param allColumnsSet all columns
* @param allColumnsSet all columns
* @return the scan index
* @return the scan index
*/
*/
@SuppressWarnings
(
"unused"
)
public
Index
getScanIndex
(
Session
session
,
int
[]
masks
,
public
Index
getScanIndex
(
Session
session
,
int
[]
masks
,
TableFilter
[]
filters
,
int
filter
,
SortOrder
sortOrder
,
TableFilter
[]
filters
,
int
filter
,
SortOrder
sortOrder
,
HashSet
<
Column
>
allColumnsSet
)
{
HashSet
<
Column
>
allColumnsSet
)
{
...
@@ -456,6 +459,7 @@ public abstract class Table extends SchemaObjectBase {
...
@@ -456,6 +459,7 @@ public abstract class Table extends SchemaObjectBase {
* @param session the session
* @param session the session
* @return true if it is
* @return true if it is
*/
*/
@SuppressWarnings
(
"unused"
)
public
boolean
isLockedExclusivelyBy
(
Session
session
)
{
public
boolean
isLockedExclusivelyBy
(
Session
session
)
{
return
false
;
return
false
;
}
}
...
@@ -1136,6 +1140,7 @@ public abstract class Table extends SchemaObjectBase {
...
@@ -1136,6 +1140,7 @@ public abstract class Table extends SchemaObjectBase {
* @return an object array with the sessions involved in the deadlock, or
* @return an object array with the sessions involved in the deadlock, or
* null
* null
*/
*/
@SuppressWarnings
(
"unused"
)
public
ArrayList
<
Session
>
checkDeadlock
(
Session
session
,
Session
clash
,
public
ArrayList
<
Session
>
checkDeadlock
(
Session
session
,
Session
clash
,
Set
<
Session
>
visited
)
{
Set
<
Session
>
visited
)
{
return
null
;
return
null
;
...
...
h2/src/main/org/h2/table/TableView.java
浏览文件 @
5b81d2b9
...
@@ -71,12 +71,11 @@ public class TableView extends Table {
...
@@ -71,12 +71,11 @@ public class TableView extends Table {
* dependent views.
* dependent views.
*
*
* @param querySQL the SQL statement
* @param querySQL the SQL statement
* @param columnNames the column names
* @param session the session
* @param session the session
* @param recursive whether this is a recursive view
* @param recursive whether this is a recursive view
* @param force if errors should be ignored
* @param force if errors should be ignored
*/
*/
public
void
replace
(
String
querySQL
,
String
[]
columnNames
,
Session
session
,
public
void
replace
(
String
querySQL
,
Session
session
,
boolean
recursive
,
boolean
force
)
{
boolean
recursive
,
boolean
force
)
{
String
oldQuerySQL
=
this
.
querySQL
;
String
oldQuerySQL
=
this
.
querySQL
;
Column
[]
oldColumnTemplates
=
this
.
columnTemplates
;
Column
[]
oldColumnTemplates
=
this
.
columnTemplates
;
...
...
h2/src/main/org/h2/util/Profiler.java
浏览文件 @
5b81d2b9
...
@@ -102,7 +102,7 @@ public class Profiler implements Runnable {
...
@@ -102,7 +102,7 @@ public class Profiler implements Runnable {
* @param agentArgs the agent arguments
* @param agentArgs the agent arguments
* @param inst the instrumentation object
* @param inst the instrumentation object
*/
*/
public
static
void
premain
(
String
agentArgs
,
Instrumentation
inst
)
{
public
static
void
premain
(
@SuppressWarnings
(
"unused"
)
String
agentArgs
,
Instrumentation
inst
)
{
instrumentation
=
inst
;
instrumentation
=
inst
;
}
}
...
...
h2/src/main/org/h2/util/ToChar.java
浏览文件 @
5b81d2b9
...
@@ -122,7 +122,7 @@ public class ToChar {
...
@@ -122,7 +122,7 @@ public class ToChar {
* @return the formatted number
* @return the formatted number
*/
*/
public
static
String
toChar
(
BigDecimal
number
,
String
format
,
public
static
String
toChar
(
BigDecimal
number
,
String
format
,
String
nlsParam
)
{
@SuppressWarnings
(
"unused"
)
String
nlsParam
)
{
// short-circuit logic for formats that don't follow common logic below
// short-circuit logic for formats that don't follow common logic below
String
formatUp
=
format
!=
null
?
StringUtils
.
toUpperEnglish
(
format
)
:
null
;
String
formatUp
=
format
!=
null
?
StringUtils
.
toUpperEnglish
(
format
)
:
null
;
...
@@ -594,7 +594,7 @@ public class ToChar {
...
@@ -594,7 +594,7 @@ public class ToChar {
* @param nlsParam the NLS parameter (if any)
* @param nlsParam the NLS parameter (if any)
* @return the formatted timestamp
* @return the formatted timestamp
*/
*/
public
static
String
toChar
(
Timestamp
ts
,
String
format
,
String
nlsParam
)
{
public
static
String
toChar
(
Timestamp
ts
,
String
format
,
@SuppressWarnings
(
"unused"
)
String
nlsParam
)
{
if
(
format
==
null
)
{
if
(
format
==
null
)
{
format
=
"DD-MON-YY HH.MI.SS.FF PM"
;
format
=
"DD-MON-YY HH.MI.SS.FF PM"
;
...
...
h2/src/main/org/h2/value/Value.java
浏览文件 @
5b81d2b9
...
@@ -477,7 +477,7 @@ public abstract class Value {
...
@@ -477,7 +477,7 @@ public abstract class Value {
* @param v the value to add
* @param v the value to add
* @return the result
* @return the result
*/
*/
public
Value
add
(
Value
v
)
{
public
Value
add
(
@SuppressWarnings
(
"unused"
)
Value
v
)
{
throw
throwUnsupportedExceptionForType
(
"+"
);
throw
throwUnsupportedExceptionForType
(
"+"
);
}
}
...
@@ -500,7 +500,7 @@ public abstract class Value {
...
@@ -500,7 +500,7 @@ public abstract class Value {
* @param v the value to subtract
* @param v the value to subtract
* @return the result
* @return the result
*/
*/
public
Value
subtract
(
Value
v
)
{
public
Value
subtract
(
@SuppressWarnings
(
"unused"
)
Value
v
)
{
throw
throwUnsupportedExceptionForType
(
"-"
);
throw
throwUnsupportedExceptionForType
(
"-"
);
}
}
...
@@ -510,7 +510,7 @@ public abstract class Value {
...
@@ -510,7 +510,7 @@ public abstract class Value {
* @param v the value to divide by
* @param v the value to divide by
* @return the result
* @return the result
*/
*/
public
Value
divide
(
Value
v
)
{
public
Value
divide
(
@SuppressWarnings
(
"unused"
)
Value
v
)
{
throw
throwUnsupportedExceptionForType
(
"/"
);
throw
throwUnsupportedExceptionForType
(
"/"
);
}
}
...
@@ -520,7 +520,7 @@ public abstract class Value {
...
@@ -520,7 +520,7 @@ public abstract class Value {
* @param v the value to multiply with
* @param v the value to multiply with
* @return the result
* @return the result
*/
*/
public
Value
multiply
(
Value
v
)
{
public
Value
multiply
(
@SuppressWarnings
(
"unused"
)
Value
v
)
{
throw
throwUnsupportedExceptionForType
(
"*"
);
throw
throwUnsupportedExceptionForType
(
"*"
);
}
}
...
@@ -530,7 +530,7 @@ public abstract class Value {
...
@@ -530,7 +530,7 @@ public abstract class Value {
* @param v the value to take the modulus with
* @param v the value to take the modulus with
* @return the result
* @return the result
*/
*/
public
Value
modulus
(
Value
v
)
{
public
Value
modulus
(
@SuppressWarnings
(
"unused"
)
Value
v
)
{
throw
throwUnsupportedExceptionForType
(
"%"
);
throw
throwUnsupportedExceptionForType
(
"%"
);
}
}
...
@@ -1054,6 +1054,7 @@ public abstract class Value {
...
@@ -1054,6 +1054,7 @@ public abstract class Value {
* @param targetScale the requested scale
* @param targetScale the requested scale
* @return the value
* @return the value
*/
*/
@SuppressWarnings
(
"unused"
)
public
Value
convertScale
(
boolean
onlyToSmallerScale
,
int
targetScale
)
{
public
Value
convertScale
(
boolean
onlyToSmallerScale
,
int
targetScale
)
{
return
this
;
return
this
;
}
}
...
@@ -1067,6 +1068,7 @@ public abstract class Value {
...
@@ -1067,6 +1068,7 @@ public abstract class Value {
* @param force true if losing numeric precision is allowed
* @param force true if losing numeric precision is allowed
* @return the new value
* @return the new value
*/
*/
@SuppressWarnings
(
"unused"
)
public
Value
convertPrecision
(
long
precision
,
boolean
force
)
{
public
Value
convertPrecision
(
long
precision
,
boolean
force
)
{
return
this
;
return
this
;
}
}
...
@@ -1122,6 +1124,7 @@ public abstract class Value {
...
@@ -1122,6 +1124,7 @@ public abstract class Value {
* @param tableId the table where this object is used
* @param tableId the table where this object is used
* @return the new value or itself
* @return the new value or itself
*/
*/
@SuppressWarnings
(
"unused"
)
public
Value
copy
(
DataHandler
handler
,
int
tableId
)
{
public
Value
copy
(
DataHandler
handler
,
int
tableId
)
{
return
this
;
return
this
;
}
}
...
...
h2/src/test/org/h2/test/TestBase.java
浏览文件 @
5b81d2b9
...
@@ -34,7 +34,6 @@ import java.util.ArrayList;
...
@@ -34,7 +34,6 @@ import java.util.ArrayList;
import
java.util.LinkedList
;
import
java.util.LinkedList
;
import
java.util.SimpleTimeZone
;
import
java.util.SimpleTimeZone
;
import
java.util.concurrent.TimeUnit
;
import
java.util.concurrent.TimeUnit
;
import
org.h2.jdbc.JdbcConnection
;
import
org.h2.jdbc.JdbcConnection
;
import
org.h2.message.DbException
;
import
org.h2.message.DbException
;
import
org.h2.store.fs.FilePath
;
import
org.h2.store.fs.FilePath
;
...
@@ -130,6 +129,7 @@ public abstract class TestBase {
...
@@ -130,6 +129,7 @@ public abstract class TestBase {
*
*
* @param seed the random seed value
* @param seed the random seed value
*/
*/
@SuppressWarnings
(
"unused"
)
public
void
testCase
(
int
seed
)
throws
Exception
{
public
void
testCase
(
int
seed
)
throws
Exception
{
// do nothing
// do nothing
}
}
...
...
h2/src/test/org/h2/test/db/TaskProcess.java
浏览文件 @
5b81d2b9
...
@@ -16,8 +16,8 @@ import java.io.OutputStreamWriter;
...
@@ -16,8 +16,8 @@ import java.io.OutputStreamWriter;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
org.h2.test.utils.SelfDestructor
;
import
org.h2.test.utils.SelfDestructor
;
import
org.h2.util.Task
;
import
org.h2.util.StringUtils
;
import
org.h2.util.StringUtils
;
import
org.h2.util.Task
;
/**
/**
* A task that is run as an external process. This class communicates over
* A task that is run as an external process. This class communicates over
...
@@ -59,7 +59,6 @@ public class TaskProcess {
...
@@ -59,7 +59,6 @@ public class TaskProcess {
}
}
String
[]
procDef
=
new
String
[
list
.
size
()];
String
[]
procDef
=
new
String
[
list
.
size
()];
list
.
toArray
(
procDef
);
list
.
toArray
(
procDef
);
traceOperation
(
"start: "
+
StringUtils
.
arrayCombine
(
procDef
,
' '
));
process
=
Runtime
.
getRuntime
().
exec
(
procDef
);
process
=
Runtime
.
getRuntime
().
exec
(
procDef
);
copyInThread
(
process
.
getErrorStream
(),
System
.
err
);
copyInThread
(
process
.
getErrorStream
(),
System
.
err
);
reader
=
new
BufferedReader
(
new
InputStreamReader
(
process
.
getInputStream
()));
reader
=
new
BufferedReader
(
new
InputStreamReader
(
process
.
getInputStream
()));
...
@@ -70,7 +69,6 @@ public class TaskProcess {
...
@@ -70,7 +69,6 @@ public class TaskProcess {
"No reply from process, command: "
+
"No reply from process, command: "
+
StringUtils
.
arrayCombine
(
procDef
,
' '
));
StringUtils
.
arrayCombine
(
procDef
,
' '
));
}
else
if
(
line
.
startsWith
(
"running"
))
{
}
else
if
(
line
.
startsWith
(
"running"
))
{
traceOperation
(
"got reply: "
+
line
);
}
else
if
(
line
.
startsWith
(
"init error"
))
{
}
else
if
(
line
.
startsWith
(
"init error"
))
{
throw
new
RuntimeException
(
line
);
throw
new
RuntimeException
(
line
);
}
}
...
@@ -130,12 +128,4 @@ public class TaskProcess {
...
@@ -130,12 +128,4 @@ public class TaskProcess {
process
.
destroy
();
process
.
destroy
();
}
}
/**
* Trace the operation. Tracing is disabled by default.
*
* @param s the string to print
*/
private
void
traceOperation
(
String
s
)
{
// ignore
}
}
}
h2/src/test/org/h2/test/db/TestFunctions.java
浏览文件 @
5b81d2b9
...
@@ -179,7 +179,7 @@ public class TestFunctions extends TestBase implements AggregateFunction {
...
@@ -179,7 +179,7 @@ public class TestFunctions extends TestBase implements AggregateFunction {
* @param conn the connection
* @param conn the connection
* @return a result set
* @return a result set
*/
*/
public
static
ResultSet
simpleFunctionTable
(
Connection
conn
)
{
public
static
ResultSet
simpleFunctionTable
(
@SuppressWarnings
(
"unused"
)
Connection
conn
)
{
SimpleResultSet
result
=
new
SimpleResultSet
();
SimpleResultSet
result
=
new
SimpleResultSet
();
result
.
addColumn
(
"A"
,
Types
.
INTEGER
,
0
,
0
);
result
.
addColumn
(
"A"
,
Types
.
INTEGER
,
0
,
0
);
result
.
addColumn
(
"B"
,
Types
.
CHAR
,
0
,
0
);
result
.
addColumn
(
"B"
,
Types
.
CHAR
,
0
,
0
);
...
@@ -2259,7 +2259,7 @@ public class TestFunctions extends TestBase implements AggregateFunction {
...
@@ -2259,7 +2259,7 @@ public class TestFunctions extends TestBase implements AggregateFunction {
* @param conn the connection
* @param conn the connection
* @return the result set
* @return the result set
*/
*/
public
static
ResultSet
nullResultSet
(
Connection
conn
)
{
public
static
ResultSet
nullResultSet
(
@SuppressWarnings
(
"unused"
)
Connection
conn
)
{
return
null
;
return
null
;
}
}
...
...
h2/src/test/org/h2/test/jdbc/TestBatchUpdates.java
浏览文件 @
5b81d2b9
...
@@ -13,7 +13,6 @@ import java.sql.PreparedStatement;
...
@@ -13,7 +13,6 @@ import java.sql.PreparedStatement;
import
java.sql.ResultSet
;
import
java.sql.ResultSet
;
import
java.sql.SQLException
;
import
java.sql.SQLException
;
import
java.sql.Statement
;
import
java.sql.Statement
;
import
org.h2.test.TestBase
;
import
org.h2.test.TestBase
;
/**
/**
...
@@ -138,7 +137,7 @@ public class TestBatchUpdates extends TestBase {
...
@@ -138,7 +137,7 @@ public class TestBatchUpdates extends TestBase {
* @param f the float
* @param f the float
* @return the float converted to an int
* @return the float converted to an int
*/
*/
public
static
int
updatePrices
(
String
message
,
double
f
)
{
public
static
int
updatePrices
(
@SuppressWarnings
(
"unused"
)
String
message
,
double
f
)
{
return
(
int
)
f
;
return
(
int
)
f
;
}
}
...
...
h2/src/test/org/h2/test/store/TestMVStore.java
浏览文件 @
5b81d2b9
...
@@ -2067,6 +2067,7 @@ public class TestMVStore extends TestBase {
...
@@ -2067,6 +2067,7 @@ public class TestMVStore extends TestBase {
*
*
* @param msg the message
* @param msg the message
*/
*/
@SuppressWarnings
(
"unused"
)
protected
static
void
log
(
String
msg
)
{
protected
static
void
log
(
String
msg
)
{
// System.out.println(msg);
// System.out.println(msg);
}
}
...
...
h2/src/test/org/h2/test/unit/TestSort.java
浏览文件 @
5b81d2b9
...
@@ -88,7 +88,7 @@ public class TestSort extends TestBase {
...
@@ -88,7 +88,7 @@ public class TestSort extends TestBase {
*
*
* @param type the type of data
* @param type the type of data
*/
*/
private
void
test
(
String
type
)
throws
Exception
{
private
void
test
(
@SuppressWarnings
(
"unused"
)
String
type
)
throws
Exception
{
compareCount
.
set
(
0
);
compareCount
.
set
(
0
);
// long t = System.nanoTime();
// long t = System.nanoTime();
...
...
h2/src/tools/org/h2/android/H2Utils.java
浏览文件 @
5b81d2b9
...
@@ -18,7 +18,7 @@ public class H2Utils {
...
@@ -18,7 +18,7 @@ public class H2Utils {
* @param factory the cursor factory to use
* @param factory the cursor factory to use
* @return the database connection
* @return the database connection
*/
*/
public
static
H2Database
openOrCreateDatabase
(
String
name
,
int
mode
,
public
static
H2Database
openOrCreateDatabase
(
String
name
,
@SuppressWarnings
(
"unused"
)
int
mode
,
H2Database
.
CursorFactory
factory
)
{
H2Database
.
CursorFactory
factory
)
{
return
H2Database
.
openOrCreateDatabase
(
name
,
factory
);
return
H2Database
.
openOrCreateDatabase
(
name
,
factory
);
}
}
...
...
h2/src/tools/org/h2/build/doc/XMLParser.java
浏览文件 @
5b81d2b9
...
@@ -495,7 +495,7 @@ public class XMLParser {
...
@@ -495,7 +495,7 @@ public class XMLParser {
* @param name the local name of the attribute
* @param name the local name of the attribute
* @return the value or null
* @return the value or null
*/
*/
public
String
getAttributeValue
(
String
namespaceURI
,
String
name
)
{
public
String
getAttributeValue
(
@SuppressWarnings
(
"unused"
)
String
namespaceURI
,
String
name
)
{
int
len
=
getAttributeCount
();
int
len
=
getAttributeCount
();
for
(
int
i
=
0
;
i
<
len
;
i
++)
{
for
(
int
i
=
0
;
i
<
len
;
i
++)
{
if
(
getAttributeLocalName
(
i
).
equals
(
name
))
{
if
(
getAttributeLocalName
(
i
).
equals
(
name
))
{
...
...
h2/src/tools/org/h2/dev/cache/CacheLIRS.java
浏览文件 @
5b81d2b9
...
@@ -194,6 +194,7 @@ public class CacheLIRS<K, V> extends AbstractMap<K, V> {
...
@@ -194,6 +194,7 @@ public class CacheLIRS<K, V> extends AbstractMap<K, V> {
* @param value the value
* @param value the value
* @return the size
* @return the size
*/
*/
@SuppressWarnings
(
"unused"
)
protected
int
sizeOf
(
K
key
,
V
value
)
{
protected
int
sizeOf
(
K
key
,
V
value
)
{
return
1
;
return
1
;
}
}
...
@@ -204,7 +205,7 @@ public class CacheLIRS<K, V> extends AbstractMap<K, V> {
...
@@ -204,7 +205,7 @@ public class CacheLIRS<K, V> extends AbstractMap<K, V> {
*
*
* @param key the key
* @param key the key
*/
*/
protected
void
onRemove
(
K
key
)
{
protected
void
onRemove
(
@SuppressWarnings
(
"unused"
)
K
key
)
{
// do nothing
// do nothing
}
}
...
...
h2/src/tools/org/h2/jaqu/TableInspector.java
浏览文件 @
5b81d2b9
...
@@ -5,6 +5,9 @@
...
@@ -5,6 +5,9 @@
*/
*/
package
org
.
h2
.
jaqu
;
package
org
.
h2
.
jaqu
;
import
static
org
.
h2
.
jaqu
.
ValidationRemark
.
consider
;
import
static
org
.
h2
.
jaqu
.
ValidationRemark
.
error
;
import
static
org
.
h2
.
jaqu
.
ValidationRemark
.
warn
;
import
java.lang.reflect.Modifier
;
import
java.lang.reflect.Modifier
;
import
java.sql.DatabaseMetaData
;
import
java.sql.DatabaseMetaData
;
import
java.sql.ResultSet
;
import
java.sql.ResultSet
;
...
@@ -28,10 +31,6 @@ import org.h2.util.New;
...
@@ -28,10 +31,6 @@ import org.h2.util.New;
import
org.h2.util.StatementBuilder
;
import
org.h2.util.StatementBuilder
;
import
org.h2.util.StringUtils
;
import
org.h2.util.StringUtils
;
import
static
org
.
h2
.
jaqu
.
ValidationRemark
.
consider
;
import
static
org
.
h2
.
jaqu
.
ValidationRemark
.
error
;
import
static
org
.
h2
.
jaqu
.
ValidationRemark
.
warn
;
/**
/**
* Class to inspect the contents of a particular table including its indexes.
* Class to inspect the contents of a particular table including its indexes.
* This class does the bulk of the work in terms of model generation and model
* This class does the bulk of the work in terms of model generation and model
...
@@ -423,6 +422,7 @@ public class TableInspector {
...
@@ -423,6 +422,7 @@ public class TableInspector {
* Validates an inspected index from the database against the
* Validates an inspected index from the database against the
* IndexDefinition within the TableDefinition.
* IndexDefinition within the TableDefinition.
*/
*/
@SuppressWarnings
(
"unused"
)
private
<
T
>
void
validate
(
List
<
ValidationRemark
>
remarks
,
private
<
T
>
void
validate
(
List
<
ValidationRemark
>
remarks
,
TableDefinition
<
T
>
def
,
IndexInspector
index
,
boolean
throwError
)
{
TableDefinition
<
T
>
def
,
IndexInspector
index
,
boolean
throwError
)
{
List
<
IndexDefinition
>
defIndexes
=
def
.
getIndexes
(
IndexType
.
STANDARD
);
List
<
IndexDefinition
>
defIndexes
=
def
.
getIndexes
(
IndexType
.
STANDARD
);
...
...
h2/src/tools/org/h2/java/io/PrintStream.java
浏览文件 @
5b81d2b9
...
@@ -15,6 +15,7 @@ public class PrintStream {
...
@@ -15,6 +15,7 @@ public class PrintStream {
*
*
* @param s the string
* @param s the string
*/
*/
@SuppressWarnings
(
"unused"
)
public
void
println
(
String
s
)
{
public
void
println
(
String
s
)
{
// c: int x = s->chars->length();
// c: int x = s->chars->length();
// c: printf("%.*S\n", x, s->chars->getPointer());
// c: printf("%.*S\n", x, s->chars->getPointer());
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论