mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-07-15 01:07:30 +08:00
Fix compiler warnings only shown in Eclipse Mars
This commit is contained in:
parent
a0fc90a5ec
commit
aae38db9af
@ -44,7 +44,7 @@ import static org.mockito.Mockito.mock;
|
||||
public class MockCachingProvider implements CachingProvider {
|
||||
|
||||
@Override
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
@SuppressWarnings("rawtypes")
|
||||
public CacheManager getCacheManager(URI uri, ClassLoader classLoader,
|
||||
Properties properties) {
|
||||
CacheManager cacheManager = mock(CacheManager.class);
|
||||
|
@ -140,6 +140,7 @@ public class BasicErrorControllerIntegrationTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("rawtypes")
|
||||
public void testErrorForAnnotatedNoReasonException() throws Exception {
|
||||
load();
|
||||
ResponseEntity<Map> entity = new TestRestTemplate()
|
||||
|
@ -20,9 +20,7 @@ import java.util.Map;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.autoconfigure.security.SecurityProperties;
|
||||
import org.springframework.boot.test.IntegrationTest;
|
||||
import org.springframework.boot.test.SpringApplicationConfiguration;
|
||||
import org.springframework.boot.test.TestRestTemplate;
|
||||
@ -48,9 +46,6 @@ import static org.junit.Assert.assertTrue;
|
||||
@DirtiesContext
|
||||
public class ManagementAddressActuatorApplicationTests {
|
||||
|
||||
@Autowired
|
||||
private SecurityProperties security;
|
||||
|
||||
@Value("${local.server.port}")
|
||||
private int port = 9010;
|
||||
|
||||
|
@ -20,7 +20,6 @@ import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.actuate.endpoint.mvc.MvcEndpoints;
|
||||
import org.springframework.boot.test.SpringApplicationConfiguration;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.test.annotation.DirtiesContext;
|
||||
@ -45,9 +44,6 @@ public class SampleHypermediaJpaApplicationIntegrationTests {
|
||||
@Autowired
|
||||
private WebApplicationContext context;
|
||||
|
||||
@Autowired
|
||||
private MvcEndpoints mvcEndpoints;
|
||||
|
||||
private MockMvc mockMvc;
|
||||
|
||||
@Before
|
||||
|
@ -19,7 +19,6 @@ package sample.web.secure.custom;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.security.SecurityProperties;
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
@ -69,9 +68,6 @@ public class SampleWebSecureCustomApplication extends WebMvcConfigurerAdapter {
|
||||
@Order(SecurityProperties.ACCESS_OVERRIDE_ORDER)
|
||||
protected static class ApplicationSecurity extends WebSecurityConfigurerAdapter {
|
||||
|
||||
@Autowired
|
||||
private SecurityProperties security;
|
||||
|
||||
@Override
|
||||
protected void configure(HttpSecurity http) throws Exception {
|
||||
http.authorizeRequests().antMatchers("/css/**").permitAll().anyRequest()
|
||||
|
@ -71,9 +71,6 @@ public class SampleWebSecureCustomApplication extends WebMvcConfigurerAdapter {
|
||||
@Order(SecurityProperties.ACCESS_OVERRIDE_ORDER)
|
||||
protected static class ApplicationSecurity extends WebSecurityConfigurerAdapter {
|
||||
|
||||
@Autowired
|
||||
private SecurityProperties security;
|
||||
|
||||
@Autowired
|
||||
private DataSource dataSource;
|
||||
|
||||
|
@ -19,7 +19,6 @@ package sample.web.secure;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.security.SecurityProperties;
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
@ -65,9 +64,6 @@ public class SampleWebSecureApplication extends WebMvcConfigurerAdapter {
|
||||
@Order(SecurityProperties.ACCESS_OVERRIDE_ORDER)
|
||||
protected static class ApplicationSecurity extends WebSecurityConfigurerAdapter {
|
||||
|
||||
@Autowired
|
||||
private SecurityProperties security;
|
||||
|
||||
@Override
|
||||
protected void configure(HttpSecurity http) throws Exception {
|
||||
http.authorizeRequests().anyRequest().fullyAuthenticated().and().formLogin()
|
||||
|
@ -243,7 +243,6 @@ public class RandomAccessDataFile implements RandomAccessData {
|
||||
this.files = new ConcurrentLinkedQueue<RandomAccessFile>();
|
||||
}
|
||||
|
||||
@SuppressWarnings("resource")
|
||||
public RandomAccessFile acquire() throws IOException {
|
||||
try {
|
||||
this.available.acquire();
|
||||
|
Loading…
Reference in New Issue
Block a user