Skip to content
This repository was archived by the owner on Apr 25, 2024. It is now read-only.

Commit 3923baa

Browse files
Remove Android 2.2 workaround
1 parent ec5543c commit 3923baa

File tree

1 file changed

+2
-29
lines changed

1 file changed

+2
-29
lines changed

src/jvm/clojure/lang/RT.java

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -240,24 +240,6 @@ else if(s.equals("false"))
240240
static final Var PRINT_INITIALIZED = Var.intern(CLOJURE_NS, Symbol.intern("print-initialized"));
241241
static final Var PR_ON = Var.intern(CLOJURE_NS, Symbol.intern("pr-on"));
242242
//final static Var IMPORTS = Var.intern(CLOJURE_NS, Symbol.intern("*imports*"), DEFAULT_IMPORTS);
243-
244-
private static final boolean ECLAIR_WORKAROUND;
245-
246-
static {
247-
boolean needsWorkaround=false;
248-
try {
249-
Class<?> versionClass = Class.forName("android.os.Build$VERSION");
250-
Field sdkIntField = versionClass.getField("SDK_INT");
251-
int version = sdkIntField.getInt(null);
252-
if(version > 0 && version < 8) {
253-
needsWorkaround=true;
254-
}
255-
} catch(Exception ignored) {
256-
// ignored -- eclair not detected
257-
}
258-
ECLAIR_WORKAROUND=needsWorkaround;
259-
}
260-
261243
final static IFn inNamespace = new AFn(){
262244
public Object invoke(Object arg1) {
263245
Symbol nsname = (Symbol) arg1;
@@ -2156,20 +2138,11 @@ public Object run(){
21562138
});
21572139
}
21582140

2159-
21602141
static public ClassLoader baseLoader(){
21612142
if(Compiler.LOADER.isBound())
21622143
return (ClassLoader) Compiler.LOADER.deref();
2163-
else if(booleanCast(USE_CONTEXT_CLASSLOADER.deref())) {
2164-
final Thread currentThread = Thread.currentThread();
2165-
ClassLoader contextLoader = currentThread.getContextClassLoader();
2166-
if(ECLAIR_WORKAROUND
2167-
&& contextLoader==ClassLoader.getSystemClassLoader()) {
2168-
contextLoader = Compiler.class.getClassLoader();
2169-
currentThread.setContextClassLoader(contextLoader);
2170-
}
2171-
return contextLoader;
2172-
}
2144+
else if(booleanCast(USE_CONTEXT_CLASSLOADER.deref()))
2145+
return Thread.currentThread().getContextClassLoader();
21732146
return Compiler.class.getClassLoader();
21742147
}
21752148

0 commit comments

Comments
 (0)