-
Notifications
You must be signed in to change notification settings - Fork 145
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
Building null origins in RelyingParty #347
Comments
Sorry, I don't understand what you mean by this:
What are you trying to accomplish? |
If I want to build the RelyingParty object e.g.
If getOrigins is null, the builder fails with an NPE. I want to pass null through the builder, the constructor seems to allow null origins, and if it is null it sets the identity.getId()
Otherwise, I have to build the Relying Party object conditionally. |
What you're asking for is in fact the default behaviour, i.e., what you get if you do not call the
Does that solve your problem? |
Thanks for the quick reply. Yes, I am currently handling it conditionally, e.g. if the origins are not set (configured on my service) I just leave it out, and if it is set I call it. It would be easier not to make that decision when I am building the RelyingParty object, and just send through a null and let the builder handle it. But I get it is a convenience thing, so feel free to close this issue if it is not something you'd want to change. |
Fair enough, I had the same thought while looking into this. We'll consider it for the next release! |
Thank you. |
I think you should be able to build the RelyingParty object using a null Origins Set (it just takes the RP ID if it is). However, the builder will not allow it
Caused by: java.lang.NullPointerException: origins is marked non-null but is null
. I guess that is because of the nonnull annotation on the origins field.Version 2.5.0.
The text was updated successfully, but these errors were encountered: