Closed
Description
Issue #23352 has shown that the mutable nature of MethodParameter
can cause problems. One particularly unusual aspect is that getContainingClass()
can change as a side effect of calling GenericTypeResolver.resolveParameterType()
.
Internally, we don't actually mutate MethodParameter
instances that often so it's possible that we could deprecate the mutation methods in favor of calls that return a new instance.