Skip to content

Commit adc68e3

Browse files
committed
android-check activated
1 parent ad37e36 commit adc68e3

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

core/src/main/java/net/time4j/base/ResourceLoader.java

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,17 @@ public abstract InputStream load(
198198
private static class StdResourceLoader
199199
extends ResourceLoader {
200200

201+
//~ Konstruktoren -------------------------------------------------
202+
203+
protected StdResourceLoader() {
204+
super();
205+
206+
if (ANDROID) {
207+
throw new IllegalStateException("The module time4j-android is not active. Check your configuration.");
208+
}
209+
210+
}
211+
201212
//~ Methoden ------------------------------------------------------
202213

203214
@Override
@@ -255,7 +266,7 @@ public InputStream load(
255266
try {
256267
URL url = uri.toURL();
257268

258-
if (noCache || ANDROID) {
269+
if (noCache) {
259270
URLConnection conn = url.openConnection();
260271
conn.setUseCaches(false);
261272
conn.connect(); // explicit for clarity

0 commit comments

Comments
 (0)