|
Re: Re: BC: Unchecked/unconfirmed cast (BC_UNCONFIRMED_CAST): msg#00018java.findbugs.general
An example where this idiom: public boolean equals(Object object) { if (this.getClass() == object.getClass() { MyClass that = (MyClass) object; ... } ... } is correct and valid, is as an (abstract) super implementation, where sub classes only extend behavior, not data. The super class provides an equality method, which tests equality on common data, but only if the instances are of the exact same class. For this example, MyClass.class == o.getClass() won't work.
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Findbugs 1.1.2-rc2, Bill Pugh |
|---|---|
| Next by Date: | Re: Re: BC: Unchecked/unconfirmed cast (BC_UNCONFIRMED_CAST), Bill Pugh |
| Previous by Thread: | Re: Re: BC: Unchecked/unconfirmed cast (BC_UNCONFIRMED_CAST), Bill Pugh |
| Next by Thread: | Re: Re: BC: Unchecked/unconfirmed cast (BC_UNCONFIRMED_CAST), Bill Pugh |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |