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
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  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