Fix compiler warnings only shown in Eclipse Mars

This commit is contained in:
Phillip Webb 2015-10-07 11:12:27 -07:00
parent a0fc90a5ec
commit aae38db9af
8 changed files with 2 additions and 22 deletions

View File

@ -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);

View File

@ -140,6 +140,7 @@ public class BasicErrorControllerIntegrationTests {
}
@Test
@SuppressWarnings("rawtypes")
public void testErrorForAnnotatedNoReasonException() throws Exception {
load();
ResponseEntity<Map> entity = new TestRestTemplate()

View File

@ -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;

View File

@ -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

View File

@ -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()

View File

@ -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;

View File

@ -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()

View File

@ -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();