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

Number[] numbers = new Integer[5]; numbers[0] = 0.5;

XMLWordPrintable

    • generic
    • generic

      A DESCRIPTION OF THE PROBLEM :
      When creating an array of type Number, it allows the array of type Integer to assign to it, this coincides with polymorphism, but 0.5 is a double, it allows it to assign it to array of type Integer, and this won't create a compile error, it can create a security issue.


            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: