Skip to content

Commit

Permalink
Move check of type to Signatures class
Browse files Browse the repository at this point in the history
  • Loading branch information
uschindler committed Mar 31, 2018
1 parent ba18984 commit 8a4dd7e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/main/java/de/thetaphi/forbiddenapis/ClassScanner.java
Expand Up @@ -89,9 +89,6 @@ String checkClassUse(Type type, String what, boolean deep) {
while (type.getSort() == Type.ARRAY) {
type = type.getElementType();
}
if (type.getSort() != Type.OBJECT) {
return null; // we don't know this type, just pass!
}
final String printout = forbiddenSignatures.checkType(type);
if (printout != null) {
return String.format(Locale.ENGLISH, "Forbidden %s use: %s", what, printout);
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/de/thetaphi/forbiddenapis/Signatures.java
Expand Up @@ -311,6 +311,9 @@ public boolean isNonPortableRuntimeForbidden() {
}

public String checkType(Type type) {
if (type.getSort() != Type.OBJECT) {
return null; // we don't know this type, just pass!
}
final String printout = signatures.get(type.getInternalName());
if (printout != null) {
return printout;
Expand Down

0 comments on commit 8a4dd7e

Please sign in to comment.