Skip to content

Missing reference to setter when in with { } #784

@mauromol

Description

@mauromol

Consider this Java class:

package test44;

public class MyBean {
	private String foo;
	
	public String getFoo() {
		return foo;
	}
	
	public void setFoo(String foo) {
		this.foo = foo;
	}
}

and this Groovy class:

package test44

class Test44 {
	
	void doSomething() {
		def b = new MyBean()
		b.with { 
			foo = 'foo'
		}
	}
}

Now either:

  1. invoke Call Hierarchy for test44.MyBean.setFoo(String)
  2. search for References to test44.MyBean.setFoo(String)
  3. rename test44.MyBean.setFoo(String) to something else

In all cases, the reference in test44.Test44.doSomething() is not found. In case 3., the result of the refactoring is invalid code.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions