mirror of
https://github.com/zaaarf/geb-processor.git
synced 2024-11-23 00:24:49 +01:00
fix: avoid nullptr in generated code
This commit is contained in:
parent
d6c1976261
commit
8027656386
1 changed files with 2 additions and 2 deletions
|
@ -215,9 +215,9 @@ public class GEBProcessor extends AbstractProcessor {
|
|||
for(ListenerContainer listener : ordered) {
|
||||
String varName = String.format("listener%d", done.get(listener.parent));
|
||||
callListenersBuilder
|
||||
.addStatement("for($T l : $L) {", this.listenerInterface, varName)
|
||||
.addStatement("if($L != null) { for($T l : $L) {", varName, this.listenerInterface, varName)
|
||||
.addStatement(
|
||||
"if(l != null) (($T) l).$L(($T) $N); }",
|
||||
"if(l != null) (($T) l).$L(($T) $N); } }",
|
||||
listener.parent,
|
||||
listener.method.getSimpleName().toString(),
|
||||
event,
|
||||
|
|
Loading…
Reference in a new issue