Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
dk131072
spring-framework
提交
4c7cafbd
S
spring-framework
项目概览
dk131072
/
spring-framework
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
spring-framework
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
4c7cafbd
编写于
12月 28, 2012
作者:
C
Chris Beams
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix "unnecessary @SuppressWarnings" warnings
上级
8d2e125e
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
8 addition
and
22 deletion
+8
-22
spring-aop/src/main/java/org/springframework/aop/support/DefaultIntroductionAdvisor.java
...ringframework/aop/support/DefaultIntroductionAdvisor.java
+1
-1
spring-core/src/main/java/org/springframework/core/io/support/PathMatchingResourcePatternResolver.java
.../core/io/support/PathMatchingResourcePatternResolver.java
+0
-1
spring-core/src/main/java/org/springframework/util/ClassUtils.java
...re/src/main/java/org/springframework/util/ClassUtils.java
+5
-3
spring-core/src/main/java/org/springframework/util/comparator/NullSafeComparator.java
...g/springframework/util/comparator/NullSafeComparator.java
+1
-1
spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/GenericTableMetaDataProvider.java
...work/jdbc/core/metadata/GenericTableMetaDataProvider.java
+0
-1
spring-orm/src/main/java/org/springframework/orm/jpa/persistenceunit/PersistenceUnitReader.java
...mework/orm/jpa/persistenceunit/PersistenceUnitReader.java
+0
-4
spring-test/src/main/java/org/springframework/test/context/web/ServletTestExecutionListener.java
...mework/test/context/web/ServletTestExecutionListener.java
+0
-1
spring-test/src/main/java/org/springframework/test/jpa/AbstractJpaTests.java
...n/java/org/springframework/test/jpa/AbstractJpaTests.java
+0
-2
spring-web/src/main/java/org/springframework/web/context/request/async/WebAsyncManager.java
...gframework/web/context/request/async/WebAsyncManager.java
+1
-1
spring-web/src/main/java/org/springframework/web/context/support/ServletContextResourcePatternResolver.java
...ontext/support/ServletContextResourcePatternResolver.java
+0
-1
spring-web/src/main/java/org/springframework/web/multipart/support/DefaultMultipartHttpServletRequest.java
...multipart/support/DefaultMultipartHttpServletRequest.java
+0
-1
spring-web/src/main/java/org/springframework/web/util/WebUtils.java
.../src/main/java/org/springframework/web/util/WebUtils.java
+0
-1
spring-web/src/test/java/org/springframework/http/converter/xml/Jaxb2RootElementHttpMessageConverterTest.java
...nverter/xml/Jaxb2RootElementHttpMessageConverterTest.java
+0
-3
spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/multipart/DefaultMultipartActionRequest.java
.../web/portlet/multipart/DefaultMultipartActionRequest.java
+0
-1
未找到文件。
spring-aop/src/main/java/org/springframework/aop/support/DefaultIntroductionAdvisor.java
浏览文件 @
4c7cafbd
...
...
@@ -38,7 +38,7 @@ import org.springframework.util.ClassUtils;
* @author Juergen Hoeller
* @since 11.11.2003
*/
@SuppressWarnings
({
"unchecked"
,
"serial"
})
@SuppressWarnings
({
"serial"
})
public
class
DefaultIntroductionAdvisor
implements
IntroductionAdvisor
,
ClassFilter
,
Ordered
,
Serializable
{
private
final
Advice
advice
;
...
...
spring-core/src/main/java/org/springframework/core/io/support/PathMatchingResourcePatternResolver.java
浏览文件 @
4c7cafbd
...
...
@@ -714,7 +714,6 @@ public class PathMatchingResourcePatternResolver implements ResourcePatternResol
return
this
.
resources
;
}
@SuppressWarnings
(
"unused"
)
public
int
size
()
{
return
this
.
resources
.
size
();
}
...
...
spring-core/src/main/java/org/springframework/util/ClassUtils.java
浏览文件 @
4c7cafbd
...
...
@@ -17,12 +17,15 @@
package
org.springframework.util
;
import
java.beans.Introspector
;
import
java.lang.reflect.Array
;
import
java.lang.reflect.Constructor
;
import
java.lang.reflect.Method
;
import
java.lang.reflect.Modifier
;
import
java.lang.reflect.Proxy
;
import
java.security.AccessControlException
;
import
java.util.Arrays
;
import
java.util.Collection
;
import
java.util.Collections
;
...
...
@@ -47,7 +50,6 @@ import java.util.Set;
* @see TypeUtils
* @see ReflectionUtils
*/
@SuppressWarnings
(
"unchecked"
)
public
abstract
class
ClassUtils
{
/** Suffix for array class names: "[]" */
...
...
@@ -114,9 +116,9 @@ public abstract class ClassUtils {
Set
<
Class
<?>>
primitiveTypes
=
new
HashSet
<
Class
<?>>(
32
);
primitiveTypes
.
addAll
(
primitiveWrapperTypeMap
.
values
());
primitiveTypes
.
addAll
(
Arrays
.
asList
(
primitiveTypes
.
addAll
(
Arrays
.
asList
(
new
Class
<?>[]
{
boolean
[].
class
,
byte
[].
class
,
char
[].
class
,
double
[].
class
,
float
[].
class
,
int
[].
class
,
long
[].
class
,
short
[].
class
));
float
[].
class
,
int
[].
class
,
long
[].
class
,
short
[].
class
}
));
primitiveTypes
.
add
(
void
.
class
);
for
(
Class
<?>
primitiveType
:
primitiveTypes
)
{
primitiveTypeNameMap
.
put
(
primitiveType
.
getName
(),
primitiveType
);
...
...
spring-core/src/main/java/org/springframework/util/comparator/NullSafeComparator.java
浏览文件 @
4c7cafbd
...
...
@@ -64,7 +64,7 @@ public class NullSafeComparator<T> implements Comparator<T> {
* @see #NULLS_LOW
* @see #NULLS_HIGH
*/
@SuppressWarnings
({
"unchecked"
,
"rawtypes"
})
@SuppressWarnings
({
"unchecked"
})
private
NullSafeComparator
(
boolean
nullsLow
)
{
this
.
nonNullComparator
=
new
ComparableComparator
();
this
.
nullsLow
=
nullsLow
;
...
...
spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/GenericTableMetaDataProvider.java
浏览文件 @
4c7cafbd
...
...
@@ -475,7 +475,6 @@ public class GenericTableMetaDataProvider implements TableMetaDataProvider {
this
.
type
=
type
;
}
@SuppressWarnings
(
"unused"
)
public
String
getType
()
{
return
this
.
type
;
}
...
...
spring-orm/src/main/java/org/springframework/orm/jpa/persistenceunit/PersistenceUnitReader.java
浏览文件 @
4c7cafbd
...
...
@@ -293,7 +293,6 @@ class PersistenceUnitReader {
/**
* Parse the {@code property} XML elements.
*/
@SuppressWarnings
(
"unchecked"
)
protected
void
parseProperties
(
Element
persistenceUnit
,
SpringPersistenceUnitInfo
unitInfo
)
{
Element
propRoot
=
DomUtils
.
getChildElementByTagName
(
persistenceUnit
,
PROPERTIES
);
if
(
propRoot
==
null
)
{
...
...
@@ -310,7 +309,6 @@ class PersistenceUnitReader {
/**
* Parse the {@code class} XML elements.
*/
@SuppressWarnings
(
"unchecked"
)
protected
void
parseManagedClasses
(
Element
persistenceUnit
,
SpringPersistenceUnitInfo
unitInfo
)
{
List
<
Element
>
classes
=
DomUtils
.
getChildElementsByTagName
(
persistenceUnit
,
MANAGED_CLASS_NAME
);
for
(
Element
element
:
classes
)
{
...
...
@@ -323,7 +321,6 @@ class PersistenceUnitReader {
/**
* Parse the {@code mapping-file} XML elements.
*/
@SuppressWarnings
(
"unchecked"
)
protected
void
parseMappingFiles
(
Element
persistenceUnit
,
SpringPersistenceUnitInfo
unitInfo
)
{
List
<
Element
>
files
=
DomUtils
.
getChildElementsByTagName
(
persistenceUnit
,
MAPPING_FILE_NAME
);
for
(
Element
element
:
files
)
{
...
...
@@ -337,7 +334,6 @@ class PersistenceUnitReader {
/**
* Parse the {@code jar-file} XML elements.
*/
@SuppressWarnings
(
"unchecked"
)
protected
void
parseJarFiles
(
Element
persistenceUnit
,
SpringPersistenceUnitInfo
unitInfo
)
throws
IOException
{
List
<
Element
>
jars
=
DomUtils
.
getChildElementsByTagName
(
persistenceUnit
,
JAR_FILE_URL
);
for
(
Element
element
:
jars
)
{
...
...
spring-test/src/main/java/org/springframework/test/context/web/ServletTestExecutionListener.java
浏览文件 @
4c7cafbd
...
...
@@ -126,7 +126,6 @@ public class ServletTestExecutionListener extends AbstractTestExecutionListener
RequestContextHolder
.
setRequestAttributes
(
servletWebRequest
);
if
(
wac
instanceof
ConfigurableApplicationContext
)
{
@SuppressWarnings
(
"resource"
)
ConfigurableApplicationContext
configurableApplicationContext
=
(
ConfigurableApplicationContext
)
wac
;
ConfigurableListableBeanFactory
bf
=
configurableApplicationContext
.
getBeanFactory
();
bf
.
registerResolvableDependency
(
MockHttpServletResponse
.
class
,
response
);
...
...
spring-test/src/main/java/org/springframework/test/jpa/AbstractJpaTests.java
浏览文件 @
4c7cafbd
...
...
@@ -326,7 +326,6 @@ public abstract class AbstractJpaTests extends AbstractAnnotationAwareTransactio
private
final
LoadTimeWeaver
ltw
;
@SuppressWarnings
(
"unused"
)
public
LoadTimeWeaverInjectingBeanPostProcessor
(
LoadTimeWeaver
ltw
)
{
this
.
ltw
=
ltw
;
}
...
...
@@ -347,7 +346,6 @@ public abstract class AbstractJpaTests extends AbstractAnnotationAwareTransactio
private
final
ClassLoader
shadowingClassLoader
;
@SuppressWarnings
(
"unused"
)
public
ShadowingLoadTimeWeaver
(
ClassLoader
shadowingClassLoader
)
{
this
.
shadowingClassLoader
=
shadowingClassLoader
;
}
...
...
spring-web/src/main/java/org/springframework/web/context/request/async/WebAsyncManager.java
浏览文件 @
4c7cafbd
...
...
@@ -252,7 +252,7 @@ public final class WebAsyncManager {
* @see #getConcurrentResult()
* @see #getConcurrentResultContext()
*/
@SuppressWarnings
({
"rawtypes"
,
"unchecked"
})
@SuppressWarnings
({
"unchecked"
})
public
void
startCallableProcessing
(
final
Callable
<?>
callable
,
Object
...
processingContext
)
throws
Exception
{
Assert
.
notNull
(
callable
,
"Callable must not be null"
);
startCallableProcessing
(
new
WebAsyncTask
(
callable
),
processingContext
);
...
...
spring-web/src/main/java/org/springframework/web/context/support/ServletContextResourcePatternResolver.java
浏览文件 @
4c7cafbd
...
...
@@ -156,7 +156,6 @@ public class ServletContextResourcePatternResolver extends PathMatchingResourceP
* @param result the Set of matching Resources to add to
* @throws IOException if jar contents could not be retrieved
*/
@SuppressWarnings
(
"unchecked"
)
private
void
doRetrieveMatchingJarEntries
(
String
jarFilePath
,
String
entryPattern
,
Set
<
Resource
>
result
)
{
if
(
logger
.
isDebugEnabled
())
{
logger
.
debug
(
"Searching jar file ["
+
jarFilePath
+
"] for entries matching ["
+
entryPattern
+
"]"
);
...
...
spring-web/src/main/java/org/springframework/web/multipart/support/DefaultMultipartHttpServletRequest.java
浏览文件 @
4c7cafbd
...
...
@@ -103,7 +103,6 @@ public class DefaultMultipartHttpServletRequest extends AbstractMultipartHttpSer
}
@Override
@SuppressWarnings
(
"unchecked"
)
public
Map
<
String
,
String
[]>
getParameterMap
()
{
Map
<
String
,
String
[]>
paramMap
=
new
HashMap
<
String
,
String
[]>();
paramMap
.
putAll
(
super
.
getParameterMap
());
...
...
spring-web/src/main/java/org/springframework/web/util/WebUtils.java
浏览文件 @
4c7cafbd
...
...
@@ -573,7 +573,6 @@ public abstract class WebUtils {
* @return the value of the parameter, or {@code null}
* if the parameter does not exist in given request
*/
@SuppressWarnings
(
"unchecked"
)
public
static
String
findParameterValue
(
ServletRequest
request
,
String
name
)
{
return
findParameterValue
(
request
.
getParameterMap
(),
name
);
}
...
...
spring-web/src/test/java/org/springframework/http/converter/xml/Jaxb2RootElementHttpMessageConverterTest.java
浏览文件 @
4c7cafbd
...
...
@@ -72,7 +72,6 @@ public class Jaxb2RootElementHttpMessageConverterTest {
}
@Test
@SuppressWarnings
(
"unchecked"
)
public
void
readXmlRootElement
()
throws
Exception
{
byte
[]
body
=
"<rootElement><type s=\"Hello World\"/></rootElement>"
.
getBytes
(
"UTF-8"
);
MockHttpInputMessage
inputMessage
=
new
MockHttpInputMessage
(
body
);
...
...
@@ -81,7 +80,6 @@ public class Jaxb2RootElementHttpMessageConverterTest {
}
@Test
@SuppressWarnings
(
"unchecked"
)
public
void
readXmlRootElementSubclass
()
throws
Exception
{
byte
[]
body
=
"<rootElement><type s=\"Hello World\"/></rootElement>"
.
getBytes
(
"UTF-8"
);
MockHttpInputMessage
inputMessage
=
new
MockHttpInputMessage
(
body
);
...
...
@@ -90,7 +88,6 @@ public class Jaxb2RootElementHttpMessageConverterTest {
}
@Test
@SuppressWarnings
(
"unchecked"
)
public
void
readXmlType
()
throws
Exception
{
byte
[]
body
=
"<foo s=\"Hello World\"/>"
.
getBytes
(
"UTF-8"
);
MockHttpInputMessage
inputMessage
=
new
MockHttpInputMessage
(
body
);
...
...
spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/multipart/DefaultMultipartActionRequest.java
浏览文件 @
4c7cafbd
...
...
@@ -131,7 +131,6 @@ public class DefaultMultipartActionRequest extends ActionRequestWrapper implemen
}
@Override
@SuppressWarnings
(
"unchecked"
)
public
Map
<
String
,
String
[]>
getParameterMap
()
{
Map
<
String
,
String
[]>
paramMap
=
new
HashMap
<
String
,
String
[]>();
paramMap
.
putAll
(
super
.
getParameterMap
());
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录