为新java.math.BigInteger的非Null参数传递了FindBugs Null

为新java.math.BigInteger的非Null参数传递了FindBugs Null,java,findbugs,Java,Findbugs,在下面的代码段中,FindBugs为什么抱怨null被传递给BigInteger构造函数?它在第行显示其已知的null:signature=null byte[] signature; Calendar today = new GregorianCalendar( now.get(Calendar.YEAR), now.get(Calendar.MONTH), now.get(Calendar.DATE),

在下面的代码段中,FindBugs为什么抱怨
null
被传递给
BigInteger
构造函数?它在第行显示其已知的
null
signature=null

byte[] signature;
Calendar today = new GregorianCalendar(
                        now.get(Calendar.YEAR), now.get(Calendar.MONTH), now.get(Calendar.DATE),
                        now.get(Calendar.HOUR_OF_DAY), now.get(Calendar.MINUTE), now.get(Calendar.SECOND));
Date d=today.getTime();
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
String timestamp =sdf.format(d).toString();
String pp=user.userName+secretKeyStr+timestamp;
try {
    signature = Security.getMD5Hash(pp);
} catch (Exception e) {
    e.printStackTrace();
    signature=null;
}
//convert byte[] into String. method to generate MD5 hash of a string in Java
BigInteger bigInt = new BigInteger(1,signature); 
这是假阳性还是我遗漏了什么?
我应该在
Exception
上返回
null

众所周知,
签名
可以
新的BigInteger(1,签名)处为空行。这可能是一个错误,因为如果其中一个参数为null,则
biginger
的构造函数将抛出
NullPointerException

您应该以其他方式处理异常,例如返回null(如您所说)。在我看来,您还应该捕获比
异常
更具体的异常