-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NPE on autocompletion #991
Comments
Fix: #992 |
Can you indicate where in your source code you are seeing the error? Are you able to create a small program that demonstrates the issue? I need to try and recreate and add a regression test before accepting a solution. Please do not rush to pull request. And you need to rebase your branch beforehand anyways to prevent the stray commits. |
Code: import groovy.transform.AutoClone
import groovy.transform.EqualsAndHashCode
import groovy.transform.ToString
import groovy.transform.TupleConstructor
import groovy.transform.builder.Builder
import groovy.transform.builder.InitializerStrategy
import groovy.transform.builder.SimpleStrategy
import static groovy.transform.AutoCloneStyle.SERIALIZATION
@ToString
@AutoClone(style = SERIALIZATION)
@EqualsAndHashCode
@TupleConstructor
@Builder(builderStrategy=SimpleStrategy.class)
class UserData implements Serializable {
int id
String name
UserGroup group
public void setName(String name) {
this.name = name
}
} Code where the error occurs, if you place the cursor after var user2 = new UserData([
id : 2,
name : "test",
group: new UserGroup([
id : 100,
name: "group"
])
]) Check out https://github.com/mojo2012/groovytest, Main.groovy |
When invoking autocomplete within a constructor, it may fail with this exception:
Groovy: 2.5.8
Groovy-eclipse 3.5.0
The text was updated successfully, but these errors were encountered: