java 1.5 - generics "unchecked cast" suppression

From: Steven Buroff (sburoff_at_optonline.net)
Date: 09/26/04

  • Next message: Paul Lutus: "Re: java 1.5 - generics "unchecked cast" suppression"
    Date: Sun, 26 Sep 2004 13:51:57 GMT
    
    

    Is there a way to suppress the "unchecked cast" message for a particular
    statement rather than an entire file. There are times when you can't really
    avoid the cast. In my case, I'm reading back in a previously serialized
    object. I need to cast it. Thanks in advance.

    Steve


  • Next message: Paul Lutus: "Re: java 1.5 - generics "unchecked cast" suppression"

    Relevant Pages

    • Re: Why are there no covariant return types?
      ... Stoitcho Goutsev [C# MVP] ... > Stoitcho Goutsev wrote: ... you should avoid any cast if possible because every cast is a ... > class you are dealing with *and* you can avoid any cast. ...
      (microsoft.public.dotnet.languages.csharp)
    • Re: Convert short to float
      ... >> avoid redundant casting if code compiles without ... > for an error, disable the warning (using a pragma, not a ... If you use a cast and later change the type ... it's quite dificult to avoid ...
      (microsoft.public.vc.language)
    • required hack for Xeon 64
      ... to make in order to avoid the following message: ... Run-Time Check Failure #1 - A cast to a smaller data type has caused a loss ... you should mask the source of the cast ...
      (comp.lang.tcl)
    • Re: Why are there no covariant return types?
      ... which Clone methods you call. ... > And again in theory one should go with the most generic base type and then ... you should avoid any cast if possible because every cast is a ... class you are dealing with *and* you can avoid any cast. ...
      (microsoft.public.dotnet.languages.csharp)
    • Re: supplementary C frequent answers
      ... calling a varargs function with any value whose type ... Here are a couple of cases where a cast is appropriate: ... In C99, you can avoid the cast in the first printf by using "%zu", but ... I don't see a good way to avoid the cast. ...
      (comp.lang.c)