divide by zero warning desirable when generating constant-value.html

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P5
    • 6
    • Affects Version/s: 1.4.2
    • Component/s: tools
    • 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.

            Assignee:
            Jonathan Gibbons
            Reporter:
            Ra Vijayan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: