Declare 'vcapApplicationProperties' class member field as final.
Declare 'loadVcapApplicationProperties()' and 'unsetTestAutoConfiguredPoolServersPortSystemProperty()' methods as private.
This commit is contained in:
@@ -46,10 +46,12 @@ import org.springframework.util.StringUtils;
|
||||
|
||||
import example.echo.config.EchoClientConfiguration;
|
||||
import example.echo.config.EchoServerConfiguration;
|
||||
import lombok.Data;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.Getter;
|
||||
import lombok.NonNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
/**
|
||||
@@ -162,15 +164,16 @@ public abstract class AbstractAutoConfiguredSecurityContextIntegrationTests
|
||||
}
|
||||
}
|
||||
|
||||
@Data
|
||||
@Getter
|
||||
@ToString(of = "name")
|
||||
@EqualsAndHashCode(of = "name")
|
||||
@RequiredArgsConstructor(staticName = "with")
|
||||
static class User implements Principal, Serializable {
|
||||
|
||||
@NonNull
|
||||
private String name;
|
||||
private final String name;
|
||||
|
||||
@Setter(AccessLevel.PRIVATE)
|
||||
private String password;
|
||||
|
||||
User having(String password) {
|
||||
|
||||
@@ -77,7 +77,7 @@ public class AutoConfiguredCloudSecurityContextIntegrationTests
|
||||
unsetTestAutoConfiguredPoolServersPortSystemProperty();
|
||||
}
|
||||
|
||||
public static void loadVcapApplicationProperties() throws IOException {
|
||||
private static void loadVcapApplicationProperties() throws IOException {
|
||||
|
||||
vcapApplicationProperties.load(new ClassPathResource(VCAP_APPLICATION_PROPERTIES).getInputStream());
|
||||
|
||||
@@ -85,7 +85,7 @@ public class AutoConfiguredCloudSecurityContextIntegrationTests
|
||||
System.setProperty(property, vcapApplicationProperties.getProperty(property)));
|
||||
}
|
||||
|
||||
public static void unsetTestAutoConfiguredPoolServersPortSystemProperty() {
|
||||
private static void unsetTestAutoConfiguredPoolServersPortSystemProperty() {
|
||||
System.clearProperty(GEMFIRE_POOL_SERVERS_PROPERTY);
|
||||
}
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ public class AutoConfiguredHybridSecurityContextIntegrationTests
|
||||
unsetTestAutoConfiguredPoolServersPortSystemProperty();
|
||||
}
|
||||
|
||||
public static void loadVcapApplicationProperties() throws IOException {
|
||||
private static void loadVcapApplicationProperties() throws IOException {
|
||||
|
||||
vcapApplicationProperties.load(new ClassPathResource(VCAP_APPLICATION_PROPERTIES).getInputStream());
|
||||
|
||||
@@ -93,7 +93,7 @@ public class AutoConfiguredHybridSecurityContextIntegrationTests
|
||||
System.setProperty(property, vcapApplicationProperties.getProperty(property)));
|
||||
}
|
||||
|
||||
public static void unsetTestAutoConfiguredPoolServersPortSystemProperty() {
|
||||
private static void unsetTestAutoConfiguredPoolServersPortSystemProperty() {
|
||||
System.clearProperty(GEMFIRE_POOL_SERVERS_PROPERTY);
|
||||
}
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ public class AutoConfiguredMultiCloudCacheServiceInstanceSecurityContextIntegrat
|
||||
|
||||
private static final String VCAP_APPLICATION_PROPERTIES = "application-vcap-multi.properties";
|
||||
|
||||
private static Properties vcapApplicationProperties = new Properties();
|
||||
private static final Properties vcapApplicationProperties = new Properties();
|
||||
|
||||
@BeforeClass
|
||||
public static void startGemFireServer() throws IOException {
|
||||
@@ -74,7 +74,7 @@ public class AutoConfiguredMultiCloudCacheServiceInstanceSecurityContextIntegrat
|
||||
unsetTestAutoConfiguredPoolServersPortSystemProperty();
|
||||
}
|
||||
|
||||
public static void loadVcapApplicationProperties() throws IOException {
|
||||
private static void loadVcapApplicationProperties() throws IOException {
|
||||
|
||||
vcapApplicationProperties.load(new ClassPathResource(VCAP_APPLICATION_PROPERTIES).getInputStream());
|
||||
|
||||
@@ -82,7 +82,7 @@ public class AutoConfiguredMultiCloudCacheServiceInstanceSecurityContextIntegrat
|
||||
System.setProperty(property, vcapApplicationProperties.getProperty(property)));
|
||||
}
|
||||
|
||||
public static void unsetTestAutoConfiguredPoolServersPortSystemProperty() {
|
||||
private static void unsetTestAutoConfiguredPoolServersPortSystemProperty() {
|
||||
System.clearProperty(GEMFIRE_POOL_SERVERS_PROPERTY);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user