JDK-6286011 : (se) DevPollSelectorProvider stops being the default on Solaris 10
  • Type: Bug
  • Status: Resolved
  • Resolution: Fixed
  • Component: core-libs
  • Sub-Component: java.nio
  • Priority: P2
  • Affected Version: 1.4.2_08,5.0u6
  • OS: generic,solaris_10
  • CPU: generic
  • Submit Date: 2005-06-15
  • Updated Date: 2010-04-03
  • Resolved Date: 2005-08-10
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availabitlity Release.

To download the current JDK release, click here.
Other JDK 6
1.4.2_10Resolved 6 b47Resolved
Description
sun/nio/ch/DefaultSelectorProvider intends, I believe, to provide a PollSelectorProvider on Solaris versions earlier than 5.7, and give DevPollSelectorProvider otherwise.

It actually performs a lexical comparison of the os.version property, and therefore fails to select appropriately when the os.version is "5.10".
###@###.### 2005-06-15 16:12:34 GMT

Comments
WORK AROUND If you want to use /dev/poll but aren't getting it by default: java -Djava.nio.channels.spi.SelectorProvider=sun.nio.ch.DevPollSelectorProvider ###@###.### 2005-06-15 16:12:34 GMT
2005-06-15

EVALUATION The submitter is correct. This should be fixed in the earliest possible 5.0 update release. ###@###.### 2005-06-16 20:46:55 GMT
2005-06-15

SUGGESTED FIX In ws/j2se/src/solaris/classes/sun/nio/ch/DefaultSelectorProvider.java , change: String[] numbers = result.split("\\.", 0); if (numbers[1].compareTo("7") < 0) return new sun.nio.ch.PollSelectorProvider(); ... ...to: String[] numbers = result.split("\\.", 0); if ( Integer.parseInt(numbers[1]) < 7) return new sun.nio.ch.PollSelectorProvider(); ... However, if Solaris version 2.6 is no longer a relevant platform, the comparison can be dropped (it's still there in an early Java 1.6), and we can simply "return new sun.nio.ch.DevPollSelectorProvider();" without checking the property. (We will never be using PollSelectorProvider unless specified by the user in the property java.nio.channels.spi.SelectorProvider) ###@###.### 2005-06-15 16:12:34 GMT
2005-06-15