R4481 Checkstyle Parameter Rename Issue
Brent Putman
putmanb at georgetown.edu
Wed Sep 14 13:36:32 EDT 2016
On 9/14/16 1:18 PM, Brent Putman wrote:
>
>
>
> On 9/14/16 1:11 PM, Brent Putman wrote:
>>
>>
>>
>> Ah. That was the other thing I was meaning to ask and/or look into
>> re: the c: namespace usage of param names. When I first saw that, I
>> was mildly surprised that that even worked. I always kind of
>> thought that ctor and method parameter *names* weren't included in
>> the byte code by default. You only got them with debug turned on.
>> That may not be correct at all. However, I wonder if the c:name
>> ctor stuff still works if debug is turned off. If not, then that's
>> another reason why that seems unwise to me personally.
>
> Some quick googling from multiple sources seems to confirm the
> above. You only get ctor param names with debug=true and so the
> Spring c:name stuff only works with debug turned on.
Off-topic, but this is also apparently true for other Spring things,
like MVC @RequestParam. The annotation name/value for the request param
is only optional (i.e. taken from the method param name) if compiled
with debug. In hindsight this is completely obvious, but I never
thought about it before.
OTOH, I use that all the time in MVC in my local projects, and I'm
pretty sure do *not* have debug explicitly set anwhere. So, hmmm.
Maybe Maven is defaulting something somewhere.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/dev/attachments/20160914/101a2877/attachment.html>
More information about the dev
mailing list