Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4691301

Rectangle class doesnt describe how rectangles out of integer range are handled

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P3
    • Resolution: Unresolved
    • Affects Version/s: 1.0-b34
    • Fix Version/s: None
    • Component/s: client-libs
    • Labels:
    • Subcomponent:
    • Understanding:
      Fix Understood
    • CPU:
      x86
    • OS:
      linux_redhat_7.2

      Description

      The Rectangle class does not state what happens to rectangles etc when they are out of interger bounds. For example it is possible to have a Rectangle with an x coordinate > 0 and a width of Integer.MAX_VALUE. The resulting coordinate of the far right of the rectangle is out of integer bounds. Should these rectangles work with methods such as intersection, union, add etc? The spec does not state that they won't yet many implementations use integer arithmetic to calculate the result and this causes integer overflows. As the spec. does not state how these are handled TCK has assumed they are handled and has written many test cases.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              denis Denis Fokin (Inactive)
              Reporter:
              duke J. Duke (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Imported:
                Indexed: