Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
2a081d0d
提交
2a081d0d
authored
12月 11, 2017
作者:
Noel Grandin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
make some fields final
found by UCDetector
上级
3d763b4a
显示空白字符变更
内嵌
并排
正在显示
28 个修改的文件
包含
40 行增加
和
41 行删除
+40
-41
DbColumn.java
h2/src/main/org/h2/bnf/context/DbColumn.java
+1
-1
DbProcedure.java
h2/src/main/org/h2/bnf/context/DbProcedure.java
+2
-3
AlterTableAddConstraint.java
h2/src/main/org/h2/command/ddl/AlterTableAddConstraint.java
+1
-1
MergeUsing.java
h2/src/main/org/h2/command/dml/MergeUsing.java
+1
-1
DbSettings.java
h2/src/main/org/h2/engine/DbSettings.java
+2
-2
SessionRemote.java
h2/src/main/org/h2/engine/SessionRemote.java
+1
-1
FunctionCursor.java
h2/src/main/org/h2/index/FunctionCursor.java
+1
-1
RangeCursor.java
h2/src/main/org/h2/index/RangeCursor.java
+1
-1
MVMap.java
h2/src/main/org/h2/mvstore/MVMap.java
+1
-1
MVStore.java
h2/src/main/org/h2/mvstore/MVStore.java
+1
-1
CacheLongKeyLIRS.java
h2/src/main/org/h2/mvstore/cache/CacheLongKeyLIRS.java
+1
-1
MVPrimaryIndex.java
h2/src/main/org/h2/mvstore/db/MVPrimaryIndex.java
+1
-1
MVSpatialIndex.java
h2/src/main/org/h2/mvstore/db/MVSpatialIndex.java
+2
-2
TransactionStore.java
h2/src/main/org/h2/mvstore/db/TransactionStore.java
+2
-2
LazyResult.java
h2/src/main/org/h2/result/LazyResult.java
+1
-1
PgServerThread.java
h2/src/main/org/h2/server/pg/PgServerThread.java
+1
-1
LobStorageMap.java
h2/src/main/org/h2/store/LobStorageMap.java
+1
-1
JoinBatch.java
h2/src/main/org/h2/table/JoinBatch.java
+1
-1
SubQueryInfo.java
h2/src/main/org/h2/table/SubQueryInfo.java
+5
-5
ConvertTraceFile.java
h2/src/main/org/h2/tools/ConvertTraceFile.java
+0
-1
AbbaLockingDetector.java
h2/src/main/org/h2/util/AbbaLockingDetector.java
+1
-1
ColumnNamer.java
h2/src/main/org/h2/util/ColumnNamer.java
+2
-2
OsgiDataSourceFactory.java
h2/src/main/org/h2/util/OsgiDataSourceFactory.java
+1
-3
Task.java
h2/src/main/org/h2/util/Task.java
+1
-1
ValueLobDb.java
h2/src/main/org/h2/value/ValueLobDb.java
+4
-1
BuildBase.java
h2/src/tools/org/h2/build/BuildBase.java
+2
-2
ArchiveTool.java
h2/src/tools/org/h2/dev/fs/ArchiveTool.java
+1
-1
ThreadDumpCleaner.java
h2/src/tools/org/h2/dev/util/ThreadDumpCleaner.java
+1
-1
没有找到文件。
h2/src/main/org/h2/bnf/context/DbColumn.java
浏览文件 @
2a081d0d
...
...
@@ -21,7 +21,7 @@ public class DbColumn {
private
final
String
dataType
;
private
int
position
;
private
final
int
position
;
private
DbColumn
(
DbContents
contents
,
ResultSet
rs
,
boolean
procedureColumn
)
throws
SQLException
{
...
...
h2/src/main/org/h2/bnf/context/DbProcedure.java
浏览文件 @
2a081d0d
...
...
@@ -5,12 +5,11 @@
*/
package
org
.
h2
.
bnf
.
context
;
import
org.h2.util.New
;
import
java.sql.DatabaseMetaData
;
import
java.sql.ResultSet
;
import
java.sql.SQLException
;
import
java.util.ArrayList
;
import
org.h2.util.New
;
/**
* Contains meta data information about a procedure.
...
...
@@ -21,7 +20,7 @@ public class DbProcedure {
private
final
DbSchema
schema
;
private
final
String
name
;
private
final
String
quotedName
;
private
boolean
returnsResult
;
private
final
boolean
returnsResult
;
private
DbColumn
[]
parameters
;
public
DbProcedure
(
DbSchema
schema
,
ResultSet
rs
)
throws
SQLException
{
...
...
h2/src/main/org/h2/command/ddl/AlterTableAddConstraint.java
浏览文件 @
2a081d0d
...
...
@@ -50,7 +50,7 @@ public class AlterTableAddConstraint extends SchemaCommand {
private
boolean
primaryKeyHash
;
private
boolean
ifTableExists
;
private
final
boolean
ifNotExists
;
private
ArrayList
<
Index
>
createdIndexes
=
New
.
arrayList
();
private
final
ArrayList
<
Index
>
createdIndexes
=
New
.
arrayList
();
public
AlterTableAddConstraint
(
Session
session
,
Schema
schema
,
boolean
ifNotExists
)
{
...
...
h2/src/main/org/h2/command/dml/MergeUsing.java
浏览文件 @
2a081d0d
...
...
@@ -114,7 +114,7 @@ public class MergeUsing extends Prepared {
private
int
countUpdatedRows
=
0
;
private
Column
[]
sourceKeys
;
private
Select
targetMatchQuery
;
private
HashMap
<
Value
,
Integer
>
targetRowidsRemembered
=
new
HashMap
<>();
private
final
HashMap
<
Value
,
Integer
>
targetRowidsRemembered
=
new
HashMap
<>();
private
int
sourceQueryRowNumber
=
0
;
public
MergeUsing
(
Merge
merge
)
{
...
...
h2/src/main/org/h2/engine/DbSettings.java
浏览文件 @
2a081d0d
...
...
@@ -78,7 +78,7 @@ public class DbSettings extends SettingsBase {
* performance reasons. Please note the Oracle JDBC driver will try to
* resolve this database URL if it is loaded before the H2 driver.
*/
public
boolean
defaultConnection
=
get
(
"DEFAULT_CONNECTION"
,
false
);
public
final
boolean
defaultConnection
=
get
(
"DEFAULT_CONNECTION"
,
false
);
/**
* Database setting <code>DEFAULT_ESCAPE</code> (default: \).<br />
...
...
@@ -162,7 +162,7 @@ public class DbSettings extends SettingsBase {
* no limit. Please note the actual query timeout may be set to a lower
* value.
*/
public
int
maxQueryTimeout
=
get
(
"MAX_QUERY_TIMEOUT"
,
0
);
public
final
int
maxQueryTimeout
=
get
(
"MAX_QUERY_TIMEOUT"
,
0
);
/**
* Database setting <code>NESTED_JOINS</code> (default: true).<br />
...
...
h2/src/main/org/h2/engine/SessionRemote.java
浏览文件 @
2a081d0d
...
...
@@ -92,7 +92,7 @@ public class SessionRemote extends SessionWithState implements DataHandler {
private
JavaObjectSerializer
javaObjectSerializer
;
private
volatile
boolean
javaObjectSerializerInitialized
;
private
CompareMode
compareMode
=
CompareMode
.
getInstance
(
null
,
0
);
private
final
CompareMode
compareMode
=
CompareMode
.
getInstance
(
null
,
0
);
public
SessionRemote
(
ConnectionInfo
ci
)
{
this
.
connectionInfo
=
ci
;
...
...
h2/src/main/org/h2/index/FunctionCursor.java
浏览文件 @
2a081d0d
...
...
@@ -17,7 +17,7 @@ import org.h2.value.Value;
*/
public
class
FunctionCursor
implements
Cursor
{
private
Session
session
;
private
final
Session
session
;
private
final
ResultInterface
result
;
private
Value
[]
values
;
private
Row
row
;
...
...
h2/src/main/org/h2/index/RangeCursor.java
浏览文件 @
2a081d0d
...
...
@@ -17,7 +17,7 @@ import org.h2.value.ValueLong;
*/
class
RangeCursor
implements
Cursor
{
private
Session
session
;
private
final
Session
session
;
private
boolean
beforeFirst
;
private
long
current
;
private
Row
currentRow
;
...
...
h2/src/main/org/h2/mvstore/MVMap.java
浏览文件 @
2a081d0d
...
...
@@ -56,7 +56,7 @@ public class MVMap<K, V> extends AbstractMap<K, V>
private
final
DataType
keyType
;
private
final
DataType
valueType
;
private
ConcurrentArrayList
<
Page
>
oldRoots
=
private
final
ConcurrentArrayList
<
Page
>
oldRoots
=
new
ConcurrentArrayList
<>();
...
...
h2/src/main/org/h2/mvstore/MVStore.java
浏览文件 @
2a081d0d
...
...
@@ -277,7 +277,7 @@ public final class MVStore {
private
int
autoCompactFillRate
;
private
long
autoCompactLastFileOpCount
;
private
Object
compactSync
=
new
Object
();
private
final
Object
compactSync
=
new
Object
();
private
IllegalStateException
panicException
;
...
...
h2/src/main/org/h2/mvstore/cache/CacheLongKeyLIRS.java
浏览文件 @
2a081d0d
...
...
@@ -1192,7 +1192,7 @@ public class CacheLongKeyLIRS<V> {
* The number of entries in the non-resident queue, as a factor of the
* number of all other entries in the map.
*/
public
int
nonResidentQueueSize
=
3
;
public
final
int
nonResidentQueueSize
=
3
;
}
...
...
h2/src/main/org/h2/mvstore/db/MVPrimaryIndex.java
浏览文件 @
2a081d0d
...
...
@@ -49,7 +49,7 @@ public class MVPrimaryIndex extends BaseIndex {
private
final
MVTable
mvTable
;
private
final
String
mapName
;
private
TransactionMap
<
Value
,
Value
>
dataMap
;
private
final
TransactionMap
<
Value
,
Value
>
dataMap
;
private
final
AtomicLong
lastKey
=
new
AtomicLong
(
0
);
private
int
mainIndexColumn
=
-
1
;
...
...
h2/src/main/org/h2/mvstore/db/MVSpatialIndex.java
浏览文件 @
2a081d0d
...
...
@@ -52,8 +52,8 @@ public class MVSpatialIndex extends BaseIndex implements SpatialIndex, MVIndex {
final
MVTable
mvTable
;
private
final
String
mapName
;
private
TransactionMap
<
SpatialKey
,
Value
>
dataMap
;
private
MVRTreeMap
<
VersionedValue
>
spatialMap
;
private
final
TransactionMap
<
SpatialKey
,
Value
>
dataMap
;
private
final
MVRTreeMap
<
VersionedValue
>
spatialMap
;
/**
* Constructor.
...
...
h2/src/main/org/h2/mvstore/db/TransactionStore.java
浏览文件 @
2a081d0d
...
...
@@ -59,7 +59,7 @@ public class TransactionStore {
/**
* The map of maps.
*/
private
HashMap
<
Integer
,
MVMap
<
Object
,
VersionedValue
>>
maps
=
private
final
HashMap
<
Integer
,
MVMap
<
Object
,
VersionedValue
>>
maps
=
New
.
hashMap
();
private
final
DataType
dataType
;
...
...
@@ -896,7 +896,7 @@ public class TransactionStore {
*/
final
MVMap
<
K
,
VersionedValue
>
map
;
private
Transaction
transaction
;
private
final
Transaction
transaction
;
TransactionMap
(
Transaction
transaction
,
MVMap
<
K
,
VersionedValue
>
map
,
int
mapId
)
{
...
...
h2/src/main/org/h2/result/LazyResult.java
浏览文件 @
2a081d0d
...
...
@@ -17,7 +17,7 @@ import org.h2.value.Value;
*/
public
abstract
class
LazyResult
implements
ResultInterface
{
private
Expression
[]
expressions
;
private
final
Expression
[]
expressions
;
private
int
rowId
=
-
1
;
private
Value
[]
currentRow
;
private
Value
[]
nextRow
;
...
...
h2/src/main/org/h2/server/pg/PgServerThread.java
浏览文件 @
2a081d0d
...
...
@@ -62,7 +62,7 @@ public class PgServerThread implements Runnable {
private
String
userName
;
private
String
databaseName
;
private
int
processId
;
private
int
secret
;
private
final
int
secret
;
private
JdbcStatement
activeRequest
;
private
String
clientEncoding
=
SysProperties
.
PG_DEFAULT_CLIENT_ENCODING
;
private
String
dateStyle
=
"ISO"
;
...
...
h2/src/main/org/h2/store/LobStorageMap.java
浏览文件 @
2a081d0d
...
...
@@ -37,7 +37,7 @@ public class LobStorageMap implements LobStorageInterface {
private
boolean
init
;
private
Object
nextLobIdSync
=
new
Object
();
private
final
Object
nextLobIdSync
=
new
Object
();
private
long
nextLobId
;
/**
...
...
h2/src/main/org/h2/table/JoinBatch.java
浏览文件 @
2a081d0d
...
...
@@ -87,7 +87,7 @@ public final class JoinBatch {
/**
* The filters.
*/
JoinFilter
[]
filters
;
final
JoinFilter
[]
filters
;
/**
* Whether this is a batched subquery.
...
...
h2/src/main/org/h2/table/SubQueryInfo.java
浏览文件 @
2a081d0d
...
...
@@ -15,11 +15,11 @@ import org.h2.result.SortOrder;
*/
public
class
SubQueryInfo
{
private
int
[]
masks
;
private
TableFilter
[]
filters
;
private
int
filter
;
private
SortOrder
sortOrder
;
private
SubQueryInfo
upper
;
private
final
int
[]
masks
;
private
final
TableFilter
[]
filters
;
private
final
int
filter
;
private
final
SortOrder
sortOrder
;
private
final
SubQueryInfo
upper
;
/**
* @param upper upper level sub-query if any
...
...
h2/src/main/org/h2/tools/ConvertTraceFile.java
浏览文件 @
2a081d0d
...
...
@@ -12,7 +12,6 @@ import java.util.ArrayList;
import
java.util.Collections
;
import
java.util.HashMap
;
import
java.util.StringTokenizer
;
import
org.h2.message.DbException
;
import
org.h2.store.fs.FileUtils
;
import
org.h2.util.IOUtils
;
...
...
h2/src/main/org/h2/util/AbbaLockingDetector.java
浏览文件 @
2a081d0d
...
...
@@ -23,7 +23,7 @@ import java.util.WeakHashMap;
*/
public
class
AbbaLockingDetector
implements
Runnable
{
private
int
tickIntervalMs
=
2
;
private
final
int
tickIntervalMs
=
2
;
private
volatile
boolean
stop
;
private
final
ThreadMXBean
threadMXBean
=
...
...
h2/src/main/org/h2/util/ColumnNamer.java
浏览文件 @
2a081d0d
...
...
@@ -17,8 +17,8 @@ public class ColumnNamer {
private
static
final
String
DEFAULT_COLUMN_NAME
=
"DEFAULT"
;
private
ColumnNamerConfiguration
configuration
;
private
Session
session
;
private
final
ColumnNamerConfiguration
configuration
;
private
final
Session
session
;
private
final
Set
<
String
>
existingColumnNames
=
new
HashSet
<>();
public
ColumnNamer
(
Session
session
)
{
...
...
h2/src/main/org/h2/util/OsgiDataSourceFactory.java
浏览文件 @
2a081d0d
...
...
@@ -8,11 +8,9 @@ package org.h2.util;
import
java.sql.SQLException
;
import
java.sql.SQLFeatureNotSupportedException
;
import
java.util.Properties
;
import
javax.sql.ConnectionPoolDataSource
;
import
javax.sql.DataSource
;
import
javax.sql.XADataSource
;
import
org.h2.engine.Constants
;
import
org.h2.jdbcx.JdbcDataSource
;
import
org.osgi.framework.BundleContext
;
...
...
@@ -38,7 +36,7 @@ import org.osgi.service.jdbc.DataSourceFactory;
* @author Per Otterstrom
*/
public
class
OsgiDataSourceFactory
implements
DataSourceFactory
{
private
org
.
h2
.
Driver
driver
;
private
final
org
.
h2
.
Driver
driver
;
public
OsgiDataSourceFactory
(
org
.
h2
.
Driver
driver
)
{
this
.
driver
=
driver
;
...
...
h2/src/main/org/h2/util/Task.java
浏览文件 @
2a081d0d
...
...
@@ -13,7 +13,7 @@ import java.util.concurrent.atomic.AtomicInteger;
*/
public
abstract
class
Task
implements
Runnable
{
private
static
AtomicInteger
counter
=
new
AtomicInteger
();
private
final
static
AtomicInteger
counter
=
new
AtomicInteger
();
/**
* A flag indicating the get() method has been called.
...
...
h2/src/main/org/h2/value/ValueLobDb.java
浏览文件 @
2a081d0d
...
...
@@ -54,7 +54,7 @@ public class ValueLobDb extends Value implements Value.ValueClob,
private
final
String
fileName
;
private
final
FileStore
tempFile
;
private
int
tableId
;
private
final
int
tableId
;
private
int
hash
;
//Arbonaut: 13.07.2016
...
...
@@ -84,6 +84,7 @@ public class ValueLobDb extends Value implements Value.ValueClob,
this
.
handler
=
null
;
this
.
fileName
=
null
;
this
.
tempFile
=
null
;
this
.
tableId
=
0
;
}
/**
...
...
@@ -115,6 +116,7 @@ public class ValueLobDb extends Value implements Value.ValueClob,
}
}
this
.
precision
=
tmpPrecision
;
this
.
tableId
=
0
;
}
/**
...
...
@@ -151,6 +153,7 @@ public class ValueLobDb extends Value implements Value.ValueClob,
out
.
close
();
}
this
.
precision
=
tmpPrecision
;
this
.
tableId
=
0
;
}
private
static
String
createTempLobFileName
(
DataHandler
handler
)
...
...
h2/src/tools/org/h2/build/BuildBase.java
浏览文件 @
2a081d0d
...
...
@@ -178,13 +178,13 @@ public class BuildBase {
/**
* The full path to the executable of the current JRE.
*/
protected
String
javaExecutable
=
System
.
getProperty
(
"java.home"
)
+
protected
final
String
javaExecutable
=
System
.
getProperty
(
"java.home"
)
+
File
.
separator
+
"bin"
+
File
.
separator
+
"java"
;
/**
* The full path to the tools jar of the current JDK.
*/
protected
String
javaToolsJar
=
System
.
getProperty
(
"java.home"
)
+
File
.
separator
+
".."
+
protected
final
String
javaToolsJar
=
System
.
getProperty
(
"java.home"
)
+
File
.
separator
+
".."
+
File
.
separator
+
"lib"
+
File
.
separator
+
"tools.jar"
;
/**
...
...
h2/src/tools/org/h2/dev/fs/ArchiveTool.java
浏览文件 @
2a081d0d
...
...
@@ -933,7 +933,7 @@ public class ArchiveTool {
static
class
Chunk
implements
Comparable
<
Chunk
>
{
ArrayList
<
Long
>
idList
;
final
byte
[]
value
;
private
int
[]
sortKey
;
private
final
int
[]
sortKey
;
Chunk
(
ArrayList
<
Long
>
idList
,
int
[]
sortKey
,
byte
[]
value
)
{
this
.
idList
=
idList
;
...
...
h2/src/tools/org/h2/dev/util/ThreadDumpCleaner.java
浏览文件 @
2a081d0d
...
...
@@ -71,7 +71,7 @@ public class ThreadDumpCleaner {
};
private
ArrayList
<
Pattern
>
patterns
=
new
ArrayList
<>();
private
final
ArrayList
<
Pattern
>
patterns
=
new
ArrayList
<>();
{
for
(
String
s
:
PATTERN
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论