microsoftgraph / microsoftgraph/msgraph-sdk-java

GetRequestConfiguration.queryParameters is wrongly annotated as Nullable

Open
#2,284 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status:waiting-for-triage type:bug
Dominant language
Java
Stars
444
Forks
154
Avg merge
18h 28m
Merged PRs (30d)
4

Description

Describe the bug

com.microsoft.graph.users.UsersRequestBuilder.GetRequestConfiguration#queryParameters is annotated as @Nullable, giving an IDE warning. However, it is always initialized to a non-null value.

_graphClient.users().get(config -> {
   config.queryParameters.select = new String[] { ... };
   // ^^^^^^^^^^^^^^^^^^^ Warning here, because it might be null
});
Expected behavior

No IDE warning.

How to reproduce

Install SDK in IntelliJ and past the above code.

SDK Version

6.26.0

Latest version known to work for scenario above?

No response

Known Workarounds

Silence IDE warning for that line.

Debug output

No response

Configuration

No response

Other information

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with com.microsoft.graph.users.UsersRequestBuilder.GetRequestConfiguration and inspect the annotation on queryParameters. Verify the generated SDK behavior and IntelliJ warning using the reproduction snippet; done means queryParameters is represented as non-null without an IDE warning.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.