void (GrMethod method) { final GrOpenBlock block = method.getBlock(); boolean shouldInsertReturnNull; myExitPoints.clear(); PsiType returnType = context.typeProvider.getReturnType(method); if (GroovyObjectTransformationSupport.isGroovyObjectSupportMethod(method)) { shouldInsertReturnNull = !(returnType instanceof PsiPrimitiveType); } else if (!method.isConstructor() && !PsiTypes.voidType().equals(returnType)) { myExitPoints.addAll(ControlFlowUtils.collectReturns(block)); shouldInsertReturnNull = block != null && !(returnType instanceof PsiPrimitiveType) && MissingReturnInspection.methodMissesSomeReturns(block, MissingReturnInspection.ReturnStatus.getReturnStatus( method)); } else { shouldInsertReturnNull = false; } generateCodeBlock(method.getParameters(), block, shouldInsertReturnNull); }