Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
爱吃血肠
spring-framework
提交
d89e30b8
S
spring-framework
项目概览
爱吃血肠
/
spring-framework
通知
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,发现更多精彩内容 >>
提交
d89e30b8
编写于
1月 29, 2013
作者:
P
Phillip Webb
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix unnecessary @SupressWarnings annotations
上级
2b0d8609
变更
20
隐藏空白更改
内联
并排
Showing
20 changed file
with
3 addition
and
25 deletion
+3
-25
spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AbstractAspectJAdvisorFactoryTests.java
...spectj/annotation/AbstractAspectJAdvisorFactoryTests.java
+0
-1
spring-beans/src/test/java/org/springframework/beans/BeanWrapperGenericsTests.java
...a/org/springframework/beans/BeanWrapperGenericsTests.java
+0
-1
spring-beans/src/test/java/org/springframework/beans/ExtendedBeanInfoTests.java
...java/org/springframework/beans/ExtendedBeanInfoTests.java
+0
-1
spring-beans/src/test/java/org/springframework/beans/factory/DefaultListableBeanFactoryTests.java
...mework/beans/factory/DefaultListableBeanFactoryTests.java
+0
-1
spring-context/src/main/java/org/springframework/context/event/SimpleApplicationEventMulticaster.java
...work/context/event/SimpleApplicationEventMulticaster.java
+0
-1
spring-context/src/test/java/example/scannable/FooServiceImpl.java
...ntext/src/test/java/example/scannable/FooServiceImpl.java
+0
-1
spring-context/src/test/java/org/springframework/context/annotation/AnnotationConfigApplicationContextTests.java
...t/annotation/AnnotationConfigApplicationContextTests.java
+0
-1
spring-context/src/test/java/org/springframework/context/annotation/BeanMethodPolymorphismTests.java
...ework/context/annotation/BeanMethodPolymorphismTests.java
+1
-1
spring-context/src/test/java/org/springframework/context/annotation/configuration/BeanAnnotationAttributePropagationTests.java
...onfiguration/BeanAnnotationAttributePropagationTests.java
+0
-1
spring-context/src/test/java/org/springframework/format/support/FormattingConversionServiceFactoryBeanTests.java
.../support/FormattingConversionServiceFactoryBeanTests.java
+0
-1
spring-context/src/test/java/org/springframework/format/support/FormattingConversionServiceTests.java
...work/format/support/FormattingConversionServiceTests.java
+0
-1
spring-context/src/test/java/org/springframework/instrument/classloading/glassfish/GlassFishLoadTimeWeaverTests.java
.../classloading/glassfish/GlassFishLoadTimeWeaverTests.java
+0
-1
spring-context/src/test/java/org/springframework/scheduling/annotation/EnableAsyncTests.java
...ringframework/scheduling/annotation/EnableAsyncTests.java
+0
-1
spring-core/src/test/java/org/springframework/core/convert/support/GenericConversionServiceTests.java
...k/core/convert/support/GenericConversionServiceTests.java
+0
-1
spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseFactory.java
...ork/jdbc/datasource/embedded/EmbeddedDatabaseFactory.java
+0
-1
spring-orm/src/main/java/org/springframework/orm/jdo/JdoTemplate.java
...rc/main/java/org/springframework/orm/jdo/JdoTemplate.java
+0
-1
spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/FlashAttributeResultMatchers.java
...test/web/servlet/result/FlashAttributeResultMatchers.java
+0
-1
spring-web/src/test/java/org/springframework/http/converter/FormHttpMessageConverterTests.java
...amework/http/converter/FormHttpMessageConverterTests.java
+0
-1
spring-web/src/test/java/org/springframework/web/method/annotation/InitBinderDataBinderFactoryTests.java
...b/method/annotation/InitBinderDataBinderFactoryTests.java
+1
-5
spring-web/src/test/java/org/springframework/web/method/annotation/ModelAttributeMethodProcessorTests.java
...method/annotation/ModelAttributeMethodProcessorTests.java
+1
-2
未找到文件。
spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AbstractAspectJAdvisorFactoryTests.java
浏览文件 @
d89e30b8
...
@@ -404,7 +404,6 @@ public abstract class AbstractAspectJAdvisorFactoryTests {
...
@@ -404,7 +404,6 @@ public abstract class AbstractAspectJAdvisorFactoryTests {
}
}
}
}
@SuppressWarnings
(
"unchecked"
)
@Test
@Test
public
void
testIntroductionOnTargetExcludedByTypePattern
()
{
public
void
testIntroductionOnTargetExcludedByTypePattern
()
{
LinkedList
target
=
new
LinkedList
();
LinkedList
target
=
new
LinkedList
();
...
...
spring-beans/src/test/java/org/springframework/beans/BeanWrapperGenericsTests.java
浏览文件 @
d89e30b8
...
@@ -157,7 +157,6 @@ public class BeanWrapperGenericsTests {
...
@@ -157,7 +157,6 @@ public class BeanWrapperGenericsTests {
GenericBean
<?>
gb
=
new
GenericBean
<
Object
>();
GenericBean
<?>
gb
=
new
GenericBean
<
Object
>();
BeanWrapper
bw
=
new
BeanWrapperImpl
(
gb
);
BeanWrapper
bw
=
new
BeanWrapperImpl
(
gb
);
bw
.
registerCustomEditor
(
Number
.
class
,
new
CustomNumberEditor
(
Integer
.
class
,
false
));
bw
.
registerCustomEditor
(
Number
.
class
,
new
CustomNumberEditor
(
Integer
.
class
,
false
));
@SuppressWarnings
(
"unchecked"
)
Map
<
String
,
Collection
>
input
=
new
HashMap
<
String
,
Collection
>();
Map
<
String
,
Collection
>
input
=
new
HashMap
<
String
,
Collection
>();
HashSet
<
Integer
>
value1
=
new
HashSet
<
Integer
>();
HashSet
<
Integer
>
value1
=
new
HashSet
<
Integer
>();
value1
.
add
(
new
Integer
(
1
));
value1
.
add
(
new
Integer
(
1
));
...
...
spring-beans/src/test/java/org/springframework/beans/ExtendedBeanInfoTests.java
浏览文件 @
d89e30b8
...
@@ -974,7 +974,6 @@ public class ExtendedBeanInfoTests {
...
@@ -974,7 +974,6 @@ public class ExtendedBeanInfoTests {
}
}
static
class
WithStaticWriteMethod
{
static
class
WithStaticWriteMethod
{
@SuppressWarnings
(
"unused"
)
public
static
void
setProp1
(
String
prop1
)
{
public
static
void
setProp1
(
String
prop1
)
{
}
}
}
}
...
...
spring-beans/src/test/java/org/springframework/beans/factory/DefaultListableBeanFactoryTests.java
浏览文件 @
d89e30b8
...
@@ -2200,7 +2200,6 @@ public class DefaultListableBeanFactoryTests {
...
@@ -2200,7 +2200,6 @@ public class DefaultListableBeanFactoryTests {
doTestFieldSettingWithInstantiationAwarePostProcessor
(
true
);
doTestFieldSettingWithInstantiationAwarePostProcessor
(
true
);
}
}
@SuppressWarnings
(
"unchecked"
)
private
void
doTestFieldSettingWithInstantiationAwarePostProcessor
(
final
boolean
skipPropertyPopulation
)
{
private
void
doTestFieldSettingWithInstantiationAwarePostProcessor
(
final
boolean
skipPropertyPopulation
)
{
DefaultListableBeanFactory
lbf
=
new
DefaultListableBeanFactory
();
DefaultListableBeanFactory
lbf
=
new
DefaultListableBeanFactory
();
RootBeanDefinition
bd
=
new
RootBeanDefinition
(
TestBean
.
class
);
RootBeanDefinition
bd
=
new
RootBeanDefinition
(
TestBean
.
class
);
...
...
spring-context/src/main/java/org/springframework/context/event/SimpleApplicationEventMulticaster.java
浏览文件 @
d89e30b8
...
@@ -87,7 +87,6 @@ public class SimpleApplicationEventMulticaster extends AbstractApplicationEventM
...
@@ -87,7 +87,6 @@ public class SimpleApplicationEventMulticaster extends AbstractApplicationEventM
Executor
executor
=
getTaskExecutor
();
Executor
executor
=
getTaskExecutor
();
if
(
executor
!=
null
)
{
if
(
executor
!=
null
)
{
executor
.
execute
(
new
Runnable
()
{
executor
.
execute
(
new
Runnable
()
{
@SuppressWarnings
(
"unchecked"
)
public
void
run
()
{
public
void
run
()
{
listener
.
onApplicationEvent
(
event
);
listener
.
onApplicationEvent
(
event
);
}
}
...
...
spring-context/src/test/java/example/scannable/FooServiceImpl.java
浏览文件 @
d89e30b8
...
@@ -65,7 +65,6 @@ public class FooServiceImpl implements FooService {
...
@@ -65,7 +65,6 @@ public class FooServiceImpl implements FooService {
private
boolean
initCalled
=
false
;
private
boolean
initCalled
=
false
;
@SuppressWarnings
(
"unused"
)
@PostConstruct
@PostConstruct
private
void
init
()
{
private
void
init
()
{
if
(
this
.
initCalled
)
{
if
(
this
.
initCalled
)
{
...
...
spring-context/src/test/java/org/springframework/context/annotation/AnnotationConfigApplicationContextTests.java
浏览文件 @
d89e30b8
...
@@ -133,7 +133,6 @@ public class AnnotationConfigApplicationContextTests {
...
@@ -133,7 +133,6 @@ public class AnnotationConfigApplicationContextTests {
}
}
}
}
@SuppressWarnings
(
"unchecked"
)
@Test
@Test
public
void
getBeanByTypeAmbiguityRaisesException
()
{
public
void
getBeanByTypeAmbiguityRaisesException
()
{
AnnotationConfigApplicationContext
context
=
new
AnnotationConfigApplicationContext
(
TwoTestBeanConfig
.
class
);
AnnotationConfigApplicationContext
context
=
new
AnnotationConfigApplicationContext
(
TwoTestBeanConfig
.
class
);
...
...
spring-context/src/test/java/org/springframework/context/annotation/BeanMethodPolymorphismTests.java
浏览文件 @
d89e30b8
...
@@ -47,7 +47,7 @@ public class BeanMethodPolymorphismTests {
...
@@ -47,7 +47,7 @@ public class BeanMethodPolymorphismTests {
@Test
@Test
public
void
beanMethodOverloadingWithoutInheritance
()
{
public
void
beanMethodOverloadingWithoutInheritance
()
{
@SuppressWarnings
({
"
unused"
,
"
hiding"
})
@SuppressWarnings
({
"hiding"
})
@Configuration
class
Config
{
@Configuration
class
Config
{
@Bean
String
aString
()
{
return
"na"
;
}
@Bean
String
aString
()
{
return
"na"
;
}
@Bean
String
aString
(
Integer
dependency
)
{
return
"na"
;
}
@Bean
String
aString
(
Integer
dependency
)
{
return
"na"
;
}
...
...
spring-context/src/test/java/org/springframework/context/annotation/configuration/BeanAnnotationAttributePropagationTests.java
浏览文件 @
d89e30b8
...
@@ -41,7 +41,6 @@ import org.springframework.context.annotation.DependsOn;
...
@@ -41,7 +41,6 @@ import org.springframework.context.annotation.DependsOn;
*
*
* @author Chris Beams
* @author Chris Beams
*/
*/
@SuppressWarnings
(
"unused"
)
// for unused @Bean methods in local classes
public
class
BeanAnnotationAttributePropagationTests
{
public
class
BeanAnnotationAttributePropagationTests
{
@Test
@Test
...
...
spring-context/src/test/java/org/springframework/format/support/FormattingConversionServiceFactoryBeanTests.java
浏览文件 @
d89e30b8
...
@@ -130,7 +130,6 @@ public class FormattingConversionServiceFactoryBeanTests {
...
@@ -130,7 +130,6 @@ public class FormattingConversionServiceFactoryBeanTests {
private
static
class
TestBean
{
private
static
class
TestBean
{
@SuppressWarnings
(
"unused"
)
@NumberFormat
(
style
=
Style
.
PERCENT
)
@NumberFormat
(
style
=
Style
.
PERCENT
)
private
double
percent
;
private
double
percent
;
...
...
spring-context/src/test/java/org/springframework/format/support/FormattingConversionServiceTests.java
浏览文件 @
d89e30b8
...
@@ -393,7 +393,6 @@ public class FormattingConversionServiceTests {
...
@@ -393,7 +393,6 @@ public class FormattingConversionServiceTests {
private
static
class
ModelWithSubclassField
{
private
static
class
ModelWithSubclassField
{
@SuppressWarnings
(
"unused"
)
@org
.
springframework
.
format
.
annotation
.
DateTimeFormat
(
style
=
"S-"
)
@org
.
springframework
.
format
.
annotation
.
DateTimeFormat
(
style
=
"S-"
)
public
MyDate
date
;
public
MyDate
date
;
}
}
...
...
spring-context/src/test/java/org/springframework/instrument/classloading/glassfish/GlassFishLoadTimeWeaverTests.java
浏览文件 @
d89e30b8
...
@@ -20,7 +20,6 @@ import org.junit.Ignore;
...
@@ -20,7 +20,6 @@ import org.junit.Ignore;
// converting away from old-style EasyMock APIs was problematic with this class
// converting away from old-style EasyMock APIs was problematic with this class
// glassfish dependencies no longer on classpath
// glassfish dependencies no longer on classpath
@SuppressWarnings
(
"deprecation"
)
@Ignore
@Ignore
public
class
GlassFishLoadTimeWeaverTests
{
public
class
GlassFishLoadTimeWeaverTests
{
...
...
spring-context/src/test/java/org/springframework/scheduling/annotation/EnableAsyncTests.java
浏览文件 @
d89e30b8
...
@@ -74,7 +74,6 @@ public class EnableAsyncTests {
...
@@ -74,7 +74,6 @@ public class EnableAsyncTests {
}
}
@SuppressWarnings
(
"unchecked"
)
@Test
@Test
public
void
withAsyncBeanWithExecutorQualifiedByName
()
throws
ExecutionException
,
InterruptedException
{
public
void
withAsyncBeanWithExecutorQualifiedByName
()
throws
ExecutionException
,
InterruptedException
{
AnnotationConfigApplicationContext
ctx
=
new
AnnotationConfigApplicationContext
();
AnnotationConfigApplicationContext
ctx
=
new
AnnotationConfigApplicationContext
();
...
...
spring-core/src/test/java/org/springframework/core/convert/support/GenericConversionServiceTests.java
浏览文件 @
d89e30b8
...
@@ -358,7 +358,6 @@ public class GenericConversionServiceTests {
...
@@ -358,7 +358,6 @@ public class GenericConversionServiceTests {
GenericConversionService
service
=
new
DefaultConversionService
();
GenericConversionService
service
=
new
DefaultConversionService
();
List
<
String
>
list1
=
Arrays
.
asList
(
"Foo"
,
"Bar"
);
List
<
String
>
list1
=
Arrays
.
asList
(
"Foo"
,
"Bar"
);
List
<
String
>
list2
=
Arrays
.
asList
(
"Baz"
,
"Boop"
);
List
<
String
>
list2
=
Arrays
.
asList
(
"Baz"
,
"Boop"
);
@SuppressWarnings
(
"unchecked"
)
List
<
List
<
String
>>
list
=
Arrays
.
asList
(
list1
,
list2
);
List
<
List
<
String
>>
list
=
Arrays
.
asList
(
list1
,
list2
);
String
result
=
service
.
convert
(
list
,
String
.
class
);
String
result
=
service
.
convert
(
list
,
String
.
class
);
assertNotNull
(
result
);
assertNotNull
(
result
);
...
...
spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseFactory.java
浏览文件 @
d89e30b8
...
@@ -205,7 +205,6 @@ public class EmbeddedDatabaseFactory {
...
@@ -205,7 +205,6 @@ public class EmbeddedDatabaseFactory {
}
}
// getParentLogger() is required for JDBC 4.1 compatibility
// getParentLogger() is required for JDBC 4.1 compatibility
@SuppressWarnings
(
"unused"
)
public
Logger
getParentLogger
()
{
public
Logger
getParentLogger
()
{
return
Logger
.
getLogger
(
Logger
.
GLOBAL_LOGGER_NAME
);
return
Logger
.
getLogger
(
Logger
.
GLOBAL_LOGGER_NAME
);
}
}
...
...
spring-orm/src/main/java/org/springframework/orm/jdo/JdoTemplate.java
浏览文件 @
d89e30b8
...
@@ -481,7 +481,6 @@ public class JdoTemplate extends JdoAccessor implements JdoOperations {
...
@@ -481,7 +481,6 @@ public class JdoTemplate extends JdoAccessor implements JdoOperations {
public
Collection
find
(
final
String
queryString
)
throws
DataAccessException
{
public
Collection
find
(
final
String
queryString
)
throws
DataAccessException
{
return
execute
(
new
JdoCallback
<
Collection
>()
{
return
execute
(
new
JdoCallback
<
Collection
>()
{
@SuppressWarnings
(
"unchecked"
)
public
Collection
doInJdo
(
PersistenceManager
pm
)
throws
JDOException
{
public
Collection
doInJdo
(
PersistenceManager
pm
)
throws
JDOException
{
Query
query
=
pm
.
newQuery
(
queryString
);
Query
query
=
pm
.
newQuery
(
queryString
);
prepareQuery
(
query
);
prepareQuery
(
query
);
...
...
spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/FlashAttributeResultMatchers.java
浏览文件 @
d89e30b8
...
@@ -57,7 +57,6 @@ public class FlashAttributeResultMatchers {
...
@@ -57,7 +57,6 @@ public class FlashAttributeResultMatchers {
*/
*/
public
<
T
>
ResultMatcher
attribute
(
final
String
name
,
final
Object
value
)
{
public
<
T
>
ResultMatcher
attribute
(
final
String
name
,
final
Object
value
)
{
return
new
ResultMatcher
()
{
return
new
ResultMatcher
()
{
@SuppressWarnings
(
"unchecked"
)
public
void
match
(
MvcResult
result
)
throws
Exception
{
public
void
match
(
MvcResult
result
)
throws
Exception
{
assertEquals
(
"Flash attribute"
,
value
,
result
.
getFlashMap
().
get
(
name
));
assertEquals
(
"Flash attribute"
,
value
,
result
.
getFlashMap
().
get
(
name
));
}
}
...
...
spring-web/src/test/java/org/springframework/http/converter/FormHttpMessageConverterTests.java
浏览文件 @
d89e30b8
...
@@ -72,7 +72,6 @@ public class FormHttpMessageConverterTests {
...
@@ -72,7 +72,6 @@ public class FormHttpMessageConverterTests {
}
}
@Test
@Test
@SuppressWarnings
(
"unchecked"
)
public
void
readForm
()
throws
Exception
{
public
void
readForm
()
throws
Exception
{
String
body
=
"name+1=value+1&name+2=value+2%2B1&name+2=value+2%2B2&name+3"
;
String
body
=
"name+1=value+1&name+2=value+2%2B1&name+2=value+2%2B2&name+3"
;
Charset
iso88591
=
Charset
.
forName
(
"ISO-8859-1"
);
Charset
iso88591
=
Charset
.
forName
(
"ISO-8859-1"
);
...
...
spring-web/src/test/java/org/springframework/web/method/annotation/InitBinderDataBinderFactoryTests.java
浏览文件 @
d89e30b8
...
@@ -140,29 +140,25 @@ public class InitBinderDataBinderFactoryTests {
...
@@ -140,29 +140,25 @@ public class InitBinderDataBinderFactoryTests {
private
static
class
InitBinderHandler
{
private
static
class
InitBinderHandler
{
@SuppressWarnings
(
"unused"
)
@InitBinder
@InitBinder
public
void
initBinder
(
WebDataBinder
dataBinder
)
{
public
void
initBinder
(
WebDataBinder
dataBinder
)
{
dataBinder
.
setDisallowedFields
(
"id"
);
dataBinder
.
setDisallowedFields
(
"id"
);
}
}
@SuppressWarnings
(
"unused"
)
@InitBinder
(
value
=
"foo"
)
@InitBinder
(
value
=
"foo"
)
public
void
initBinderWithAttributeName
(
WebDataBinder
dataBinder
)
{
public
void
initBinderWithAttributeName
(
WebDataBinder
dataBinder
)
{
dataBinder
.
setDisallowedFields
(
"id"
);
dataBinder
.
setDisallowedFields
(
"id"
);
}
}
@SuppressWarnings
(
"unused"
)
@InitBinder
@InitBinder
public
String
initBinderReturnValue
(
WebDataBinder
dataBinder
)
{
public
String
initBinderReturnValue
(
WebDataBinder
dataBinder
)
{
return
"invalid"
;
return
"invalid"
;
}
}
@SuppressWarnings
(
"unused"
)
@InitBinder
@InitBinder
public
void
initBinderTypeConversion
(
WebDataBinder
dataBinder
,
@RequestParam
int
requestParam
)
{
public
void
initBinderTypeConversion
(
WebDataBinder
dataBinder
,
@RequestParam
int
requestParam
)
{
dataBinder
.
setDisallowedFields
(
"requestParam-"
+
requestParam
);
dataBinder
.
setDisallowedFields
(
"requestParam-"
+
requestParam
);
}
}
}
}
}
}
\ No newline at end of file
spring-web/src/test/java/org/springframework/web/method/annotation/ModelAttributeMethodProcessorTests.java
浏览文件 @
d89e30b8
...
@@ -299,7 +299,6 @@ public class ModelAttributeMethodProcessorTests {
...
@@ -299,7 +299,6 @@ public class ModelAttributeMethodProcessorTests {
}
}
}
}
@SuppressWarnings
(
"unused"
)
@ModelAttribute
(
"modelAttrName"
)
@ModelAttribute
(
"modelAttrName"
)
private
String
annotatedReturnValue
()
{
private
String
annotatedReturnValue
()
{
return
null
;
return
null
;
...
@@ -310,4 +309,4 @@ public class ModelAttributeMethodProcessorTests {
...
@@ -310,4 +309,4 @@ public class ModelAttributeMethodProcessorTests {
return
null
;
return
null
;
}
}
}
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录