if (propertyNode.getName().equals(fieldName)) {
if (field.isStatic()) {
//noinspection ThrowableInstanceNeverThrown
source.getErrorCollector().addErrorAndContinue(
new SyntaxErrorMessage(new SyntaxException(
"@groovy.beans.Vetoable cannot annotate a static property.",
node.getLineNumber(),
node.getColumnNumber()),
source));
} else {
createListenerSetter(source, node, bindable, declaringClass, propertyNode);
}
return;
}
}
//noinspection ThrowableInstanceNeverThrown
source.getErrorCollector().addErrorAndContinue(
new SyntaxErrorMessage(new SyntaxException(
"@groovy.beans.Vetoable must be on a property, not a field. Try removing the private, protected, or public modifier.",
node.getLineNumber(),
node.getColumnNumber()),
source));
}