groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Endika Gutiérrez (JIRA) <j...@apache.org>
Subject [jira] [Updated] (GROOVY-7872) Nested calls between @Lazy static properties throws MissingPropertyException
Date Thu, 23 Jun 2016 16:49:16 GMT

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

Endika Gutiérrez updated GROOVY-7872:
-------------------------------------
    Description: 
This piece of code throws {{MissingPropertyException}}
{noformat}
class LazyTesting {
  @Lazy static final Set<String> STRING_SET = ['a', 'b', 'c'] as Set
  @Lazy static final Set<String> BIGGER_STRING_SET = (['d', 'e', 'f'] + STRING_SET)
as Set
}
println LazyTesting.BIGGER_STRING_SET
{noformat}

{noformat}
java.lang.ExceptionInInitializerError
	at LazyTesting.getBIGGER_STRING_SET(test.groovy)
	at test.run(test.groovy:6)
Caused by: groovy.lang.MissingPropertyException: No such property: STRING_SET for class: LazyTesting$SetHolder_BIGGER_STRING_SET
{noformat}

  was:
This piece of code throws {{MissingPropertyException}}
```
class LazyTesting {
  @Lazy static final Set<String> STRING_SET = ['a', 'b', 'c'] as Set
  @Lazy static final Set<String> BIGGER_STRING_SET = (['d', 'e', 'f'] + STRING_SET)
as Set
}
println LazyTesting.BIGGER_STRING_SET
```

```
java.lang.ExceptionInInitializerError
	at LazyTesting.getBIGGER_STRING_SET(test.groovy)
	at test.run(test.groovy:6)
Caused by: groovy.lang.MissingPropertyException: No such property: STRING_SET for class: LazyTesting$SetHolder_BIGGER_STRING_SET
```


> Nested calls between @Lazy static properties throws MissingPropertyException
> ----------------------------------------------------------------------------
>
>                 Key: GROOVY-7872
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7872
>             Project: Groovy
>          Issue Type: Bug
>            Reporter: Endika Gutiérrez
>            Priority: Minor
>
> This piece of code throws {{MissingPropertyException}}
> {noformat}
> class LazyTesting {
>   @Lazy static final Set<String> STRING_SET = ['a', 'b', 'c'] as Set
>   @Lazy static final Set<String> BIGGER_STRING_SET = (['d', 'e', 'f'] + STRING_SET)
as Set
> }
> println LazyTesting.BIGGER_STRING_SET
> {noformat}
> {noformat}
> java.lang.ExceptionInInitializerError
> 	at LazyTesting.getBIGGER_STRING_SET(test.groovy)
> 	at test.run(test.groovy:6)
> Caused by: groovy.lang.MissingPropertyException: No such property: STRING_SET for class:
LazyTesting$SetHolder_BIGGER_STRING_SET
> {noformat}



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

Mime
View raw message