Added system property detection for Mac OS X

This commit is contained in:
Trustin Lee 2008-08-30 12:57:04 +00:00
parent d2a07463ef
commit c0b5d93b0a

View File

@ -149,11 +149,19 @@ class NioProviderMetadata {
}
// Solaris
} else if (os.indexOf("sunos") >= 0 || os.indexOf("solaris") >= 0) {
} else if (os.indexOf("sun") >= 0 || os.indexOf("solaris") >= 0) {
if (provider.equals("sun.nio.ch.WindowsSelectorProvider")) {
return 0;
}
}
// Apple JVM
} else if (vendor.indexOf("apple") >= 0) {
// Mac OS
if (os.indexOf("mac") >= 0 && os.indexOf("os") >= 0) {
if (provider.equals("sun.nio.ch.KQueueSelectorProvider")) {
return 0;
}
}
}
// Others: IBM JRE - 1 or 2, JRockIt - untested