Skip to content

Commit

Permalink
Remove deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
jodastephen committed Aug 19, 2024
1 parent c7ba6ef commit 30939db
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/test/java/org/joda/money/TestCurrencyUnit.java
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ void test_factory_of_Locale_nullLocale() {
@Test
void test_factory_of_Locale_unknownCurrency() {
assertThatExceptionOfType(IllegalCurrencyException.class)
.isThrownBy(() -> CurrencyUnit.of(new Locale("en", "XY")))
.isThrownBy(() -> CurrencyUnit.of(Locale.of("en", "XY")))
.withMessage("No currency found for locale 'en_XY'");
}

Expand Down
6 changes: 3 additions & 3 deletions src/test/java/org/joda/money/format/TestMoneyAmountStyle.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
class TestMoneyAmountStyle {

private static final Locale cCachedLocale = Locale.getDefault();
private static final Locale TEST_GB_LOCALE = new Locale("en", "GB", "TEST");
private static final Locale TEST_DE_LOCALE = new Locale("de", "DE", "TEST");
private static final Locale TEST_LV_LOCALE = new Locale("lv", "LV", "TEST");
private static final Locale TEST_GB_LOCALE = Locale.of("en", "GB", "TEST");
private static final Locale TEST_DE_LOCALE = Locale.of("de", "DE", "TEST");
private static final Locale TEST_LV_LOCALE = Locale.of("lv", "LV", "TEST");
private static final BigMoney MONEY = BigMoney.of(CurrencyUnit.GBP, new BigDecimal("87654321.12345678"));

@BeforeEach
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/org/joda/money/format/TestMoneyFormatter.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
class TestMoneyFormatter {

private static final Locale cCachedLocale = Locale.getDefault();
private static final Locale TEST_GB_LOCALE = new Locale("en", "GB", "TEST");
private static final Locale TEST_FR_LOCALE = new Locale("fr", "FR", "TEST");
private static final Locale TEST_GB_LOCALE = Locale.of("en", "GB", "TEST");
private static final Locale TEST_FR_LOCALE = Locale.of("fr", "FR", "TEST");
private static final Money MONEY_GBP_12_34 = Money.parse("GBP 12.34");
private MoneyFormatter iPrintTest;
private MoneyFormatter iCannotPrint;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ class TestMoneyFormatterBuilder {
private static final Money JPY_2345 = Money.parse("JPY 2345");

private static final Locale cCachedLocale = Locale.getDefault();
private static final Locale TEST_GB_LOCALE = new Locale("en", "GB", "TEST");
private static final Locale TEST_FR_LOCALE = new Locale("fr", "FR", "TEST");
private static final Locale TEST_GB_LOCALE = Locale.of("en", "GB", "TEST");
private static final Locale TEST_FR_LOCALE = Locale.of("fr", "FR", "TEST");
private static final DecimalFormatSymbols FR_SYMBOLS = new DecimalFormatSymbols(Locale.FRANCE);
private static final char FR_DECIMAL = FR_SYMBOLS.getMonetaryDecimalSeparator();
private static final char FR_GROUP = FR_SYMBOLS.getGroupingSeparator();
Expand Down

0 comments on commit 30939db

Please sign in to comment.