Disable Javassist completely on Android
- Related: #2127 - Inspector warnings
This commit is contained in:
parent
ce39e6409e
commit
2be6d1bcc1
@ -302,6 +302,7 @@ public final class PlatformDependent {
|
|||||||
Class.forName("android.app.Application", false, ClassLoader.getSystemClassLoader());
|
Class.forName("android.app.Application", false, ClassLoader.getSystemClassLoader());
|
||||||
android = true;
|
android = true;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
// Failed to load the class uniquely available in Android.
|
||||||
android = false;
|
android = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -348,6 +349,7 @@ public final class PlatformDependent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
// Failed to run the command.
|
||||||
uid = null;
|
uid = null;
|
||||||
} finally {
|
} finally {
|
||||||
if (in != null) {
|
if (in != null) {
|
||||||
@ -481,6 +483,7 @@ public final class PlatformDependent {
|
|||||||
logger.debug("sun.misc.Unsafe: {}", hasUnsafe ? "available" : "unavailable");
|
logger.debug("sun.misc.Unsafe: {}", hasUnsafe ? "available" : "unavailable");
|
||||||
return hasUnsafe;
|
return hasUnsafe;
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
|
// Probably failed to initialize PlatformDependent0.
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -555,6 +558,10 @@ public final class PlatformDependent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static boolean hasJavassist0() {
|
private static boolean hasJavassist0() {
|
||||||
|
if (isAndroid()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
boolean noJavassist = SystemPropertyUtil.getBoolean("io.netty.noJavassist", false);
|
boolean noJavassist = SystemPropertyUtil.getBoolean("io.netty.noJavassist", false);
|
||||||
logger.debug("-Dio.netty.noJavassist: {}", noJavassist);
|
logger.debug("-Dio.netty.noJavassist: {}", noJavassist);
|
||||||
|
|
||||||
@ -568,6 +575,7 @@ public final class PlatformDependent {
|
|||||||
logger.debug("Javassist: available");
|
logger.debug("Javassist: available");
|
||||||
return true;
|
return true;
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
|
// Failed to generate a Javassist-based matcher.
|
||||||
logger.debug("Javassist: unavailable");
|
logger.debug("Javassist: unavailable");
|
||||||
logger.debug(
|
logger.debug(
|
||||||
"You don't have Javassist in your class path or you don't have enough permission " +
|
"You don't have Javassist in your class path or you don't have enough permission " +
|
||||||
|
Loading…
x
Reference in New Issue
Block a user