-
Enhancement
-
Resolution: Fixed
-
P5
-
1.4.2
-
b33
-
sparc
-
solaris_9
-
Verified
for the following case
=======================
public class divzero
{
public static final int i = 20/0;
}
if i is assigned 20/10, 0r any other valid constant expression, the constant
folding is done and value is generated in the constant-value.html in the Javadoc
output.
But when the constant expression involves a divide by zero, the Javadoc quietly
ignores the constant value. While this condition is handled right in Javadoc, a
warning could be helpful. It could be argued that the Compiler for the same code
doesnt emit a warning, but here, the user gets to SEE the Html output and a
value is missing. So it is better to inform the user about this 'skip' of
Constant value generation with the cause.
=======================
public class divzero
{
public static final int i = 20/0;
}
if i is assigned 20/10, 0r any other valid constant expression, the constant
folding is done and value is generated in the constant-value.html in the Javadoc
output.
But when the constant expression involves a divide by zero, the Javadoc quietly
ignores the constant value. While this condition is handled right in Javadoc, a
warning could be helpful. It could be argued that the Compiler for the same code
doesnt emit a warning, but here, the user gets to SEE the Html output and a
value is missing. So it is better to inform the user about this 'skip' of
Constant value generation with the cause.