Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
be0f8ddc
提交
be0f8ddc
authored
11月 16, 2016
作者:
Noel Grandin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
some Eclipse warnings cleanup
上级
a632178c
隐藏空白字符变更
内嵌
并排
正在显示
16 个修改的文件
包含
69 行增加
和
21 行删除
+69
-21
AlterTableAlterColumn.java
h2/src/main/org/h2/command/ddl/AlterTableAlterColumn.java
+1
-1
ResultInterface.java
h2/src/main/org/h2/result/ResultInterface.java
+1
-0
TestBase.java
h2/src/test/org/h2/test/TestBase.java
+1
-1
TestBenchmark.java
h2/src/test/org/h2/test/store/TestBenchmark.java
+1
-3
TestConcurrent.java
h2/src/test/org/h2/test/store/TestConcurrent.java
+5
-6
TestConcurrentLinkedList.java
h2/src/test/org/h2/test/store/TestConcurrentLinkedList.java
+1
-2
TestTransactionStore.java
h2/src/test/org/h2/test/store/TestTransactionStore.java
+2
-3
TestNetUtils.java
h2/src/test/org/h2/test/unit/TestNetUtils.java
+1
-1
TestServlet.java
h2/src/test/org/h2/test/unit/TestServlet.java
+4
-2
H2Cursor.java
h2/src/tools/org/h2/android/H2Cursor.java
+39
-0
H2Database.java
h2/src/tools/org/h2/android/H2Database.java
+2
-1
H2OpenHelper.java
h2/src/tools/org/h2/android/H2OpenHelper.java
+1
-0
H2Program.java
h2/src/tools/org/h2/android/H2Program.java
+3
-0
H2Query.java
h2/src/tools/org/h2/android/H2Query.java
+5
-0
H2QueryBuilder.java
h2/src/tools/org/h2/android/H2QueryBuilder.java
+1
-0
BuildBase.java
h2/src/tools/org/h2/build/BuildBase.java
+1
-1
没有找到文件。
h2/src/main/org/h2/command/ddl/AlterTableAlterColumn.java
浏览文件 @
be0f8ddc
...
...
@@ -198,7 +198,7 @@ public class AlterTableAlterColumn extends SchemaCommand {
return
0
;
}
private
void
checkDefaultReferencesTable
(
Table
table
,
Expression
defaultExpression
)
{
private
static
void
checkDefaultReferencesTable
(
Table
table
,
Expression
defaultExpression
)
{
if
(
defaultExpression
==
null
)
{
return
;
}
...
...
h2/src/main/org/h2/result/ResultInterface.java
浏览文件 @
be0f8ddc
...
...
@@ -67,6 +67,7 @@ public interface ResultInterface extends AutoCloseable {
/**
* Close the result and delete any temporary files
*/
@Override
void
close
();
/**
...
...
h2/src/test/org/h2/test/TestBase.java
浏览文件 @
be0f8ddc
...
...
@@ -153,7 +153,7 @@ public abstract class TestBase {
if
(
config
.
stopOnError
)
{
throw
new
AssertionError
(
"ERROR"
);
}
conf
.
atLeastOneTestFailed
=
true
;
TestAll
.
atLeastOneTestFailed
=
true
;
if
(
e
instanceof
OutOfMemoryError
)
{
throw
(
OutOfMemoryError
)
e
;
}
...
...
h2/src/test/org/h2/test/store/TestBenchmark.java
浏览文件 @
be0f8ddc
...
...
@@ -12,13 +12,11 @@ import java.util.Random;
import
java.util.concurrent.CountDownLatch
;
import
java.util.concurrent.atomic.AtomicBoolean
;
import
java.util.concurrent.atomic.AtomicInteger
;
import
org.h2.mvstore.MVMap
;
import
org.h2.mvstore.MVStore
;
import
org.h2.store.FileLister
;
import
org.h2.store.fs.FileUtils
;
import
org.h2.test.TestBase
;
import
org.h2.util.Profiler
;
import
org.h2.util.Task
;
/**
...
...
@@ -216,7 +214,7 @@ public class TestBenchmark extends TestBase {
conn
.
close
();
}
private
void
randomize
(
byte
[]
data
,
int
i
)
{
private
static
void
randomize
(
byte
[]
data
,
int
i
)
{
Random
r
=
new
Random
(
i
);
r
.
nextBytes
(
data
);
}
...
...
h2/src/test/org/h2/test/store/TestConcurrent.java
浏览文件 @
be0f8ddc
...
...
@@ -19,7 +19,6 @@ import java.util.Iterator;
import
java.util.Map
;
import
java.util.Random
;
import
java.util.concurrent.atomic.AtomicInteger
;
import
org.h2.mvstore.DataUtils
;
import
org.h2.mvstore.MVMap
;
import
org.h2.mvstore.MVStore
;
...
...
@@ -314,7 +313,7 @@ public class TestConcurrent extends TestMVStore {
}
}
private
void
testConcurrentChangeAndGetVersion
()
throws
InterruptedException
{
private
static
void
testConcurrentChangeAndGetVersion
()
throws
InterruptedException
{
for
(
int
test
=
0
;
test
<
10
;
test
++)
{
final
MVStore
s
=
new
MVStore
.
Builder
().
autoCommitDisabled
().
open
();
...
...
@@ -522,7 +521,7 @@ public class TestConcurrent extends TestMVStore {
/**
* Test the concurrent map implementation.
*/
private
void
testConcurrentMap
()
throws
InterruptedException
{
private
static
void
testConcurrentMap
()
throws
InterruptedException
{
final
MVStore
s
=
openStore
(
null
);
final
MVMap
<
Integer
,
Integer
>
m
=
s
.
openMap
(
"data"
);
try
{
...
...
@@ -644,7 +643,7 @@ public class TestConcurrent extends TestMVStore {
in
.
close
();
}
private
void
testConcurrentIterate
()
{
private
static
void
testConcurrentIterate
()
{
MVStore
s
=
new
MVStore
.
Builder
().
pageSplitSize
(
3
).
open
();
s
.
setVersionsToKeep
(
100
);
final
MVMap
<
Integer
,
Integer
>
map
=
s
.
openMap
(
"test"
);
...
...
@@ -697,7 +696,7 @@ public class TestConcurrent extends TestMVStore {
assertTrue
(
notDetected
.
get
()
*
10
<=
detected
.
get
());
}
private
void
testConcurrentWrite
(
final
AtomicInteger
detected
,
private
static
void
testConcurrentWrite
(
final
AtomicInteger
detected
,
final
AtomicInteger
notDetected
)
throws
InterruptedException
{
final
MVStore
s
=
openStore
(
null
);
final
MVMap
<
Integer
,
Integer
>
m
=
s
.
openMap
(
"data"
);
...
...
@@ -761,7 +760,7 @@ public class TestConcurrent extends TestMVStore {
s
.
close
();
}
private
void
testConcurrentRead
()
throws
InterruptedException
{
private
static
void
testConcurrentRead
()
throws
InterruptedException
{
final
MVStore
s
=
openStore
(
null
);
final
MVMap
<
Integer
,
Integer
>
m
=
s
.
openMap
(
"data"
);
final
int
size
=
3
;
...
...
h2/src/test/org/h2/test/store/TestConcurrentLinkedList.java
浏览文件 @
be0f8ddc
...
...
@@ -9,7 +9,6 @@ import java.util.Iterator;
import
java.util.LinkedList
;
import
java.util.Random
;
import
java.util.concurrent.atomic.AtomicInteger
;
import
org.h2.mvstore.ConcurrentArrayList
;
import
org.h2.test.TestBase
;
import
org.h2.util.Task
;
...
...
@@ -45,7 +44,7 @@ public class TestConcurrentLinkedList extends TestBase {
testPerformance
(
false
);
}
private
void
testPerformance
(
final
boolean
stock
)
{
private
static
void
testPerformance
(
final
boolean
stock
)
{
System
.
out
.
print
(
stock
?
"stock "
:
"custom "
);
long
start
=
System
.
currentTimeMillis
();
// final ConcurrentLinkedList<Integer> test =
...
...
h2/src/test/org/h2/test/store/TestTransactionStore.java
浏览文件 @
be0f8ddc
...
...
@@ -15,7 +15,6 @@ import java.util.Iterator;
import
java.util.List
;
import
java.util.Random
;
import
java.util.concurrent.atomic.AtomicInteger
;
import
org.h2.mvstore.DataUtils
;
import
org.h2.mvstore.MVMap
;
import
org.h2.mvstore.MVStore
;
...
...
@@ -63,7 +62,7 @@ public class TestTransactionStore extends TestBase {
testStoreMultiThreadedReads
();
}
private
void
testConcurrentAddRemove
()
throws
InterruptedException
{
private
static
void
testConcurrentAddRemove
()
throws
InterruptedException
{
MVStore
s
=
MVStore
.
open
(
null
);
int
threadCount
=
3
;
final
int
keyCount
=
2
;
...
...
@@ -988,7 +987,7 @@ public class TestTransactionStore extends TestBase {
s
.
close
();
}
private
void
testStoreMultiThreadedReads
()
throws
Exception
{
private
static
void
testStoreMultiThreadedReads
()
throws
Exception
{
MVStore
s
=
MVStore
.
open
(
null
);
final
TransactionStore
ts
=
new
TransactionStore
(
s
);
...
...
h2/src/test/org/h2/test/unit/TestNetUtils.java
浏览文件 @
be0f8ddc
...
...
@@ -177,7 +177,7 @@ public class TestNetUtils extends TestBase {
}
}
private
void
testFrequentConnections
(
boolean
ssl
,
int
count
)
throws
Exception
{
private
static
void
testFrequentConnections
(
boolean
ssl
,
int
count
)
throws
Exception
{
final
ServerSocket
serverSocket
=
NetUtils
.
createServerSocket
(
PORT
,
ssl
);
final
AtomicInteger
counter
=
new
AtomicInteger
(
count
);
Task
serverThread
=
new
Task
()
{
...
...
h2/src/test/org/h2/test/unit/TestServlet.java
浏览文件 @
be0f8ddc
...
...
@@ -17,7 +17,6 @@ import java.util.HashMap;
import
java.util.Map
;
import
java.util.Properties
;
import
java.util.Set
;
import
javax.servlet.Filter
;
import
javax.servlet.FilterRegistration
;
import
javax.servlet.FilterRegistration.Dynamic
;
...
...
@@ -30,7 +29,6 @@ import javax.servlet.ServletRegistration;
import
javax.servlet.SessionCookieConfig
;
import
javax.servlet.SessionTrackingMode
;
import
javax.servlet.descriptor.JspConfigDescriptor
;
import
org.h2.api.ErrorCode
;
import
org.h2.server.web.DbStarter
;
import
org.h2.test.TestBase
;
...
...
@@ -150,6 +148,7 @@ public class TestServlet extends TestBase {
* @deprecated as of servlet API 2.1
*/
@Override
@Deprecated
public
Servlet
getServlet
(
String
string
)
{
throw
new
UnsupportedOperationException
();
}
...
...
@@ -162,6 +161,7 @@ public class TestServlet extends TestBase {
/**
* @deprecated as of servlet API 2.1
*/
@Deprecated
@Override
public
Enumeration
<
String
>
getServletNames
()
{
throw
new
UnsupportedOperationException
();
...
...
@@ -170,6 +170,7 @@ public class TestServlet extends TestBase {
/**
* @deprecated as of servlet API 2.0
*/
@Deprecated
@Override
public
Enumeration
<
Servlet
>
getServlets
()
{
throw
new
UnsupportedOperationException
();
...
...
@@ -183,6 +184,7 @@ public class TestServlet extends TestBase {
/**
* @deprecated as of servlet API 2.1
*/
@Deprecated
@Override
public
void
log
(
Exception
exception
,
String
string
)
{
throw
new
UnsupportedOperationException
();
...
...
h2/src/tools/org/h2/android/H2Cursor.java
浏览文件 @
be0f8ddc
...
...
@@ -18,6 +18,7 @@ import android.os.Bundle;
/**
* A cursor implementation.
*/
@SuppressWarnings
(
"unused"
)
public
class
H2Cursor
extends
AbstractWindowedCursor
{
private
H2Database
database
;
...
...
@@ -33,22 +34,27 @@ public class H2Cursor extends AbstractWindowedCursor {
this
.
result
=
result
;
}
@Override
public
void
close
()
{
result
.
close
();
}
@Override
public
void
deactivate
()
{
// TODO
}
@Override
public
int
getColumnIndex
(
String
columnName
)
{
return
0
;
}
@Override
public
String
[]
getColumnNames
()
{
return
null
;
}
@Override
public
int
getCount
()
{
return
result
.
getRowCount
();
}
...
...
@@ -73,10 +79,12 @@ public class H2Cursor extends AbstractWindowedCursor {
return
false
;
}
@Override
public
void
registerDataSetObserver
(
DataSetObserver
observer
)
{
// TODO
}
@Override
public
boolean
requery
()
{
return
false
;
}
...
...
@@ -99,6 +107,7 @@ public class H2Cursor extends AbstractWindowedCursor {
// TODO
}
@Override
public
boolean
move
(
int
offset
)
{
if
(
offset
==
1
)
{
return
result
.
next
();
...
...
@@ -106,148 +115,178 @@ public class H2Cursor extends AbstractWindowedCursor {
throw
H2Database
.
unsupported
();
}
@Override
public
void
copyStringToBuffer
(
int
columnIndex
,
CharArrayBuffer
buffer
)
{
// TODO
}
@Override
public
byte
[]
getBlob
(
int
columnIndex
)
{
// TODO
return
null
;
}
@Override
public
int
getColumnCount
()
{
// TODO
return
0
;
}
@Override
public
int
getColumnIndexOrThrow
(
String
columnName
)
{
// TODO
return
0
;
}
@Override
public
String
getColumnName
(
int
columnIndex
)
{
// TODO
return
null
;
}
@Override
public
double
getDouble
(
int
columnIndex
)
{
// TODO
return
0
;
}
@Override
public
Bundle
getExtras
()
{
// TODO
return
null
;
}
@Override
public
float
getFloat
(
int
columnIndex
)
{
// TODO
return
0
;
}
@Override
public
int
getInt
(
int
columnIndex
)
{
return
result
.
currentRow
()[
columnIndex
].
getInt
();
}
@Override
public
long
getLong
(
int
columnIndex
)
{
return
result
.
currentRow
()[
columnIndex
].
getLong
();
}
@Override
public
int
getPosition
()
{
// TODO
return
0
;
}
@Override
public
short
getShort
(
int
columnIndex
)
{
// TODO
return
0
;
}
@Override
public
String
getString
(
int
columnIndex
)
{
return
result
.
currentRow
()[
columnIndex
].
getString
();
}
@Override
public
boolean
getWantsAllOnMoveCalls
()
{
// TODO
return
false
;
}
@Override
public
boolean
isAfterLast
()
{
// TODO
return
false
;
}
@Override
public
boolean
isBeforeFirst
()
{
// TODO
return
false
;
}
@Override
public
boolean
isClosed
()
{
// TODO
return
false
;
}
@Override
public
boolean
isFirst
()
{
// TODO
return
false
;
}
@Override
public
boolean
isLast
()
{
// TODO
return
false
;
}
@Override
public
boolean
isNull
(
int
columnIndex
)
{
// TODO
return
false
;
}
@Override
public
boolean
moveToFirst
()
{
// TODO
return
false
;
}
@Override
public
boolean
moveToLast
()
{
// TODO
return
false
;
}
@Override
public
boolean
moveToNext
()
{
// TODO
return
false
;
}
@Override
public
boolean
moveToPosition
(
int
position
)
{
// TODO
return
false
;
}
@Override
public
boolean
moveToPrevious
()
{
// TODO
return
false
;
}
@Override
public
void
registerContentObserver
(
ContentObserver
observer
)
{
// TODO
}
@Override
public
Bundle
respond
(
Bundle
extras
)
{
// TODO
return
null
;
}
@Override
public
void
setNotificationUri
(
ContentResolver
cr
,
Uri
uri
)
{
// TODO
}
@Override
public
void
unregisterContentObserver
(
ContentObserver
observer
)
{
// TODO
}
@Override
public
void
unregisterDataSetObserver
(
DataSetObserver
observer
)
{
// TODO
...
...
h2/src/tools/org/h2/android/H2Database.java
浏览文件 @
be0f8ddc
...
...
@@ -26,6 +26,7 @@ import android.database.Cursor;
/**
* This class represents a database connection.
*/
@SuppressWarnings
(
"unused"
)
public
class
H2Database
{
/**
...
...
@@ -680,7 +681,7 @@ public class H2Database {
return
prep
;
}
private
Value
getValue
(
Object
o
)
{
private
static
Value
getValue
(
Object
o
)
{
if
(
o
==
null
)
{
return
ValueNull
.
INSTANCE
;
}
else
if
(
o
instanceof
String
)
{
...
...
h2/src/tools/org/h2/android/H2OpenHelper.java
浏览文件 @
be0f8ddc
...
...
@@ -11,6 +11,7 @@ import android.content.Context;
* This helper class helps creating and managing databases. A subclass typically
* implements the "on" methods.
*/
@SuppressWarnings
(
"unused"
)
public
abstract
class
H2OpenHelper
{
/**
...
...
h2/src/tools/org/h2/android/H2Program.java
浏览文件 @
be0f8ddc
...
...
@@ -12,6 +12,7 @@ import org.h2.value.ValueBytes;
/**
* This class represents a prepared statement.
*/
@SuppressWarnings
(
"unused"
)
public
class
H2Program
extends
H2Closable
{
/**
...
...
@@ -99,6 +100,7 @@ public class H2Program extends H2Closable {
/**
* TODO
*/
@Override
protected
void
onAllReferencesReleased
()
{
// TODO
}
...
...
@@ -106,6 +108,7 @@ public class H2Program extends H2Closable {
/**
* TODO
*/
@Override
protected
void
onAllReferencesReleasedFromContainer
()
{
// TODO
}
...
...
h2/src/tools/org/h2/android/H2Query.java
浏览文件 @
be0f8ddc
...
...
@@ -22,6 +22,7 @@ public class H2Query extends H2Program {
* @param index the parameter index (0, 1,...)
* @param value the new value
*/
@Override
public
void
bindDouble
(
int
index
,
double
value
)
{
// TODO
}
...
...
@@ -32,6 +33,7 @@ public class H2Query extends H2Program {
* @param index the parameter index (0, 1,...)
* @param value the new value
*/
@Override
public
void
bindLong
(
int
index
,
long
value
)
{
// TODO
}
...
...
@@ -41,6 +43,7 @@ public class H2Query extends H2Program {
*
* @param index the parameter index (0, 1,...)
*/
@Override
public
void
bindNull
(
int
index
)
{
// TODO
}
...
...
@@ -51,6 +54,7 @@ public class H2Query extends H2Program {
* @param index the parameter index (0, 1,...)
* @param value the new value
*/
@Override
public
void
bindString
(
int
index
,
String
value
)
{
// TODO
}
...
...
@@ -58,6 +62,7 @@ public class H2Query extends H2Program {
/**
* Close the statement.
*/
@Override
public
void
close
()
{
// TODO
}
...
...
h2/src/tools/org/h2/android/H2QueryBuilder.java
浏览文件 @
be0f8ddc
...
...
@@ -13,6 +13,7 @@ import android.database.Cursor;
/**
* This helper class is used to build SQL statements.
*/
@SuppressWarnings
(
"unused"
)
public
class
H2QueryBuilder
{
private
H2Database
.
CursorFactory
factory
;
...
...
h2/src/tools/org/h2/build/BuildBase.java
浏览文件 @
be0f8ddc
...
...
@@ -474,7 +474,7 @@ public class BuildBase {
}
}
private
PrintStream
filter
(
PrintStream
out
,
final
String
[]
exclude
)
{
private
static
PrintStream
filter
(
PrintStream
out
,
final
String
[]
exclude
)
{
return
new
PrintStream
(
new
FilterOutputStream
(
out
)
{
private
ByteArrayOutputStream
buff
=
new
ByteArrayOutputStream
();
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论