[JIRA] (JPAR-218) Compile everything with the javac -parameters option

Ian Young (Jira) jira at shibboleth.atlassian.net
Wed Feb 1 17:48:44 UTC 2023


Ian Young ( https://shibboleth.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3Ae127cb03-43ed-473d-b6ba-592949cb4be8 ) *created* an issue

Java Parent Project ( https://shibboleth.atlassian.net/browse/JPAR?atlOrigin=eyJpIjoiZWYxOGMzNmVlN2YwNDc0OGI0OTJjOTk1MDEwMWUxODEiLCJwIjoiaiJ9 ) / Bug ( https://shibboleth.atlassian.net/browse/JPAR-218?atlOrigin=eyJpIjoiZWYxOGMzNmVlN2YwNDc0OGI0OTJjOTk1MDEwMWUxODEiLCJwIjoiaiJ9 ) JPAR-218 ( https://shibboleth.atlassian.net/browse/JPAR-218?atlOrigin=eyJpIjoiZWYxOGMzNmVlN2YwNDc0OGI0OTJjOTk1MDEwMWUxODEiLCJwIjoiaiJ9 ) Compile everything with the javac -parameters option ( https://shibboleth.atlassian.net/browse/JPAR-218?atlOrigin=eyJpIjoiZWYxOGMzNmVlN2YwNDc0OGI0OTJjOTk1MDEwMWUxODEiLCJwIjoiaiJ9 )

Issue Type: Bug Affects Versions: 11.3.5 Assignee: Unassigned Created: 01/Feb/23 12:48 PM Priority: Trivial Reporter: Ian Young ( https://shibboleth.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3Ae127cb03-43ed-473d-b6ba-592949cb4be8 )

From Spring Framework 6.0.2 (I think) I started seeing things like this:

    [java] WARN  - Using deprecated '-debug' fallback for parameter name resolution.
    Compile the affected code with '-parameters' instead or avoid its introspection:
    net.shibboleth.shared.spring.httpclient.resource.HTTPResource

We’ve gone round the houses with Spring and constructor parameters before, resulting in https://shibboleth.atlassian.net/browse/IDP-1047 ( https://shibboleth.atlassian.net/browse/IDP-1047 ) and a @ParameterName annotation that is, in fact, part of the constructor for the particular named class. So, it’s at least possible that I wouldn’t have seen this warning if my MDA configuration included the ParameterNameDiscoverer bean we wrote to process it.

More interestingly, though, a lot of people did start seeing similar warnings from Spring around the same time, even when there were no parameter names to be introspected; that turned out to be a bug which I believe was fixed in 6.0.3.

However, in the associated ticket ( https://github.com/spring-projects/spring-framework/issues/29612 ) , Juergen said this in passing:

> 
> 
> 
> We intend to remove debug symbol introspection completely in 6.1,
> exclusively relying on -parameters. That's the main reason for that warn
> logging. Aside from missing -parameters , we also found quite a few places
> where parameter names were introspected but effectively not used - which
> is quite costly since we are unnecessarily parsing the class file for
> every affected class there. We'd like to identify and fix all such
> remaining cases.
> 
> 

I think this is worth thinking about whether this might affect us: I don’t think I know whether we can say for sure that we have used @ParameterName everywhere we’d need to have in order to dodge the consequences of this.

* Should we start just using -parameters when compiling everything? (there’s a Maven compiler plugin option for that)
* If Spring changes its approach, is it worth our rethinking whether @ParameterName and the associated bean is even needed any more?

( https://shibboleth.atlassian.net/browse/JPAR-218#add-comment?atlOrigin=eyJpIjoiZWYxOGMzNmVlN2YwNDc0OGI0OTJjOTk1MDEwMWUxODEiLCJwIjoiaiJ9 ) Add Comment ( https://shibboleth.atlassian.net/browse/JPAR-218#add-comment?atlOrigin=eyJpIjoiZWYxOGMzNmVlN2YwNDc0OGI0OTJjOTk1MDEwMWUxODEiLCJwIjoiaiJ9 )

Get Jira notifications on your phone! Download the Jira Cloud app for Android ( https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail ) or iOS ( https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8 ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100214- sha1:06410ea )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/commits/attachments/20230201/50c06319/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-static-comment-icon-72c30b57-8e59-47a2-ba22-0077612f166d
Type: image/png
Size: 1084 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20230201/50c06319/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-static-trivial-e5336bdd-f914-4f1f-9431-6d67fb1036d0
Type: image/png
Size: 446 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20230201/50c06319/attachment-0005.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-avatar-fdd501f8-b7b8-4dc1-bcca-e42ff4ad8936
Type: image/png
Size: 345 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20230201/50c06319/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-static-footer-desktop-logo-1bb7c093-450c-4600-b035-bc453e717bfd
Type: image/png
Size: 10805 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20230201/50c06319/attachment-0007.png>


More information about the commits mailing list