Make sure netty detects the right java version when running on android. See #282
This commit is contained in:
parent
8777c3c02b
commit
1d4e5ac66d
@ -70,6 +70,16 @@ public final class DetectionUtil {
|
||||
}
|
||||
|
||||
private static int javaVersion0() {
|
||||
try {
|
||||
// Check if its android, if so handle it the same way as java5.
|
||||
//
|
||||
// See https://github.com/netty/netty/issues/282
|
||||
Class.forName("android.app.Application");
|
||||
return 5;
|
||||
} catch (ClassNotFoundException e) {
|
||||
//Ignore
|
||||
}
|
||||
|
||||
try {
|
||||
Deflater.class.getDeclaredField("SYNC_FLUSH");
|
||||
return 7;
|
||||
|
Loading…
x
Reference in New Issue
Block a user