microsoftgraph / msgraph-sdk-java

Microsoft Graph SDK for Java
https://docs.microsoft.com/en-us/graph/sdks/sdks-overview
MIT License
374 stars 126 forks source link

Update Federated Identity Credential throws NullPointerException #2072

Closed irinaschubert closed 3 months ago

irinaschubert commented 3 months ago

Describe the bug

I am trying to use the patch() method as explained here https://learn.microsoft.com/en-us/graph/api/federatedidentitycredential-update?view=graph-rest-1.0&tabs=java for a federated identity credential in my code. But I get a NullPointerException when execute it: java.lang.NullPointerException: patch(...) must not be null. Other methods (get, post) on the endpoint work well.

Expected behavior

The request is fullfilled without error.

How to reproduce

Steps to reproduce:

SDK Version

6.13.0

Latest version known to work for scenario above?

No response

Known Workarounds

No response

Debug output

java.lang.NullPointerException: patch(...) must not be null

Configuration

Other information

No response

irinaschubert commented 3 months ago

I overlooked that the return type of the patch() Method in the SDK is nullable. I find this somewhat confusing because I ask myself: when is the object actually returned (as stated by the return type of the method) if not in the case of success? But the issue is hereby closed.