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

getNextID in ImageIcon class can lead to overflow

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P4 P4
    • tbd
    • 7
    • client-libs

      A DESCRIPTION OF THE REQUEST :
      private int getNextID() {
              synchronized(getTracker()) {
                  return ++mediaTrackerID;
              }
          }
      This method mediaTrackerID not detect overflow.

      Possible overflow in the long time run or in a large number of create "imageIcon", when

      JUSTIFICATION :
      Possible overflow in the long time run or in a large number of create "imageIcon", when

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Indefinite period of time within the reliable operation of
      ACTUAL -
      The risk of data overflow

      CUSTOMER SUBMITTED WORKAROUND :
      Add a detection to prevent data overflow

            psadhukhan Prasanta Sadhukhan
            alexp Alexander Potochkin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: