Polishing
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
* Copyright 2002-2023 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -46,7 +46,6 @@ class DynamicPropertiesContextCustomizer implements ContextCustomizer {
|
||||
|
||||
private static final String PROPERTY_SOURCE_NAME = "Dynamic Test Properties";
|
||||
|
||||
|
||||
private final Set<Method> methods;
|
||||
|
||||
|
||||
@@ -65,9 +64,7 @@ class DynamicPropertiesContextCustomizer implements ContextCustomizer {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void customizeContext(ConfigurableApplicationContext context,
|
||||
MergedContextConfiguration mergedConfig) {
|
||||
|
||||
public void customizeContext(ConfigurableApplicationContext context, MergedContextConfiguration mergedConfig) {
|
||||
MutablePropertySources sources = context.getEnvironment().getPropertySources();
|
||||
sources.addFirst(new DynamicValuesPropertySource(PROPERTY_SOURCE_NAME, buildDynamicPropertiesMap()));
|
||||
}
|
||||
@@ -90,10 +87,6 @@ class DynamicPropertiesContextCustomizer implements ContextCustomizer {
|
||||
return this.methods;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.methods.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
@@ -106,4 +99,9 @@ class DynamicPropertiesContextCustomizer implements ContextCustomizer {
|
||||
return this.methods.equals(((DynamicPropertiesContextCustomizer) obj).methods);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.methods.hashCode();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user