@@ -240,24 +240,6 @@ else if(s.equals("false"))
240
240
static final Var PRINT_INITIALIZED = Var .intern (CLOJURE_NS , Symbol .intern ("print-initialized" ));
241
241
static final Var PR_ON = Var .intern (CLOJURE_NS , Symbol .intern ("pr-on" ));
242
242
//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
-
261
243
final static IFn inNamespace = new AFn (){
262
244
public Object invoke (Object arg1 ) {
263
245
Symbol nsname = (Symbol ) arg1 ;
@@ -2156,20 +2138,11 @@ public Object run(){
2156
2138
});
2157
2139
}
2158
2140
2159
-
2160
2141
static public ClassLoader baseLoader (){
2161
2142
if (Compiler .LOADER .isBound ())
2162
2143
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 ();
2173
2146
return Compiler .class .getClassLoader ();
2174
2147
}
2175
2148
0 commit comments