classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cp-patches] Patch: replace NullPointerException with ClassCastExcep


From: Mark Wielaard
Subject: Re: [cp-patches] Patch: replace NullPointerException with ClassCastException
Date: Sun, 18 Sep 2005 00:51:16 +0200

On Wed, 2005-09-14 at 17:56 -0700, Anthony Green wrote:
> This doesn't really fix a bug.  FindBugs was complaining about a
> potential null dereference.  This patch essentially turns a potential
> NullPointerException into a ClassCastException, which is no worse - and
> quiets FindBugs on this issue.

Both are wrong. If result is null (both conditions fail) the method
should throw a NoSuchAlgorithmException.

Cheers,

Mark

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]