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

if (new java.util.ArrayList<String>() instanceOf java.util.ArrayList<String>){..}

XMLWordPrintable

    • generic
    • generic

      A DESCRIPTION OF THE PROBLEM :
      When creating an instance of type ArrayList with specific type, for example, String or Integer, Java can not distinguish it is an instance of the built in class ArrayList. I understand the generic class can not distinguish its objects because the type is KTEV and Java removes its type when it compiles the program, but when the type is specified it should be able to distinguish it because the objects belong to the class with specific type, so the remove type function should not work in this case.


            vromero Vicente Arturo Romero Zaldivar
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: