* Added support for JRockit VMs

* Fixed incorrect test result on Windows and Solaris for Sun VMs
This commit is contained in:
Trustin Lee 2008-09-01 07:56:24 +00:00
parent b8c2051407
commit 7a503f1519

View File

@ -145,13 +145,13 @@ class NioProviderMetadata {
// Windows
} else if (os.indexOf("windows") >= 0) {
if (provider.equals("sun.nio.ch.DevPollSelectorProvider")) {
if (provider.equals("sun.nio.ch.WindowsSelectorProvider")) {
return 0;
}
// Solaris
} else if (os.indexOf("sun") >= 0 || os.indexOf("solaris") >= 0) {
if (provider.equals("sun.nio.ch.WindowsSelectorProvider")) {
if (provider.equals("sun.nio.ch.DevPollSelectorProvider")) {
return 0;
}
}
@ -178,6 +178,21 @@ class NioProviderMetadata {
}
}
}
// BEA
} else if (vendor.indexOf("bea") >= 0 || vendor.indexOf("oracle") >= 0) {
// Linux
if (os.indexOf("linux") >= 0) {
if (provider.equals("sun.nio.ch.EPollSelectorProvider") ||
provider.equals("sun.nio.ch.PollSelectorProvider")) {
return 0;
}
// Windows
} else if (os.indexOf("windows") >= 0) {
if (provider.equals("sun.nio.ch.WindowsSelectorProvider")) {
return 0;
}
}
}
// Others (untested)