Fix compiler warnings
This commit is contained in:
@@ -3,11 +3,11 @@ package org.springframework.cloud.autoconfigure;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import org.springframework.boot.WebApplicationType;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
import org.springframework.boot.test.rule.OutputCapture;
|
||||
import org.springframework.cloud.endpoint.event.RefreshEventListener;
|
||||
import org.springframework.cloud.test.ClassPathExclusions;
|
||||
import org.springframework.cloud.test.ModifiedClassPathRunner;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
|
||||
@@ -118,7 +118,6 @@ public class ContextRefresherTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("unchecked")
|
||||
public void commandLineArgsPassedToBootstrapConfiguration() {
|
||||
|
||||
TestBootstrapConfiguration.fooSightings = new ArrayList<>();
|
||||
|
||||
@@ -43,7 +43,8 @@ public class RefreshScopeNullBeanIntegrationTests {
|
||||
@Test
|
||||
@DirtiesContext
|
||||
public void testRefreshBean() {
|
||||
assertThat(this.myCustomComponent).isNotNull();
|
||||
assertThat(this.myCustomComponent.optionalService).isNotNull();
|
||||
assertThat(this.scope).isNotNull();
|
||||
// ...and then refresh, so the bean is re-initialized:
|
||||
// this.scope.refreshAll();
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ import java.util.Collections;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.mockito.BDDMockito;
|
||||
|
||||
import org.springframework.beans.factory.ObjectProvider;
|
||||
import org.springframework.boot.actuate.health.Status;
|
||||
import org.springframework.cloud.context.properties.ConfigurationPropertiesRebinder;
|
||||
@@ -35,6 +36,7 @@ import static org.mockito.Mockito.when;
|
||||
*/
|
||||
public class RefreshScopeHealthIndicatorTests {
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private ObjectProvider<RefreshScope> scopeProvider = mock(ObjectProvider.class);
|
||||
private ConfigurationPropertiesRebinder rebinder =
|
||||
mock(ConfigurationPropertiesRebinder.class);
|
||||
|
||||
Reference in New Issue
Block a user