[ 
https://issues.apache.org/jira/browse/GROOVY-8262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Paul King closed GROOVY-8262.
-----------------------------

> GrabAnnotationTransformation.visit has unreachable code
> -------------------------------------------------------
>
>                 Key: GROOVY-8262
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8262
>             Project: Groovy
>          Issue Type: Bug
>            Reporter: Eric Milles
>            Assignee: Paul King
>            Priority: Minor
>             Fix For: 2.4.13
>
>
> GrabAnnotationTransformation.visit at about line 260 has an else block that 
> is unreachable.  I think the second predicate {{mval == null}} should be 
> removed from the if condition.  This should give a more appropriate error 
> message if an attribute is given with an empty or null value.
> {code}
>                             if (member == null || mval == null) {
>                                 addError("The missing attribute \"" + s + "\" 
> is required in @" + node.getClassNode().getNameWithoutPackage() + " 
> annotations", node);
>                                 continue grabResolverAnnotationLoop;
>                             } else if (mval == null) {
>                                 addError("Attribute \"" + s + "\" has value " 
> + member.getText() + " but should be an inline constant String in @" + 
> node.getClassNode().getNameWithoutPackage() + " annotations", node);
>                                 continue grabResolverAnnotationLoop;
>                             }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to