|
Re: Re: BC: Unchecked/unconfirmed cast (BC_UNCONFIRMED_CAST): msg#00014java.findbugs.general
yes, this code should use a null check. No, handling this won't make it into 1.1.2. We're trying to get 1.1.2 out the door this week. One of the questions we'll have to decide is whether we want to do a simply hack to suppress this warning for this precise idiom, or figure a way to do the right that and make the type analysis understand this. Actually, the code you've provided is a little subtle. Doing the right thing in the type analysis might be a little subtle. The more typical instance of this idiom if if (o.getClass() == Foo.class) { Foo foo = (Foo) o; ... } which isn't as subtle. So we'll need to think about it a while. Maybe 1.1.3. Bill On Dec 4, 2006, at 10:35 PM, John Penix wrote: shouldn't you use instanceOf which includes a null check?
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Re: BC: Unchecked/unconfirmed cast (BC_UNCONFIRMED_CAST), John Penix |
|---|---|
| Next by Date: | Re: Parallelize Findbugs search?, Bill Pugh |
| Previous by Thread: | Re: Re: BC: Unchecked/unconfirmed cast (BC_UNCONFIRMED_CAST), John Penix |
| Next by Thread: | Re: Re: BC: Unchecked/unconfirmed cast (BC_UNCONFIRMED_CAST), Nils Kilden-Pedersen |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |