File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed
hivemq-edge/src/main/java/com/hivemq/common/i18n Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change 2121import java .util .Map ;
2222
2323public interface I18nError {
24- @ NotNull String get ();
24+ default @ NotNull String get () {
25+ return get (Map .of ());
26+ }
2527
2628 @ NotNull String get (final @ NotNull Map <String , Object > map );
2729
Original file line number Diff line number Diff line change @@ -45,18 +45,13 @@ public enum I18nHttpError implements I18nError {
4545 private static final @ NotNull String RESOURCE_NAME_SUFFIX = ".properties" ;
4646 private static final I18nErrorTemplate TEMPLATE =
4747 new I18nErrorTemplate (locale -> RESOURCE_NAME_PREFIX + locale + RESOURCE_NAME_SUFFIX );
48-
48+
4949 private final @ NotNull String key ;
5050
5151 I18nHttpError () {
5252 key = name ().toLowerCase ().replace ("_" , "." );
5353 }
5454
55- @ Override
56- public @ NotNull String get () {
57- return get (Map .of ());
58- }
59-
6055 @ Override
6156 public @ NotNull String get (final @ NotNull Map <String , Object > map ) {
6257 return TEMPLATE .get (this , map );
You can’t perform that action at this time.
0 commit comments