Skip to content

Commit 407a728

Browse files
committed
Failed to load resource input for ECBCurrentRateProvider from org/javamoney/moneta/convert/ecb/defaults/eurofxref-daily.xml #431
1 parent 5654263 commit 407a728

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

moneta-core/src/main/java/org/javamoney/moneta/spi/AbstractRateProvider.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,10 +188,12 @@ protected LocalDate[] getQueryDates(ConversionQuery query) {
188188
protected URI getResourceFromPath(String path, Class<?> clazz) {
189189
final URL url = clazz.getResource(path);
190190
URI resource = null;
191-
try {
192-
resource = url.toURI();
193-
} catch (URISyntaxException e) {
194-
LOG.warning(e.getMessage());
191+
if (url != null) {
192+
try {
193+
resource = url.toURI();
194+
} catch (URISyntaxException e) {
195+
LOG.warning(e.getMessage());
196+
}
195197
}
196198
return resource;
197199
}

0 commit comments

Comments
 (0)