Skip to content

Commit

Permalink
Update Annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
mercyblitz committed Apr 9, 2024
1 parent 1c9d786 commit 0fb3427
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
import org.springframework.beans.factory.ListableBeanFactory;
import org.springframework.beans.factory.ObjectProvider;
import org.springframework.context.i18n.LocaleContextHolder;
import org.springframework.lang.NonNull;

import javax.annotation.Nonnull;
import java.nio.charset.Charset;
import java.util.LinkedList;
import java.util.List;
Expand Down Expand Up @@ -59,7 +59,7 @@ public void afterPropertiesSet() throws Exception {
init();
}

@Nonnull
@NonNull
@Override
public String getMessage(String code, Locale locale, Object... args) {
return this.delegate.getMessage(code, locale, args);
Expand All @@ -70,20 +70,20 @@ public String getMessage(String code, Object... args) {
return this.delegate.getMessage(code, args);
}

@Nonnull
@NonNull
@Override
public Locale getLocale() {
Locale locale = LocaleContextHolder.getLocale();
return locale == null ? this.delegate.getLocale() : locale;
}

@Nonnull
@NonNull
@Override
public Locale getDefaultLocale() {
return this.delegate.getDefaultLocale();
}

@Nonnull
@NonNull
@Override
public List<Locale> getSupportedLocales() {
return this.delegate.getSupportedLocales();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import org.springframework.context.i18n.LocaleContextHolder;
import org.springframework.core.env.Environment;
import org.springframework.core.env.PropertySources;
import org.springframework.lang.Nullable;

import javax.annotation.Nullable;
import java.io.IOException;
import java.io.Reader;
import java.io.StringReader;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
import org.springframework.core.Ordered;
import org.springframework.core.env.ConfigurableEnvironment;
import org.springframework.core.env.Environment;
import org.springframework.lang.NonNull;
import org.springframework.util.Assert;
import org.springframework.util.StringUtils;

import javax.annotation.Nonnull;
import java.lang.reflect.Constructor;
import java.nio.charset.Charset;
import java.util.ArrayList;
Expand Down Expand Up @@ -105,7 +105,7 @@ public void destroy() {
this.delegate.destroy();
}

@Nonnull
@NonNull
@Override
public String getMessage(String code, Locale locale, Object... args) {
return this.delegate.getMessage(code, locale, args);
Expand All @@ -116,7 +116,7 @@ public String getMessage(String code, Object... args) {
return this.delegate.getMessage(code, args);
}

@Nonnull
@NonNull
@Override
public Locale getLocale() {
Locale locale = LocaleContextHolder.getLocale();
Expand All @@ -126,13 +126,13 @@ public Locale getLocale() {
return locale;
}

@Nonnull
@NonNull
@Override
public Locale getDefaultLocale() {
return this.delegate.getDefaultLocale();
}

@Nonnull
@NonNull
@Override
public List<Locale> getSupportedLocales() {
return this.delegate.getSupportedLocales();
Expand Down

0 comments on commit 0fb3427

Please sign in to comment.