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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3 P3
    • None
    • 1.0-b34
    • client-libs
    • Fix Understood
    • x86
    • linux_redhat_7.2

      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.

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

              Created:
              Updated:
              Imported:
              Indexed: