diff --git a/spring-context/src/main/java/org/springframework/context/support/StaticMessageSource.java b/spring-context/src/main/java/org/springframework/context/support/StaticMessageSource.java index 26df79d7b71183f2b3af820ad1c5f25929e307c8..5f2596b4cf0985399370c9d16b5141e6f053e0fa 100644 --- a/spring-context/src/main/java/org/springframework/context/support/StaticMessageSource.java +++ b/spring-context/src/main/java/org/springframework/context/support/StaticMessageSource.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * Copyright 2002-2019 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. @@ -43,6 +43,7 @@ public class StaticMessageSource extends AbstractMessageSource { @Override + @Nullable protected String resolveCodeWithoutArguments(String code, Locale locale) { return this.messages.get(code + '_' + locale.toString()); } diff --git a/spring-context/src/test/java/org/springframework/context/support/StaticMessageSourceTests.java b/spring-context/src/test/java/org/springframework/context/support/StaticMessageSourceTests.java index b5bb82ebe7e81c86ceef31fcfb7494a000209dae..68d0dcf317c2025c45e45d6d606a9e780a074c24 100644 --- a/spring-context/src/test/java/org/springframework/context/support/StaticMessageSourceTests.java +++ b/spring-context/src/test/java/org/springframework/context/support/StaticMessageSourceTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2019 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. @@ -62,7 +62,6 @@ public class StaticMessageSourceTests extends AbstractApplicationContextTests { @Test @Override public void count() { - // These are only checked for current Ctx (not parent ctx) assertCount(15); }