Reduce warning messages in unit tests.
We get a warning on any attempt to use anything that may be affected by DeveloperSettings, because DeveloperSetting tries to use ConfigurationProperties to find its properties file. We could avoid this by requiring the use of a ConfigurationPropertiesStub, but it seems to make more sense to routinely create a DeveloperSettingsStub on each ServletContextStub.
This commit is contained in:
parent
0b43a44097
commit
70298026ea
3 changed files with 42 additions and 2 deletions
|
@ -179,7 +179,7 @@ public class DeveloperSettings {
|
|||
// The factory
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
private static final String ATTRIBUTE_NAME = DeveloperSettings.class
|
||||
protected static final String ATTRIBUTE_NAME = DeveloperSettings.class
|
||||
.getName();
|
||||
|
||||
public static DeveloperSettings getBean(HttpServletRequest req) {
|
||||
|
@ -203,7 +203,7 @@ public class DeveloperSettings {
|
|||
|
||||
private final Map<Keys, Object> settings = new EnumMap<>(Keys.class);
|
||||
|
||||
private DeveloperSettings(ServletContext ctx) {
|
||||
protected DeveloperSettings(ServletContext ctx) {
|
||||
updateFromFile(ctx);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue