groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher Smith (JIRA)" <j...@apache.org>
Subject [jira] [Created] (GROOVY-7534) check that final fields are assigned
Date Thu, 30 Jul 2015 21:50:05 GMT
Christopher Smith created GROOVY-7534:
-----------------------------------------

             Summary: check that final fields are assigned
                 Key: GROOVY-7534
                 URL: https://issues.apache.org/jira/browse/GROOVY-7534
             Project: Groovy
          Issue Type: Bug
          Components: Compiler
    Affects Versions: 2.4.3
            Reporter: Christopher Smith


I have some {{final}} fields on my class, and they are supposed to be set from the constructor.
I apparently forgot one of the assignment statements and thus got NPEs when I tried to invoke
on the null variable.

Groovy should follow Java semantics and require that a field declared {{final}} be definitely
assigned by the end of construction.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message