Documentation of methods in java.lang.Number

Brian Burkhalter brian.burkhalter at
Fri Dec 19 23:34:49 UTC 2014

On Dec 19, 2014, at 3:26 PM, joe darcy <joe.darcy at> wrote:

> I don't really think the current text is problematic; however, if it is to be changed, I recommending including a citation to the "Narrowing primitive conversion" section of the Java Language Specification. This can be accomplished using the @jls javadoc tag; the syntax is something like
>    * @jls 5.1.3. Narrowing Primitive Conversion
> Examples of the use of @jls can be found elsewhere in the core libraries.

This is already in the class level documentation which is why I left it out. No harm adding it to the method docs however.

> For the exact wording how about
> ... The particular semantics of the conversion operation from the specified number to a {@code long} are defined  in subclasses. The operation may involve a narrowing conversion, rounding, or truncation.

Seems reasonable to me.



More information about the core-libs-dev mailing list