java.lang.Error: Unresolved compilation problem: Cannot perform instanceof check against type parameter UseT1. Use instead its erasure Object since generic type information will be erased at runtime

Coderanch | deepashree deval | 8 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Generics with two types

    Coderanch | 8 years ago | deepashree deval
    java.lang.Error: Unresolved compilation problem: Cannot perform instanceof check against type parameter UseT1. Use instead its erasure Object since generic type information will be erased at runtime

    Root Cause Analysis

    1. java.lang.Error

      Unresolved compilation problem: Cannot perform instanceof check against type parameter UseT1. Use instead its erasure Object since generic type information will be erased at runtime

      at Generics.GenericClass.addObject()
    2. Generics
      GenericTwoTypes.main
      1. Generics.GenericClass.addObject(GenericTwoTypes.java:39)
      2. Generics.GenericTwoTypes.main(GenericTwoTypes.java:49)
      2 frames