Skip to content
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

Binder / BeanPropertySet does not find setter in nested interface #20814

Open
limespace opened this issue Jan 8, 2025 · 3 comments
Open

Binder / BeanPropertySet does not find setter in nested interface #20814

limespace opened this issue Jan 8, 2025 · 3 comments

Comments

@limespace
Copy link

limespace commented Jan 8, 2025

Description of the bug

Binder / BeanPropertySet does not find setter in nested interface where Base interface has just the getters

Expected behavior

Binder should find getter and setter

Minimal reproducible example

class BeanPropertyTest {

interface Base  {
	String getInfo();
}

interface MyTest extends Base  {
	void setInfo(String value);
}

interface MyTest2 extends Base  {

	@Override
	String getInfo();
	void setInfo(String value);

}

@Test
void testBeanProperty1() {
	PropertySet<MyTest> userInfoPropertySet = BeanPropertySet.get(MyTest.class);

	Optional<PropertyDefinition<MyTest, ?>> infoProperty = userInfoPropertySet.getProperty("info");
	assertTrue(infoProperty.isPresent());
	assertNotNull(infoProperty.get().getGetter());
	assertTrue(infoProperty.get().getSetter().isPresent());
}

@Test
void testBeanProperty2() {
	PropertySet<MyTest2> userInfoPropertySet = BeanPropertySet.get(MyTest2.class);

	Optional<PropertyDefinition<MyTest2, ?>> infoProperty = userInfoPropertySet.getProperty("info");
	assertTrue(infoProperty.isPresent());
	assertNotNull(infoProperty.get().getGetter());
	assertTrue(infoProperty.get().getSetter().isPresent());
}

}

Versions

  • Vaadin / Flow version: 26.0.1
  • Java version: 21
  • OS version: Win 11
@mcollovati
Copy link
Collaborator

mcollovati commented Jan 8, 2025

Maybe just a typo, but the setInfo method does not declare a parameter

@limespace
Copy link
Author

thx for the info, changed in bug report

@mshabarov
Copy link
Contributor

Similar or maybe exact the same issue #18524, needs to be checked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🔖 Low Priority (P3)
Development

No branches or pull requests

3 participants