Skip to content

Commit 9f7fd7e

Browse files
committed
Remove deprecated elements
#249
1 parent a32d228 commit 9f7fd7e

17 files changed

Lines changed: 11 additions & 1525 deletions

File tree

moneta-convert/moneta-convert-ecb/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
<groupId>org.apache.maven.plugins</groupId>
4343
<artifactId>maven-compiler-plugin</artifactId>
4444
<configuration>
45-
<release>9</release>
45+
<release>11</release>
4646
</configuration>
4747
<executions>
4848
<execution>

moneta-convert/moneta-convert-imf/src/main/java/org/javamoney/moneta/convert/imf/IMFHistoricRateProvider.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2012, 2015, Credit Suisse (Anatole Tresch), Werner Keil and others by the @author tag.
2+
Copyright (c) 2012, 2025, Credit Suisse, Werner Keil and others by the @author tag.
33
44
Licensed under the Apache License, Version 2.0 (the "License"); you may not
55
use this file except in compliance with the License. You may obtain a copy of
@@ -42,6 +42,7 @@
4242
/**
4343
* Find by historic from IMF
4444
* @author otaviojava
45+
* @author keilw
4546
* @since 1.0.1
4647
*/
4748
public class IMFHistoricRateProvider extends IMFAbstractRateProvider {
@@ -53,7 +54,6 @@ public class IMFHistoricRateProvider extends IMFAbstractRateProvider {
5354
private static final ProviderContext CONTEXT = ProviderContextBuilder.of("IMF-HIST", RateType.HISTORIC)
5455
.set("providerDescription", "Historic International Monetary Fund")
5556
.set("days", 0)
56-
//.set("User-Agent", "Chrome/51.0.2704.103") This was a URLConnection hack, OkHttp works without the User-Agent
5757
.build();
5858

5959
private final List<YearMonth> cachedHistoric = new ArrayList<>();

moneta-core/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@
361361
<jdkToolchain>
362362
<version>${maven.compiler.release}</version>
363363
</jdkToolchain>
364-
<release>9</release>
364+
<release>11</release>
365365
</configuration>
366366
</execution>
367367
<execution>

moneta-core/src/main/java/module-info.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
import org.javamoney.moneta.spi.*;
22
import org.javamoney.moneta.spi.format.DefaultAmountFormatProviderSpi;
3-
//import org.javamoney.moneta.spi.loader.urlconnection.URLConnectionLoaderService;
43
import org.javamoney.moneta.spi.loader.okhttp.OkHttpLoaderService;
54
import org.javamoney.moneta.spi.loader.LoaderService;
65

76
/*
8-
Copyright (c) 2012, 2024, Werner Keil and others by the @author tag.
7+
Copyright (c) 2012, 2025, Werner Keil and others by the @author tag.
98
109
Licensed under the Apache License, Version 2.0 (the "License"); you may not
1110
use this file except in compliance with the License. You may obtain a copy of
@@ -26,7 +25,6 @@
2625
exports org.javamoney.moneta.spi;
2726
exports org.javamoney.moneta.spi.format;
2827
exports org.javamoney.moneta.spi.loader;
29-
exports org.javamoney.moneta.spi.loader.urlconnection;
3028
exports org.javamoney.moneta.spi.loader.okhttp;
3129
requires transitive java.money;
3230
requires transitive java.logging;
@@ -42,7 +40,6 @@
4240
provides javax.money.spi.MonetaryCurrenciesSingletonSpi with DefaultMonetaryCurrenciesSingletonSpi;
4341
provides javax.money.spi.RoundingProviderSpi with DefaultRoundingProvider;
4442
provides javax.money.spi.ServiceProvider with PriorityAwareServiceProvider;
45-
//provides LoaderService with URLConnectionLoaderService;
4643
provides LoaderService with OkHttpLoaderService;
4744
provides org.javamoney.moneta.spi.MonetaryConfigProvider with DefaultConfigProvider;
4845

moneta-core/src/main/java/org/javamoney/moneta/internal/OSGIActivator.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2012, 2023, Werner Keil and others by the @author tag.
2+
Copyright (c) 2012, 2025, Werner Keil and others by the @author tag.
33
44
Licensed under the Apache License, Version 2.0 (the "License"); you may not
55
use this file except in compliance with the License. You may obtain a copy of
@@ -18,7 +18,7 @@
1818
import org.javamoney.moneta.spi.*;
1919
import org.javamoney.moneta.OSGIServiceHelper;
2020
import org.javamoney.moneta.spi.format.DefaultAmountFormatProviderSpi;
21-
import org.javamoney.moneta.spi.loader.urlconnection.URLConnectionLoaderService;
21+
import org.javamoney.moneta.spi.loader.okhttp.OkHttpLoaderService;
2222
import org.javamoney.moneta.spi.loader.LoaderService;
2323
import org.osgi.framework.BundleActivator;
2424
import org.osgi.framework.BundleContext;
@@ -60,7 +60,7 @@ public void start(BundleContext context) {
6060
OSGIServiceHelper.registerService(context.getBundle(), javax.money.spi.MonetaryAmountsSingletonSpi.class, DefaultMonetaryAmountsSingletonSpi.class);
6161
OSGIServiceHelper.registerService(context.getBundle(), javax.money.spi.MonetaryCurrenciesSingletonSpi.class, DefaultMonetaryCurrenciesSingletonSpi.class);
6262
OSGIServiceHelper.registerService(context.getBundle(), javax.money.spi.RoundingProviderSpi.class, DefaultRoundingProvider.class);
63-
OSGIServiceHelper.registerService(context.getBundle(), LoaderService.class, URLConnectionLoaderService.class);
63+
OSGIServiceHelper.registerService(context.getBundle(), LoaderService.class, OkHttpLoaderService.class);
6464
LOG.config("Registered JavaMoney services...");
6565
}
6666

@@ -83,7 +83,7 @@ public void stop(BundleContext context) {
8383
OSGIServiceHelper.unregisterService(context.getBundle(), javax.money.spi.MonetaryAmountsSingletonSpi.class, DefaultMonetaryAmountsSingletonSpi.class);
8484
OSGIServiceHelper.unregisterService(context.getBundle(), javax.money.spi.MonetaryCurrenciesSingletonSpi.class, DefaultMonetaryCurrenciesSingletonSpi.class);
8585
OSGIServiceHelper.unregisterService(context.getBundle(), javax.money.spi.RoundingProviderSpi.class, DefaultRoundingProvider.class);
86-
OSGIServiceHelper.unregisterService(context.getBundle(), LoaderService.class, URLConnectionLoaderService.class);
86+
OSGIServiceHelper.unregisterService(context.getBundle(), LoaderService.class, OkHttpLoaderService.class);
8787
}
8888
}
8989
}

moneta-core/src/main/java/org/javamoney/moneta/spi/loader/okhttp/OkHttpLoaderService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,6 @@ public UpdatePolicy getUpdatePolicy(String resourceId) {
320320

321321
@Override
322322
public String toString() {
323-
return "URLConnectionLoaderService [resources=" + resources + ']';
323+
return "OkHttpLoaderService [resources=" + resources + ']';
324324
}
325325
}

0 commit comments

Comments
 (0)