Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
f647f3ed
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
f647f3ed
编写于
4月 12, 2011
作者:
L
lancea
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
7035615: Address lint warnings for javax.sql.rowset & com.sun.rowset
Reviewed-by: alanb, darcy
上级
9e158684
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
81 addition
and
89 deletion
+81
-89
src/share/classes/com/sun/rowset/CachedRowSetImpl.java
src/share/classes/com/sun/rowset/CachedRowSetImpl.java
+18
-32
src/share/classes/com/sun/rowset/JdbcRowSetImpl.java
src/share/classes/com/sun/rowset/JdbcRowSetImpl.java
+12
-12
src/share/classes/com/sun/rowset/JoinRowSetImpl.java
src/share/classes/com/sun/rowset/JoinRowSetImpl.java
+9
-9
src/share/classes/javax/sql/rowset/BaseRowSet.java
src/share/classes/javax/sql/rowset/BaseRowSet.java
+29
-29
src/share/classes/javax/sql/rowset/RowSetMetaDataImpl.java
src/share/classes/javax/sql/rowset/RowSetMetaDataImpl.java
+9
-3
src/share/classes/javax/sql/rowset/RowSetProvider.java
src/share/classes/javax/sql/rowset/RowSetProvider.java
+4
-4
未找到文件。
src/share/classes/com/sun/rowset/CachedRowSetImpl.java
浏览文件 @
f647f3ed
/*
* Copyright (c) 2003, 201
0
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 201
1
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -111,13 +111,13 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern
*/
private
String
tableName
;
/**
* A <code>Vector</code> object containing the <code>Row</code>
* objects that comprise this <code>CachedRowSetImpl</code> object.
* @serial
*/
private
Vector
rvh
;
private
Vector
<
Object
>
rvh
;
/**
* The current postion of the cursor in this <code>CachedRowSetImpl</code>
* object.
...
...
@@ -293,12 +293,12 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern
/**
* The Vector holding the Match Columns
*/
private
Vector
iMatchColumns
;
private
Vector
<
Integer
>
iMatchColumns
;
/**
* The Vector that will hold the Match Column names.
*/
private
Vector
strMatchColumns
;
private
Vector
<
String
>
strMatchColumns
;
/**
* Trigger that indicates whether the active SyncProvider is exposes the
...
...
@@ -484,7 +484,7 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern
*/
private
void
initContainer
()
{
rvh
=
new
Vector
(
100
);
rvh
=
new
Vector
<
Object
>
(
100
);
cursorPos
=
0
;
absolutePos
=
0
;
numRows
=
0
;
...
...
@@ -523,12 +523,12 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern
//Instantiating the vector for MatchColumns
iMatchColumns
=
new
Vector
(
10
);
iMatchColumns
=
new
Vector
<
Integer
>
(
10
);
for
(
int
i
=
0
;
i
<
10
;
i
++)
{
iMatchColumns
.
add
(
i
,
Integer
.
valueOf
(-
1
));
}
strMatchColumns
=
new
Vector
(
10
);
strMatchColumns
=
new
Vector
<
String
>
(
10
);
for
(
int
j
=
0
;
j
<
10
;
j
++)
{
strMatchColumns
.
add
(
j
,
null
);
}
...
...
@@ -622,7 +622,7 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern
Row
currentRow
;
int
numCols
;
int
i
;
Map
map
=
getTypeMap
();
Map
<
String
,
Class
<?>>
map
=
getTypeMap
();
Object
obj
;
int
mRows
;
...
...
@@ -939,14 +939,9 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern
*/
public
void
acceptChanges
(
Connection
con
)
throws
SyncProviderException
{
try
{
setConnection
(
con
);
acceptChanges
();
}
catch
(
SyncProviderException
spe
)
{
throw
spe
;
}
catch
(
SQLException
sqle
){
throw
new
SyncProviderException
(
sqle
.
getMessage
());
}
setConnection
(
con
);
acceptChanges
();
}
/**
...
...
@@ -1289,14 +1284,7 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern
*/
public
Collection
<?>
toCollection
()
throws
SQLException
{
TreeMap
tMap
;
int
count
=
0
;
Row
origRow
;
Vector
newRow
;
int
colCount
=
((
RowSetMetaDataImpl
)
this
.
getMetaData
()).
getColumnCount
();
tMap
=
new
TreeMap
();
TreeMap
<
Integer
,
Object
>
tMap
=
new
TreeMap
<>();
for
(
int
i
=
0
;
i
<
numRows
;
i
++)
{
tMap
.
put
(
Integer
.
valueOf
(
i
),
rvh
.
get
(
i
));
...
...
@@ -1325,10 +1313,8 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern
*/
public
Collection
<?>
toCollection
(
int
column
)
throws
SQLException
{
Vector
vec
;
Row
origRow
;
int
nRows
=
numRows
;
vec
=
new
Vector
(
nRows
);
Vector
<
Object
>
vec
=
new
Vector
<>
(
nRows
);
// create a copy
CachedRowSetImpl
crsTemp
;
...
...
@@ -2953,7 +2939,7 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern
*/
public
Object
getObject
(
int
columnIndex
)
throws
SQLException
{
Object
value
;
java
.
util
.
Map
map
;
Map
<
String
,
Class
<?>>
map
;
// sanity check.
checkIndex
(
columnIndex
);
...
...
@@ -7257,7 +7243,7 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern
Row
currentRow
;
int
numCols
;
int
i
;
Map
map
=
getTypeMap
();
Map
<
String
,
Class
<?>>
map
=
getTypeMap
();
Object
obj
;
int
mRows
;
...
...
@@ -7304,11 +7290,11 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern
resultSet
.
absolute
(
start
-
1
);
}
if
(
pageSize
==
0
)
{
rvh
=
new
Vector
(
getMaxRows
());
rvh
=
new
Vector
<
Object
>
(
getMaxRows
());
}
else
{
rvh
=
new
Vector
(
getPageSize
());
rvh
=
new
Vector
<
Object
>
(
getPageSize
());
}
if
(
data
==
null
)
{
...
...
src/share/classes/com/sun/rowset/JdbcRowSetImpl.java
浏览文件 @
f647f3ed
/*
* Copyright (c) 2003, 201
0
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 201
1
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -93,12 +93,12 @@ public class JdbcRowSetImpl extends BaseRowSet implements JdbcRowSet, Joinable {
/**
* The Vector holding the Match Columns
*/
private
Vector
iMatchColumns
;
private
Vector
<
Integer
>
iMatchColumns
;
/**
* The Vector that will hold the Match Column names.
*/
private
Vector
strMatchColumns
;
private
Vector
<
String
>
strMatchColumns
;
protected
transient
JdbcRowSetResourceBundle
resBundle
;
...
...
@@ -213,12 +213,12 @@ public class JdbcRowSetImpl extends BaseRowSet implements JdbcRowSet, Joinable {
//Instantiating the vector for MatchColumns
iMatchColumns
=
new
Vector
(
10
);
iMatchColumns
=
new
Vector
<
Integer
>
(
10
);
for
(
int
i
=
0
;
i
<
10
;
i
++)
{
iMatchColumns
.
add
(
i
,
Integer
.
valueOf
(-
1
));
}
strMatchColumns
=
new
Vector
(
10
);
strMatchColumns
=
new
Vector
<
String
>
(
10
);
for
(
int
j
=
0
;
j
<
10
;
j
++)
{
strMatchColumns
.
add
(
j
,
null
);
}
...
...
@@ -286,12 +286,12 @@ public class JdbcRowSetImpl extends BaseRowSet implements JdbcRowSet, Joinable {
//Instantiating the vector for MatchColumns
iMatchColumns
=
new
Vector
(
10
);
iMatchColumns
=
new
Vector
<
Integer
>
(
10
);
for
(
int
i
=
0
;
i
<
10
;
i
++)
{
iMatchColumns
.
add
(
i
,
Integer
.
valueOf
(-
1
));
}
strMatchColumns
=
new
Vector
(
10
);
strMatchColumns
=
new
Vector
<
String
>
(
10
);
for
(
int
j
=
0
;
j
<
10
;
j
++)
{
strMatchColumns
.
add
(
j
,
null
);
}
...
...
@@ -373,12 +373,12 @@ public class JdbcRowSetImpl extends BaseRowSet implements JdbcRowSet, Joinable {
//Instantiating the vector for MatchColumns
iMatchColumns
=
new
Vector
(
10
);
iMatchColumns
=
new
Vector
<
Integer
>
(
10
);
for
(
int
i
=
0
;
i
<
10
;
i
++)
{
iMatchColumns
.
add
(
i
,
Integer
.
valueOf
(-
1
));
}
strMatchColumns
=
new
Vector
(
10
);
strMatchColumns
=
new
Vector
<
String
>
(
10
);
for
(
int
j
=
0
;
j
<
10
;
j
++)
{
strMatchColumns
.
add
(
j
,
null
);
}
...
...
@@ -463,12 +463,12 @@ public class JdbcRowSetImpl extends BaseRowSet implements JdbcRowSet, Joinable {
//Instantiating the vector for MatchColumns
iMatchColumns
=
new
Vector
(
10
);
iMatchColumns
=
new
Vector
<
Integer
>
(
10
);
for
(
int
i
=
0
;
i
<
10
;
i
++)
{
iMatchColumns
.
add
(
i
,
Integer
.
valueOf
(-
1
));
}
strMatchColumns
=
new
Vector
(
10
);
strMatchColumns
=
new
Vector
<
String
>
(
10
);
for
(
int
j
=
0
;
j
<
10
;
j
++)
{
strMatchColumns
.
add
(
j
,
null
);
}
...
...
@@ -675,7 +675,7 @@ public class JdbcRowSetImpl extends BaseRowSet implements JdbcRowSet, Joinable {
try
{
Map
aMap
=
getTypeMap
();
Map
<
String
,
Class
<?>>
aMap
=
getTypeMap
();
if
(
aMap
!=
null
)
{
conn
.
setTypeMap
(
aMap
);
}
...
...
src/share/classes/com/sun/rowset/JoinRowSetImpl.java
浏览文件 @
f647f3ed
/*
* Copyright (c) 2003, 201
0
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 201
1
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -59,8 +59,8 @@ public class JoinRowSetImpl extends WebRowSetImpl implements JoinRowSet {
/**
* A <code>Vector</code> object that contains the <code>RowSet</code> objects
* that have been added to this <code>JoinRowSet</code> object.
*/
private
Vector
vecRowSetsInJOIN
;
*/
private
Vector
<
CachedRowSetImpl
>
vecRowSetsInJOIN
;
/**
* The <code>CachedRowSet</code> object that encapsulates this
...
...
@@ -78,13 +78,13 @@ public class JoinRowSetImpl extends WebRowSetImpl implements JoinRowSet {
* for this <code>JoinRowSet</code> object.
* The last join type set forms the basis of succeeding joins.
*/
private
Vector
vecJoinType
;
private
Vector
<
Integer
>
vecJoinType
;
/**
* A <code>Vector</code> object containing the names of all the tables entering
* the join.
*/
private
Vector
vecTableNames
;
private
Vector
<
String
>
vecTableNames
;
/**
* An <code>int</code> that indicates the column index of the match column.
...
...
@@ -121,10 +121,10 @@ public class JoinRowSetImpl extends WebRowSetImpl implements JoinRowSet {
*/
public
JoinRowSetImpl
()
throws
SQLException
{
vecRowSetsInJOIN
=
new
Vector
();
vecRowSetsInJOIN
=
new
Vector
<
CachedRowSetImpl
>
();
crsInternal
=
new
CachedRowSetImpl
();
vecJoinType
=
new
Vector
();
vecTableNames
=
new
Vector
();
vecJoinType
=
new
Vector
<
Integer
>
();
vecTableNames
=
new
Vector
<
String
>
();
iMatchKey
=
-
1
;
strMatchKey
=
null
;
supportedJOINs
=
...
...
@@ -222,7 +222,7 @@ public class JoinRowSetImpl extends WebRowSetImpl implements JoinRowSet {
// either of the setter methods have been set.
if
(
boolColId
){
//
ArrayList
indices
=
new
ArrayList
();
ArrayList
<
Integer
>
indices
=
new
ArrayList
<>
();
for
(
int
i
=
0
;
i
<
cRowset
.
getMatchColumnNames
().
length
;
i
++)
{
if
(
(
strMatchKey
=
(
cRowset
.
getMatchColumnNames
())[
i
])
!=
null
)
{
iMatchKey
=
cRowset
.
findColumn
(
strMatchKey
);
...
...
src/share/classes/javax/sql/rowset/BaseRowSet.java
浏览文件 @
f647f3ed
...
...
@@ -296,32 +296,32 @@ import javax.sql.rowset.serial.*;
public
abstract
class
BaseRowSet
implements
Serializable
,
Cloneable
{
/**
* A constant indicating to a <code>RowSetReaderImpl</code> object
* that a given parameter is a Unicode stream. This
* <code>RowSetReaderImpl</code> object is provided as an extension of the
* <code>SyncProvider</code> abstract class defined in the
* <code>SyncFactory</code> static factory SPI mechanism.
*/
public
static
final
int
UNICODE_STREAM_PARAM
=
0
;
/**
* A constant indicating to a <code>RowSetReaderImpl</code> object
* that a given parameter is a Unicode stream. This
* <code>RowSetReaderImpl</code> object is provided as an extension of the
* <code>SyncProvider</code> abstract class defined in the
* <code>SyncFactory</code> static factory SPI mechanism.
*/
public
static
final
int
UNICODE_STREAM_PARAM
=
0
;
/**
* A constant indicating to a <code>RowSetReaderImpl</code> object
* that a given parameter is a binary stream. A
* <code>RowSetReaderImpl</code> object is provided as an extension of the
* <code>SyncProvider</code> abstract class defined in the
* <code>SyncFactory</code> static factory SPI mechanism.
*/
public
static
final
int
BINARY_STREAM_PARAM
=
1
;
/**
* A constant indicating to a <code>RowSetReaderImpl</code> object
* that a given parameter is a binary stream. A
* <code>RowSetReaderImpl</code> object is provided as an extension of the
* <code>SyncProvider</code> abstract class defined in the
* <code>SyncFactory</code> static factory SPI mechanism.
*/
public
static
final
int
BINARY_STREAM_PARAM
=
1
;
/**
* A constant indicating to a <code>RowSetReaderImpl</code> object
* that a given parameter is an ASCII stream. A
* <code>RowSetReaderImpl</code> object is provided as an extension of the
* <code>SyncProvider</code> abstract class defined in the
* <code>SyncFactory</code> static factory SPI mechanism.
*/
public
static
final
int
ASCII_STREAM_PARAM
=
2
;
/**
* A constant indicating to a <code>RowSetReaderImpl</code> object
* that a given parameter is an ASCII stream. A
* <code>RowSetReaderImpl</code> object is provided as an extension of the
* <code>SyncProvider</code> abstract class defined in the
* <code>SyncFactory</code> static factory SPI mechanism.
*/
public
static
final
int
ASCII_STREAM_PARAM
=
2
;
/**
* The <code>InputStream</code> object that will be
...
...
@@ -505,21 +505,21 @@ public static final int ASCII_STREAM_PARAM = 2;
* custom mapping of user-defined types.
* @serial
*/
private
Map
map
;
private
Map
<
String
,
Class
<?>>
map
;
/**
* A <code>Vector</code> object that holds the list of listeners
* that have registered with this <code>RowSet</code> object.
* @serial
*/
private
Vector
listeners
;
private
Vector
<
RowSetListener
>
listeners
;
/**
* A <code>Vector</code> object that holds the parameters set
* for this <code>RowSet</code> object's current command.
* @serial
*/
private
Hashtable
params
;
// could be transient?
private
Hashtable
<
Integer
,
Object
>
params
;
// could be transient?
/**
* Constructs a new <code>BaseRowSet</code> object initialized with
...
...
@@ -529,7 +529,7 @@ public static final int ASCII_STREAM_PARAM = 2;
*/
public
BaseRowSet
()
{
// allocate the listeners collection
listeners
=
new
Vector
();
listeners
=
new
Vector
<
RowSetListener
>
();
}
/**
...
...
@@ -542,7 +542,7 @@ public static final int ASCII_STREAM_PARAM = 2;
* a <code>RowSet</code> implementation extending this class.
*/
protected
void
initParams
()
{
params
=
new
Hashtable
();
params
=
new
Hashtable
<
Integer
,
Object
>
();
}
//--------------------------------------------------------------------
...
...
src/share/classes/javax/sql/rowset/RowSetMetaDataImpl.java
浏览文件 @
f647f3ed
...
...
@@ -912,7 +912,12 @@ public class RowSetMetaDataImpl implements RowSetMetaData, Serializable {
* @since 1.6
*/
public
<
T
>
T
unwrap
(
java
.
lang
.
Class
<
T
>
iface
)
throws
java
.
sql
.
SQLException
{
return
(
T
)
this
;
if
(
isWrapperFor
(
iface
))
{
return
iface
.
cast
(
this
);
}
else
{
throw
new
SQLException
(
"unwrap failed for:"
+
iface
);
}
}
/**
...
...
@@ -929,8 +934,9 @@ public class RowSetMetaDataImpl implements RowSetMetaData, Serializable {
* @throws java.sql.SQLException if an error occurs while determining whether this is a wrapper
* for an object with the given interface.
* @since 1.6
*/
public
boolean
isWrapperFor
(
Class
<?>
interfaces
)
throws
SQLException
{
return
false
;
*/
public
boolean
isWrapperFor
(
Class
<?>
interfaces
)
throws
SQLException
{
return
interfaces
.
isInstance
(
this
);
}
static
final
long
serialVersionUID
=
6893806403181801867L
;
...
...
src/share/classes/javax/sql/rowset/RowSetProvider.java
浏览文件 @
f647f3ed
...
...
@@ -204,9 +204,9 @@ public class RowSetProvider {
*
*/
static
private
ClassLoader
getContextClassLoader
()
throws
SecurityException
{
return
(
ClassLoader
)
AccessController
.
doPrivileged
(
new
PrivilegedAction
()
{
return
AccessController
.
doPrivileged
(
new
PrivilegedAction
<
ClassLoader
>
()
{
public
Object
run
()
{
public
ClassLoader
run
()
{
ClassLoader
cl
=
null
;
cl
=
Thread
.
currentThread
().
getContextClassLoader
();
...
...
@@ -284,9 +284,9 @@ public class RowSetProvider {
static
private
String
getSystemProperty
(
final
String
propName
)
{
String
property
=
null
;
try
{
property
=
(
String
)
AccessController
.
doPrivileged
(
new
PrivilegedAction
()
{
property
=
AccessController
.
doPrivileged
(
new
PrivilegedAction
<
String
>
()
{
public
Object
run
()
{
public
String
run
()
{
return
System
.
getProperty
(
propName
);
}
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录