Skip to content

Commit

Permalink
Fix for issue #519: add null safety to binding.superInterfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-milles authored Mar 7, 2018
1 parent 9f96fad commit 7f047e7
Showing 1 changed file with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,12 @@ protected MethodBinding[] augmentMethodBindings(MethodBinding[] methodBindings)
}
boolean implementsGroovyLangObject = false;

ReferenceBinding[] superInterfaces = binding.superInterfaces;
if (superInterfaces != null) {
for (int i = 0, max = superInterfaces.length; i < max; i++) {
char[][] interfaceName = superInterfaces[i].compoundName;
if (CharOperation.equals(interfaceName, GROOVY_LANG_GROOVYOBJECT)) {
implementsGroovyLangObject = true;
break;
}
ReferenceBinding[] superInterfaces = binding.superInterfaces != null ? binding.superInterfaces : new ReferenceBinding[0];
for (int i = 0, max = superInterfaces.length; i < max; i++) {
char[][] interfaceName = superInterfaces[i].compoundName;
if (CharOperation.equals(interfaceName, GROOVY_LANG_GROOVYOBJECT)) {
implementsGroovyLangObject = true;
break;
}
}

Expand Down

0 comments on commit 7f047e7

Please sign in to comment.