Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8205253 | 11.0.1 | Martin Buchholz | P4 | Resolved | Fixed | team |
Unitless primitive parameters often have an implied unit, like milliseconds for Object#wait. Making that clear in the parameter name makes unit mismatch less likely.
Let's choose the naming convention carefully. "timeoutMillis" is already in use in j.u.c. tests, and "millisTimeout" is absent from the code base.. "timeoutMillis" matches the English grammatical order "timeout in milliseconds"
See discussion at https://openjdk.markmail.org/thread/ndcwjnmbpwhkvkwe
The "nanos" parameter could perhaps also be renamed, but out of scope for this change. It's possible that renaming "nanos" -> "additionalNanos" or "extraNanos" would be an improvement but "timeoutNanos" would not (in this case it would be misleading).
Let's choose the naming convention carefully. "timeoutMillis" is already in use in j.u.c. tests, and "millisTimeout" is absent from the code base.. "timeoutMillis" matches the English grammatical order "timeout in milliseconds"
See discussion at https://openjdk.markmail.org/thread/ndcwjnmbpwhkvkwe
The "nanos" parameter could perhaps also be renamed, but out of scope for this change. It's possible that renaming "nanos" -> "additionalNanos" or "extraNanos" would be an improvement but "timeoutNanos" would not (in this case it would be misleading).
- backported by
-
JDK-8205253 Rename Object#wait parameter name from "timeout" to "timeoutMillis"
-
- Resolved
-