Skip to content

Commit

Permalink
Deprecates NLS.getDefaultLanguage.
Browse files Browse the repository at this point in the history
It will also be replaced by an appropriate solution in UserManager of sirius-web.

Fixes: SIRI-368
  • Loading branch information
Christian Schierle committed Jun 24, 2021
1 parent cc81176 commit 76d2a81
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/sirius/kernel/async/CallContext.java
Expand Up @@ -9,6 +9,7 @@
package sirius.kernel.async;

import sirius.kernel.Sirius;
import sirius.kernel.commons.Explain;
import sirius.kernel.commons.Strings;
import sirius.kernel.commons.Tuple;
import sirius.kernel.commons.Value;
Expand Down Expand Up @@ -359,6 +360,8 @@ public <C extends SubContext> void set(Class<C> contextType, C instance) {
*
* @return a two-letter language code used for the current thread.
*/
@SuppressWarnings("deprecation")
@Explain("The replacement for NLS.getDefaultLanguage() is only available in sirius-web.")
public String getLang() {
if (lang == null) {
invokeLazyLanguageInstaller();
Expand Down
1 change: 1 addition & 0 deletions src/main/java/sirius/kernel/nls/NLS.java
Expand Up @@ -131,6 +131,7 @@ public static String getCurrentLang() {
* @return the language code of the default language
*/
@Nonnull
@Deprecated
public static String getDefaultLanguage() {
if (defaultLanguage != null) {
return defaultLanguage;
Expand Down

0 comments on commit 76d2a81

Please sign in to comment.