Undocumented AttributeResolutionContext API change between 3.3 and 3.4

Etienne Dysli Metref etienne.dysli-metref at switch.ch
Mon Dec 3 08:33:36 EST 2018


Developers beware: a java.lang.NoSuchMethodError just bit me when I
deployed a class compiled against IdP 3.4.1 on a 3.3.2. It happened
because the class in question uses method
`net.shibboleth.idp.attribute.resolver.context.AttributeResolutionContext#setPrincipal`
and its signature changed in IdP 3.4:
- 3.3: `void setPrincipal(String)`
- 3.4: `AttributeResolutionContext setPrincipal(String)`

The only trace of this change that I could find is commit
1b9071076e1c137c11e7960ce6972b1de1215e1e in java-identity-provider.
Shouldn't this have been more prominently documented?

Moreover, I find it rather unusual for setters to return anything,
except in a builder-style API (but then methods aren't usually named
setX). So all-in-all that's not a big deal (*), but slightly frustrating
because I now have to recompile against 3.3 and it doesn't have the nice
Maven BOM POM... :/

  Etienne

(*) Unless this violates the IdP's versioning policy
(https://wiki.shibboleth.net/confluence/display/DEV/Java+Product+Version+Policy)
which says:

> Minor Version Compatibility
>  - Java API: may add/deprecate, but *not* remove, APIs

hmm oops!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://shibboleth.net/pipermail/dev/attachments/20181203/0c9e2aa7/attachment.sig>


More information about the dev mailing list