Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
9636350b
Commit
9636350b
authored
Jun 04, 2020
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable rawtypes compilation warnings
See gh-21271
parent
056d5f31
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
15 additions
and
17 deletions
+15
-17
JavaConventions.java
.../java/org/springframework/boot/build/JavaConventions.java
+1
-1
ReactiveCloudFoundryActuatorAutoConfigurationTests.java
...e/ReactiveCloudFoundryActuatorAutoConfigurationTests.java
+1
-2
JerseyEndpointIntegrationTests.java
...igure/integrationtest/JerseyEndpointIntegrationTests.java
+2
-2
ControllerEndpointDiscovererTests.java
...int/web/annotation/ControllerEndpointDiscovererTests.java
+1
-2
ServletEndpointDiscovererTests.java
...dpoint/web/annotation/ServletEndpointDiscovererTests.java
+1
-2
ConfigurationPropertiesAutoConfigurationTests.java
...ontext/ConfigurationPropertiesAutoConfigurationTests.java
+2
-2
BasicErrorControllerIntegrationTests.java
...b/servlet/error/BasicErrorControllerIntegrationTests.java
+1
-0
DependencyManagementBomTransformation.java
...t/cli/compiler/DependencyManagementBomTransformation.java
+1
-1
SpringBootMockMvcBuilderCustomizer.java
...igure/web/servlet/SpringBootMockMvcBuilderCustomizer.java
+1
-1
WebServiceClientExcludeFilter.java
...ure/webservices/client/WebServiceClientExcludeFilter.java
+1
-1
SpringApplication.java
...main/java/org/springframework/boot/SpringApplication.java
+1
-1
ConfigurationPropertiesTests.java
...boot/context/properties/ConfigurationPropertiesTests.java
+1
-1
AtomikosPropertiesTests.java
...gframework/boot/jta/atomikos/AtomikosPropertiesTests.java
+1
-1
No files found.
buildSrc/src/main/java/org/springframework/boot/build/JavaConventions.java
View file @
9636350b
...
@@ -157,7 +157,7 @@ class JavaConventions {
...
@@ -157,7 +157,7 @@ class JavaConventions {
args
.
add
(
"-parameters"
);
args
.
add
(
"-parameters"
);
}
}
if
(
JavaVersion
.
current
()
==
JavaVersion
.
VERSION_1_8
)
{
if
(
JavaVersion
.
current
()
==
JavaVersion
.
VERSION_1_8
)
{
args
.
addAll
(
Arrays
.
asList
(
"-Werror"
,
"-Xlint:unchecked"
,
"-Xlint:deprecation"
));
args
.
addAll
(
Arrays
.
asList
(
"-Werror"
,
"-Xlint:unchecked"
,
"-Xlint:deprecation"
,
"-Xlint:rawtypes"
));
}
}
});
});
}
}
...
...
spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/ReactiveCloudFoundryActuatorAutoConfigurationTests.java
View file @
9636350b
...
@@ -38,7 +38,6 @@ import org.springframework.boot.actuate.autoconfigure.info.InfoContributorAutoCo
...
@@ -38,7 +38,6 @@ import org.springframework.boot.actuate.autoconfigure.info.InfoContributorAutoCo
import
org.springframework.boot.actuate.autoconfigure.info.InfoEndpointAutoConfiguration
;
import
org.springframework.boot.actuate.autoconfigure.info.InfoEndpointAutoConfiguration
;
import
org.springframework.boot.actuate.autoconfigure.web.server.ManagementContextAutoConfiguration
;
import
org.springframework.boot.actuate.autoconfigure.web.server.ManagementContextAutoConfiguration
;
import
org.springframework.boot.actuate.endpoint.EndpointId
;
import
org.springframework.boot.actuate.endpoint.EndpointId
;
import
org.springframework.boot.actuate.endpoint.ExposableEndpoint
;
import
org.springframework.boot.actuate.endpoint.annotation.Endpoint
;
import
org.springframework.boot.actuate.endpoint.annotation.Endpoint
;
import
org.springframework.boot.actuate.endpoint.annotation.ReadOperation
;
import
org.springframework.boot.actuate.endpoint.annotation.ReadOperation
;
import
org.springframework.boot.actuate.endpoint.http.ActuatorMediaType
;
import
org.springframework.boot.actuate.endpoint.http.ActuatorMediaType
;
...
@@ -208,7 +207,7 @@ class ReactiveCloudFoundryActuatorAutoConfigurationTests {
...
@@ -208,7 +207,7 @@ class ReactiveCloudFoundryActuatorAutoConfigurationTests {
.
run
((
context
)
->
{
.
run
((
context
)
->
{
CloudFoundryWebFluxEndpointHandlerMapping
handlerMapping
=
getHandlerMapping
(
context
);
CloudFoundryWebFluxEndpointHandlerMapping
handlerMapping
=
getHandlerMapping
(
context
);
Collection
<
ExposableWebEndpoint
>
endpoints
=
handlerMapping
.
getEndpoints
();
Collection
<
ExposableWebEndpoint
>
endpoints
=
handlerMapping
.
getEndpoints
();
List
<
EndpointId
>
endpointIds
=
endpoints
.
stream
().
map
(
ExposableEndpoint:
:
getEndpointId
)
List
<
EndpointId
>
endpointIds
=
endpoints
.
stream
().
map
(
Exposable
Web
Endpoint:
:
getEndpointId
)
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
assertThat
(
endpointIds
).
contains
(
EndpointId
.
of
(
"test"
));
assertThat
(
endpointIds
).
contains
(
EndpointId
.
of
(
"test"
));
});
});
...
...
spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/JerseyEndpointIntegrationTests.java
View file @
9636350b
...
@@ -47,12 +47,12 @@ class JerseyEndpointIntegrationTests {
...
@@ -47,12 +47,12 @@ class JerseyEndpointIntegrationTests {
@Test
@Test
void
linksAreProvidedToAllEndpointTypes
()
{
void
linksAreProvidedToAllEndpointTypes
()
{
testJerseyEndpoints
(
new
Class
[]
{
EndpointsConfiguration
.
class
,
ResourceConfigConfiguration
.
class
});
testJerseyEndpoints
(
new
Class
<?>
[]
{
EndpointsConfiguration
.
class
,
ResourceConfigConfiguration
.
class
});
}
}
@Test
@Test
void
actuatorEndpointsWhenUserProvidedResourceConfigBeanNotAvailable
()
{
void
actuatorEndpointsWhenUserProvidedResourceConfigBeanNotAvailable
()
{
testJerseyEndpoints
(
new
Class
[]
{
EndpointsConfiguration
.
class
});
testJerseyEndpoints
(
new
Class
<?>
[]
{
EndpointsConfiguration
.
class
});
}
}
protected
void
testJerseyEndpoints
(
Class
<?>[]
userConfigurations
)
{
protected
void
testJerseyEndpoints
(
Class
<?>[]
userConfigurations
)
{
...
...
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/annotation/ControllerEndpointDiscovererTests.java
View file @
9636350b
...
@@ -25,7 +25,6 @@ import java.util.stream.Collectors;
...
@@ -25,7 +25,6 @@ import java.util.stream.Collectors;
import
org.junit.jupiter.api.Test
;
import
org.junit.jupiter.api.Test
;
import
org.springframework.boot.actuate.endpoint.EndpointId
;
import
org.springframework.boot.actuate.endpoint.EndpointId
;
import
org.springframework.boot.actuate.endpoint.ExposableEndpoint
;
import
org.springframework.boot.actuate.endpoint.annotation.DiscoveredEndpoint
;
import
org.springframework.boot.actuate.endpoint.annotation.DiscoveredEndpoint
;
import
org.springframework.boot.actuate.endpoint.annotation.Endpoint
;
import
org.springframework.boot.actuate.endpoint.annotation.Endpoint
;
import
org.springframework.boot.actuate.endpoint.annotation.ReadOperation
;
import
org.springframework.boot.actuate.endpoint.annotation.ReadOperation
;
...
@@ -114,7 +113,7 @@ class ControllerEndpointDiscovererTests {
...
@@ -114,7 +113,7 @@ class ControllerEndpointDiscovererTests {
this
.
contextRunner
.
withUserConfiguration
(
WithRegularEndpointConfiguration
.
class
)
this
.
contextRunner
.
withUserConfiguration
(
WithRegularEndpointConfiguration
.
class
)
.
run
(
assertDiscoverer
((
discoverer
)
->
{
.
run
(
assertDiscoverer
((
discoverer
)
->
{
Collection
<
ExposableControllerEndpoint
>
endpoints
=
discoverer
.
getEndpoints
();
Collection
<
ExposableControllerEndpoint
>
endpoints
=
discoverer
.
getEndpoints
();
List
<
EndpointId
>
ids
=
endpoints
.
stream
().
map
(
ExposableEndpoint:
:
getEndpointId
)
List
<
EndpointId
>
ids
=
endpoints
.
stream
().
map
(
Exposable
Controller
Endpoint:
:
getEndpointId
)
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
assertThat
(
ids
).
containsOnly
(
EndpointId
.
of
(
"testcontroller"
),
EndpointId
.
of
(
"testrestcontroller"
));
assertThat
(
ids
).
containsOnly
(
EndpointId
.
of
(
"testcontroller"
),
EndpointId
.
of
(
"testrestcontroller"
));
}));
}));
...
...
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/annotation/ServletEndpointDiscovererTests.java
View file @
9636350b
...
@@ -32,7 +32,6 @@ import javax.servlet.ServletResponse;
...
@@ -32,7 +32,6 @@ import javax.servlet.ServletResponse;
import
org.junit.jupiter.api.Test
;
import
org.junit.jupiter.api.Test
;
import
org.springframework.boot.actuate.endpoint.EndpointId
;
import
org.springframework.boot.actuate.endpoint.EndpointId
;
import
org.springframework.boot.actuate.endpoint.ExposableEndpoint
;
import
org.springframework.boot.actuate.endpoint.annotation.DiscoveredEndpoint
;
import
org.springframework.boot.actuate.endpoint.annotation.DiscoveredEndpoint
;
import
org.springframework.boot.actuate.endpoint.annotation.Endpoint
;
import
org.springframework.boot.actuate.endpoint.annotation.Endpoint
;
import
org.springframework.boot.actuate.endpoint.annotation.ReadOperation
;
import
org.springframework.boot.actuate.endpoint.annotation.ReadOperation
;
...
@@ -97,7 +96,7 @@ class ServletEndpointDiscovererTests {
...
@@ -97,7 +96,7 @@ class ServletEndpointDiscovererTests {
this
.
contextRunner
.
withUserConfiguration
(
WithRegularEndpointConfiguration
.
class
)
this
.
contextRunner
.
withUserConfiguration
(
WithRegularEndpointConfiguration
.
class
)
.
run
(
assertDiscoverer
((
discoverer
)
->
{
.
run
(
assertDiscoverer
((
discoverer
)
->
{
Collection
<
ExposableServletEndpoint
>
endpoints
=
discoverer
.
getEndpoints
();
Collection
<
ExposableServletEndpoint
>
endpoints
=
discoverer
.
getEndpoints
();
List
<
EndpointId
>
ids
=
endpoints
.
stream
().
map
(
ExposableEndpoint:
:
getEndpointId
)
List
<
EndpointId
>
ids
=
endpoints
.
stream
().
map
(
Exposable
Servlet
Endpoint:
:
getEndpointId
)
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
assertThat
(
ids
).
containsOnly
(
EndpointId
.
of
(
"testservlet"
));
assertThat
(
ids
).
containsOnly
(
EndpointId
.
of
(
"testservlet"
));
}));
}));
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/context/ConfigurationPropertiesAutoConfigurationTests.java
View file @
9636350b
...
@@ -46,13 +46,13 @@ class ConfigurationPropertiesAutoConfigurationTests {
...
@@ -46,13 +46,13 @@ class ConfigurationPropertiesAutoConfigurationTests {
@Test
@Test
void
processAnnotatedBean
()
{
void
processAnnotatedBean
()
{
load
(
new
Class
[]
{
AutoConfig
.
class
,
SampleBean
.
class
},
"foo.name:test"
);
load
(
new
Class
<?>
[]
{
AutoConfig
.
class
,
SampleBean
.
class
},
"foo.name:test"
);
assertThat
(
this
.
context
.
getBean
(
SampleBean
.
class
).
getName
()).
isEqualTo
(
"test"
);
assertThat
(
this
.
context
.
getBean
(
SampleBean
.
class
).
getName
()).
isEqualTo
(
"test"
);
}
}
@Test
@Test
void
processAnnotatedBeanNoAutoConfig
()
{
void
processAnnotatedBeanNoAutoConfig
()
{
load
(
new
Class
[]
{
SampleBean
.
class
},
"foo.name:test"
);
load
(
new
Class
<?>
[]
{
SampleBean
.
class
},
"foo.name:test"
);
assertThat
(
this
.
context
.
getBean
(
SampleBean
.
class
).
getName
()).
isEqualTo
(
"default"
);
assertThat
(
this
.
context
.
getBean
(
SampleBean
.
class
).
getName
()).
isEqualTo
(
"default"
);
}
}
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/error/BasicErrorControllerIntegrationTests.java
View file @
9636350b
...
@@ -136,6 +136,7 @@ class BasicErrorControllerIntegrationTests {
...
@@ -136,6 +136,7 @@ class BasicErrorControllerIntegrationTests {
}
}
@Test
@Test
@SuppressWarnings
(
"rawtypes"
)
void
testErrorForMachineClientAlwaysParamsWithoutMessage
()
{
void
testErrorForMachineClientAlwaysParamsWithoutMessage
()
{
load
(
"--server.error.include-exception=true"
,
"--server.error.include-message=always"
);
load
(
"--server.error.include-exception=true"
,
"--server.error.include-message=always"
);
ResponseEntity
<
Map
>
entity
=
new
TestRestTemplate
().
getForEntity
(
createUrl
(
"/noMessage"
),
Map
.
class
);
ResponseEntity
<
Map
>
entity
=
new
TestRestTemplate
().
getForEntity
(
createUrl
(
"/noMessage"
),
Map
.
class
);
...
...
spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/DependencyManagementBomTransformation.java
View file @
9636350b
...
@@ -159,7 +159,7 @@ public class DependencyManagementBomTransformation extends AnnotatedNodeASTTrans
...
@@ -159,7 +159,7 @@ public class DependencyManagementBomTransformation extends AnnotatedNodeASTTrans
}
}
private
void
updateDependencyResolutionContext
(
List
<
Map
<
String
,
String
>>
bomDependencies
)
{
private
void
updateDependencyResolutionContext
(
List
<
Map
<
String
,
String
>>
bomDependencies
)
{
URI
[]
uris
=
Grape
.
getInstance
().
resolve
(
null
,
bomDependencies
.
toArray
(
new
Map
[
0
]));
URI
[]
uris
=
Grape
.
getInstance
().
resolve
(
null
,
bomDependencies
.
toArray
(
new
Map
<?,
?>
[
0
]));
DefaultModelBuilder
modelBuilder
=
new
DefaultModelBuilderFactory
().
newInstance
();
DefaultModelBuilder
modelBuilder
=
new
DefaultModelBuilderFactory
().
newInstance
();
for
(
URI
uri
:
uris
)
{
for
(
URI
uri
:
uris
)
{
try
{
try
{
...
...
spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/web/servlet/SpringBootMockMvcBuilderCustomizer.java
View file @
9636350b
...
@@ -109,7 +109,7 @@ public class SpringBootMockMvcBuilderCustomizer implements MockMvcBuilderCustomi
...
@@ -109,7 +109,7 @@ public class SpringBootMockMvcBuilderCustomizer implements MockMvcBuilderCustomi
private
void
addFilters
(
ConfigurableMockMvcBuilder
<?>
builder
)
{
private
void
addFilters
(
ConfigurableMockMvcBuilder
<?>
builder
)
{
FilterRegistrationBeans
registrations
=
new
FilterRegistrationBeans
(
this
.
context
);
FilterRegistrationBeans
registrations
=
new
FilterRegistrationBeans
(
this
.
context
);
registrations
.
stream
().
map
(
AbstractFilterRegistrationBean
.
class
::
cast
)
registrations
.
stream
().
map
(
AbstractFilterRegistrationBean
.
class
::
cast
)
.
filter
(
AbstractFilterRegistrationBean:
:
isEnabled
)
.
filter
(
AbstractFilterRegistrationBean
<?>
::
isEnabled
)
.
forEach
((
registration
)
->
addFilter
(
builder
,
registration
));
.
forEach
((
registration
)
->
addFilter
(
builder
,
registration
));
}
}
...
...
spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/webservices/client/WebServiceClientExcludeFilter.java
View file @
9636350b
...
@@ -36,7 +36,7 @@ public final class WebServiceClientExcludeFilter
...
@@ -36,7 +36,7 @@ public final class WebServiceClientExcludeFilter
protected
WebServiceClientExcludeFilter
(
Class
<?>
testClass
)
{
protected
WebServiceClientExcludeFilter
(
Class
<?>
testClass
)
{
super
(
testClass
);
super
(
testClass
);
this
.
components
=
getAnnotation
().
getValue
(
"components"
,
Class
[].
class
).
orElse
(
new
Class
[
0
]);
this
.
components
=
getAnnotation
().
getValue
(
"components"
,
Class
[].
class
).
orElse
(
new
Class
<?>
[
0
]);
}
}
@Override
@Override
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java
View file @
9636350b
...
@@ -310,7 +310,7 @@ public class SpringApplication {
...
@@ -310,7 +310,7 @@ public class SpringApplication {
Banner
printedBanner
=
printBanner
(
environment
);
Banner
printedBanner
=
printBanner
(
environment
);
context
=
createApplicationContext
();
context
=
createApplicationContext
();
exceptionReporters
=
getSpringFactoriesInstances
(
SpringBootExceptionReporter
.
class
,
exceptionReporters
=
getSpringFactoriesInstances
(
SpringBootExceptionReporter
.
class
,
new
Class
[]
{
ConfigurableApplicationContext
.
class
},
context
);
new
Class
<?>
[]
{
ConfigurableApplicationContext
.
class
},
context
);
prepareContext
(
context
,
environment
,
listeners
,
applicationArguments
,
printedBanner
);
prepareContext
(
context
,
environment
,
listeners
,
applicationArguments
,
printedBanner
);
refreshContext
(
context
);
refreshContext
(
context
);
afterRefresh
(
context
,
applicationArguments
);
afterRefresh
(
context
,
applicationArguments
);
...
...
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/ConfigurationPropertiesTests.java
View file @
9636350b
...
@@ -257,7 +257,7 @@ class ConfigurationPropertiesTests {
...
@@ -257,7 +257,7 @@ class ConfigurationPropertiesTests {
AnnotationConfigApplicationContext
parent
=
load
(
BasicConfiguration
.
class
,
"name=parent"
);
AnnotationConfigApplicationContext
parent
=
load
(
BasicConfiguration
.
class
,
"name=parent"
);
this
.
context
=
new
AnnotationConfigApplicationContext
();
this
.
context
=
new
AnnotationConfigApplicationContext
();
this
.
context
.
setParent
(
parent
);
this
.
context
.
setParent
(
parent
);
load
(
new
Class
[]
{
BasicConfiguration
.
class
,
BasicPropertiesConsumer
.
class
},
"name=child"
);
load
(
new
Class
<?>
[]
{
BasicConfiguration
.
class
,
BasicPropertiesConsumer
.
class
},
"name=child"
);
assertThat
(
this
.
context
.
getBean
(
BasicProperties
.
class
)).
isNotNull
();
assertThat
(
this
.
context
.
getBean
(
BasicProperties
.
class
)).
isNotNull
();
assertThat
(
parent
.
getBean
(
BasicProperties
.
class
)).
isNotNull
();
assertThat
(
parent
.
getBean
(
BasicProperties
.
class
)).
isNotNull
();
assertThat
(
this
.
context
.
getBean
(
BasicPropertiesConsumer
.
class
).
getName
()).
isEqualTo
(
"parent"
);
assertThat
(
this
.
context
.
getBean
(
BasicPropertiesConsumer
.
class
).
getName
()).
isEqualTo
(
"parent"
);
...
...
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/jta/atomikos/AtomikosPropertiesTests.java
View file @
9636350b
...
@@ -97,7 +97,7 @@ class AtomikosPropertiesTests {
...
@@ -97,7 +97,7 @@ class AtomikosPropertiesTests {
}
}
private
MapEntry
<?,
?>[]
defaultOf
(
Properties
defaultSettings
,
String
...
keys
)
{
private
MapEntry
<?,
?>[]
defaultOf
(
Properties
defaultSettings
,
String
...
keys
)
{
MapEntry
<?,
?>[]
entries
=
new
MapEntry
[
keys
.
length
];
MapEntry
<?,
?>[]
entries
=
new
MapEntry
<?,
?>
[
keys
.
length
];
for
(
int
i
=
0
;
i
<
keys
.
length
;
i
++)
{
for
(
int
i
=
0
;
i
<
keys
.
length
;
i
++)
{
String
key
=
keys
[
i
];
String
key
=
keys
[
i
];
entries
[
i
]
=
entry
(
key
,
defaultSettings
.
get
(
key
));
entries
[
i
]
=
entry
(
key
,
defaultSettings
.
get
(
key
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment