-
Notifications
You must be signed in to change notification settings - Fork 1.9k
GROOVY-8065: Map created as org.springframework.http.HttpHeaders is e… #480
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
Conversation
|
The problem is that the following test now fails:
|
|
Do we have the priority documented anywhere or just in the code? We don't have test coverage for your example. |
|
I think no documentation and no test. I extracted the example from the code you changed actually to show you what your change will affect. In my opinion the get/set path needs to be removed, but that is another topic. The trouble is that get/set in the MOP is in general very badly documented. So it might or it might not be, that your change is a breaking one. Well no, it is a breaking change in terms of semantics, but if real world examples will be badly affected by this? no idea. But I have another example:
the last three asserts will all fail. |
|
I think restoring the code to the way it was pre- 2c22683 commit and then partially duplicating the map check prior to throwing the .....
if (Modifier.isFinal(field.getModifiers())) {
// GROOVY-5985
if (!isStatic && this.isMap) {
((Map) object).put(name, newValue);
return;
}
throw new ReadOnlyPropertyException(name, theClass);
}
.....
..... |
…mpty in 2.4.8, works fine in 2.4.7 (closes apache#480)
6ff8ae1 to
1358ed5
Compare
|
@blackdrag These three asserts fail in 2.4.8 |
|
+1 |
|
@paulk-asert I might have used a pre 2.4.8 program to test my two scripts. But I can see, that your new version makes both pass again. So +1 |
…mpty in 2.4.8, works fine in 2.4.7 (closes #480)
…mpty in 2.4.8, works fine in 2.4.7 (closes apache#480)
…mpty in 2.4.8, works fine in 2.4.7