1 Reply Latest reply on Oct 28, 2007 8:29 AM by maxandersen

    The expression of type List needs unchecked conversion to co

    terryb

      What I do to the line of code below to get rid of RHDS warning?

      List<ApplicationMessage> appMsg = query.getResultList();
      
      RHDS Warning
      Type safety: The expression of type List needs unchecked conversion to conform to List<ApplicationMessage>
      




        • 1. Re: The expression of type List needs unchecked conversion t
          maxandersen

          This is a standard Java 5 compiler warning - nothing RHDS specific about it.

          The reason is that getResultList cannot deduce which type will be returned.

          To supress this warning explicitly you can annotated the code that uses it with @SuppressWarnings("unchecked")

          or you can disable it in the compiler preferences if you don't care for the warning at all.