Skip to content

Commit

Permalink
Merge pull request #12674 from mkouba/issue-12671
Browse files Browse the repository at this point in the history
Fix NPE in AsmUtilCopy
  • Loading branch information
gsmet authored Oct 13, 2020
2 parents 6dbb79f + 860b1a1 commit db8cb59
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,9 @@ public static boolean needsSignature(MethodInfo method) {
* Returns true if the given type contains parameterized types, type variables or wildcards
*/
private static boolean needsSignature(Type type) {
if (type == null) {
return false;
}
switch (type.kind()) {
case ARRAY:
case CLASS:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package io.quarkus.arc.processor;

import static org.junit.jupiter.api.Assertions.assertFalse;

import java.io.IOException;
import org.junit.jupiter.api.Test;

public class AsmUtilCopyTest {

@Test
public void testNeedsSignature() throws IOException {
assertFalse(AsmUtilCopy.needsSignature(Basics.index(Object.class).getClassByName(DotNames.OBJECT)));
}

}

0 comments on commit db8cb59

Please sign in to comment.