-
Notifications
You must be signed in to change notification settings - Fork 38.5k
Spring cannot find setter if subclass overrides getter narrowing return type [SPR-10995] #15623
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
Comments
Piotr Findeisen commented I've implemented a test that passes with spring 3.1.2 but fails with 3.1.4 I was running the test using Open JDK 1.6.0_27 and 1.7.0_21 (with no difference). I've trouble setting the priority. For me this is a BLOCKER preventing me from upgrading from 3.1.2 to 3.1.4. |
Phil Webb commented Repro project is now in spring-framework-issues |
Juergen Hoeller commented As far as I can verify, this has been fixed in the 4.0 line already. However, the test fails against the current state in the 3.2.x branch. I'll make sure to backport whatever's necessary from 4.0 to 3.2.5 there. Juergen |
Juergen Hoeller commented Actually, it's not fixed in 4.0 itself, it's fixed in JDK 8 which we run the 4.0 tests against by default. So we'll have to find a fix for 4.0 as well when running on JDK 6/7. We're using the JDK's JavaBeans Introspector, so we 'inherit' any new behavior implemented there. Juergen |
Juergen Hoeller commented Fixed through a more lenient fallback check for a setter method in case of the getter having been found with covariant return type narrowing. We had a fallback before but it turned out to be not lenient enough, at least not on JDKs before 8. Juergen |
Piotr Findeisen commented Thanks for fixing this! |
Piotr Findeisen opened SPR-10995 and commented
Steps to Reproduce
Bar
.MoreBar extends Bar
.Expectation
It worked in 3.1.2, so it should work now.
Failing Exception
Affects: 3.1.4
0 votes, 5 watchers
The text was updated successfully, but these errors were encountered: