Commit aae38db9 authored by Phillip Webb's avatar Phillip Webb

Fix compiler warnings only shown in Eclipse Mars

parent a0fc90a5
...@@ -44,7 +44,7 @@ import static org.mockito.Mockito.mock; ...@@ -44,7 +44,7 @@ import static org.mockito.Mockito.mock;
public class MockCachingProvider implements CachingProvider { public class MockCachingProvider implements CachingProvider {
@Override @Override
@SuppressWarnings({ "rawtypes", "unchecked" }) @SuppressWarnings("rawtypes")
public CacheManager getCacheManager(URI uri, ClassLoader classLoader, public CacheManager getCacheManager(URI uri, ClassLoader classLoader,
Properties properties) { Properties properties) {
CacheManager cacheManager = mock(CacheManager.class); CacheManager cacheManager = mock(CacheManager.class);
......
...@@ -140,6 +140,7 @@ public class BasicErrorControllerIntegrationTests { ...@@ -140,6 +140,7 @@ public class BasicErrorControllerIntegrationTests {
} }
@Test @Test
@SuppressWarnings("rawtypes")
public void testErrorForAnnotatedNoReasonException() throws Exception { public void testErrorForAnnotatedNoReasonException() throws Exception {
load(); load();
ResponseEntity<Map> entity = new TestRestTemplate() ResponseEntity<Map> entity = new TestRestTemplate()
......
...@@ -20,9 +20,7 @@ import java.util.Map; ...@@ -20,9 +20,7 @@ import java.util.Map;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; 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.IntegrationTest;
import org.springframework.boot.test.SpringApplicationConfiguration; import org.springframework.boot.test.SpringApplicationConfiguration;
import org.springframework.boot.test.TestRestTemplate; import org.springframework.boot.test.TestRestTemplate;
...@@ -48,9 +46,6 @@ import static org.junit.Assert.assertTrue; ...@@ -48,9 +46,6 @@ import static org.junit.Assert.assertTrue;
@DirtiesContext @DirtiesContext
public class ManagementAddressActuatorApplicationTests { public class ManagementAddressActuatorApplicationTests {
@Autowired
private SecurityProperties security;
@Value("${local.server.port}") @Value("${local.server.port}")
private int port = 9010; private int port = 9010;
......
...@@ -20,7 +20,6 @@ import org.junit.Before; ...@@ -20,7 +20,6 @@ import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.actuate.endpoint.mvc.MvcEndpoints;
import org.springframework.boot.test.SpringApplicationConfiguration; import org.springframework.boot.test.SpringApplicationConfiguration;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.annotation.DirtiesContext;
...@@ -45,9 +44,6 @@ public class SampleHypermediaJpaApplicationIntegrationTests { ...@@ -45,9 +44,6 @@ public class SampleHypermediaJpaApplicationIntegrationTests {
@Autowired @Autowired
private WebApplicationContext context; private WebApplicationContext context;
@Autowired
private MvcEndpoints mvcEndpoints;
private MockMvc mockMvc; private MockMvc mockMvc;
@Before @Before
......
...@@ -19,7 +19,6 @@ package sample.web.secure.custom; ...@@ -19,7 +19,6 @@ package sample.web.secure.custom;
import java.util.Date; import java.util.Date;
import java.util.Map; import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.security.SecurityProperties; import org.springframework.boot.autoconfigure.security.SecurityProperties;
import org.springframework.boot.builder.SpringApplicationBuilder; import org.springframework.boot.builder.SpringApplicationBuilder;
...@@ -69,9 +68,6 @@ public class SampleWebSecureCustomApplication extends WebMvcConfigurerAdapter { ...@@ -69,9 +68,6 @@ public class SampleWebSecureCustomApplication extends WebMvcConfigurerAdapter {
@Order(SecurityProperties.ACCESS_OVERRIDE_ORDER) @Order(SecurityProperties.ACCESS_OVERRIDE_ORDER)
protected static class ApplicationSecurity extends WebSecurityConfigurerAdapter { protected static class ApplicationSecurity extends WebSecurityConfigurerAdapter {
@Autowired
private SecurityProperties security;
@Override @Override
protected void configure(HttpSecurity http) throws Exception { protected void configure(HttpSecurity http) throws Exception {
http.authorizeRequests().antMatchers("/css/**").permitAll().anyRequest() http.authorizeRequests().antMatchers("/css/**").permitAll().anyRequest()
......
...@@ -71,9 +71,6 @@ public class SampleWebSecureCustomApplication extends WebMvcConfigurerAdapter { ...@@ -71,9 +71,6 @@ public class SampleWebSecureCustomApplication extends WebMvcConfigurerAdapter {
@Order(SecurityProperties.ACCESS_OVERRIDE_ORDER) @Order(SecurityProperties.ACCESS_OVERRIDE_ORDER)
protected static class ApplicationSecurity extends WebSecurityConfigurerAdapter { protected static class ApplicationSecurity extends WebSecurityConfigurerAdapter {
@Autowired
private SecurityProperties security;
@Autowired @Autowired
private DataSource dataSource; private DataSource dataSource;
......
...@@ -19,7 +19,6 @@ package sample.web.secure; ...@@ -19,7 +19,6 @@ package sample.web.secure;
import java.util.Date; import java.util.Date;
import java.util.Map; import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.security.SecurityProperties; import org.springframework.boot.autoconfigure.security.SecurityProperties;
import org.springframework.boot.builder.SpringApplicationBuilder; import org.springframework.boot.builder.SpringApplicationBuilder;
...@@ -65,9 +64,6 @@ public class SampleWebSecureApplication extends WebMvcConfigurerAdapter { ...@@ -65,9 +64,6 @@ public class SampleWebSecureApplication extends WebMvcConfigurerAdapter {
@Order(SecurityProperties.ACCESS_OVERRIDE_ORDER) @Order(SecurityProperties.ACCESS_OVERRIDE_ORDER)
protected static class ApplicationSecurity extends WebSecurityConfigurerAdapter { protected static class ApplicationSecurity extends WebSecurityConfigurerAdapter {
@Autowired
private SecurityProperties security;
@Override @Override
protected void configure(HttpSecurity http) throws Exception { protected void configure(HttpSecurity http) throws Exception {
http.authorizeRequests().anyRequest().fullyAuthenticated().and().formLogin() http.authorizeRequests().anyRequest().fullyAuthenticated().and().formLogin()
......
...@@ -243,7 +243,6 @@ public class RandomAccessDataFile implements RandomAccessData { ...@@ -243,7 +243,6 @@ public class RandomAccessDataFile implements RandomAccessData {
this.files = new ConcurrentLinkedQueue<RandomAccessFile>(); this.files = new ConcurrentLinkedQueue<RandomAccessFile>();
} }
@SuppressWarnings("resource")
public RandomAccessFile acquire() throws IOException { public RandomAccessFile acquire() throws IOException {
try { try {
this.available.acquire(); this.available.acquire();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment