Skip to content
Permalink
Browse files

Merge branch 'findbugs' into spotbugs

  • Loading branch information...
mebigfatguy committed Oct 4, 2019
2 parents 1b85bbd + a780807 commit dd6ee6a96db1aa3ea757baf9c504519275c8b443
Showing with 11 additions and 1 deletion.
  1. +11 −1 src/main/java/com/mebigfatguy/fbcontrib/collect/CollectStatistics.java
@@ -326,6 +326,16 @@ private boolean isConstrained(QMethod m) {
matches = mParms[i].charAt(0) == 'L';
} else {
matches = cParms[i].equals(mParms[i]);
if (!matches && cParms[i].charAt(0) == 'L' && mParms[i].charAt(0) == 'L') {
try {
JavaClass cc = Repository.lookupClass(SignatureUtils.stripSignature(cParms[i]));
JavaClass mc = Repository.lookupClass(SignatureUtils.stripSignature(mParms[i]));
matches = mc.instanceOf(cc);
} catch (ClassNotFoundException e) {
bugReporter.reportMissingClass(e);
matches = false;
}
}
}

if (!matches)
@@ -338,7 +348,7 @@ private boolean isConstrained(QMethod m) {
String cRet = cp.getReturnTypeSignature();
String mRet = mp.getReturnTypeSignature();
matches = cRet.equals(mRet);
if (!matches) {
if (!matches && cRet.charAt(0) == 'L' && mRet.charAt(0) == 'L') {
try {
JavaClass cc = Repository.lookupClass(SignatureUtils.stripSignature(cRet));
JavaClass mc = Repository.lookupClass(SignatureUtils.stripSignature(mRet));

0 comments on commit dd6ee6a

Please sign in to comment.
You can’t perform that action at this time.