Make sure netty detects the right java version when running on android. See #282

This commit is contained in:
Norman Maurer 2012-04-26 16:30:46 +03:00
parent 9d555b0b97
commit e61a9ce7c1

View File

@ -75,6 +75,15 @@ public final class DetectionUtil {
}
private static int javaVersion0() {
try {
// Check if its android, if so handle it the same way as java6.
//
// See https://github.com/netty/netty/issues/282
Class.forName("android.app.Application");
return 6;
} catch (ClassNotFoundException e) {
//Ignore
}
try {
Deflater.class.getDeclaredField("SYNC_FLUSH");
return 7;