javaee / grizzly

Writing scalable server applications in the Java™ programming language has always been difficult. Before the advent of the Java New I/O API (NIO), thread management issues made it impossible for a server to scale to thousands of users. The Grizzly NIO framework has been designed to help developers to take advantage of the Java™ NIO API.
https://javaee.github.io/grizzly/
Other
221 stars 60 forks source link

version comparison may not be correct #224

Closed glassfishrobot closed 14 years ago

glassfishrobot commented 16 years ago

In current implementation of Handshake.java, it tries to check whether the version is between 0.9 and 1.0 inclusively. The logic is as follows: return (ver <= 1.0) && (ver >= 0.9) && ... where ver is a float variable. According to Java Language specification, numeric literal above are double. In other words, we tries to compare a double with a float which may have precision problem in some machine. One should use 0.9f and 1.0f or change the ver into double.

Environment

Operating System: All Platform: Sun

Affected Versions

[memcached-1.0]

glassfishrobot commented 16 years ago

Reported by swchan2@java.net

glassfishrobot commented 16 years ago

swchan2@java.net said: reassigned to myself

glassfishrobot commented 16 years ago

swchan2@java.net said: src/trunk/modules/cometd/src/main/java/com/sun/grizzly/cometd/bayeux > Sending Handshake.java Transmitting file data . Committed revision 1404.

glassfishrobot commented 16 years ago

Was assigned to swchan2@java.net

glassfishrobot commented 7 years ago

This issue was imported from java.net JIRA GRIZZLY-224

glassfishrobot commented 14 years ago

Marked as fixed on Wednesday, December 16th 2009, 6:13:23 pm