Skip to content

Add missing null check and @Nullable #2995

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

Closed
wants to merge 1 commit into from

Conversation

quaff
Copy link
Contributor

@quaff quaff commented Jun 2, 2023

  1. null check on variable metadata is missing in method existsById
  2. CrudMethodMetadata::getComment should be @Nullable

Fix GH-2991

1. null check on variable `metadata` is missing in method `existsById`
2. `CrudMethodMetadata::getComment` should be `@Nullable`

Fix spring-projectsGH-2991
@quaff
Copy link
Contributor Author

quaff commented Jun 2, 2023

There is another question, does fetch graphs really needed for exists and delete operations?

@mp911de mp911de self-assigned this Jun 2, 2023
@mp911de mp911de added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Jun 2, 2023
@mp911de mp911de added this to the 3.0.7 (2022.0.7) milestone Jun 2, 2023
mp911de pushed a commit that referenced this pull request Jun 2, 2023
1. null check on variable `metadata` is missing in method `existsById`
2. `CrudMethodMetadata::getComment` should be `@Nullable`

Closes #2991
Original pull request: #2995
mp911de added a commit that referenced this pull request Jun 2, 2023
Reuse comment hint retrieval. Reorder methods. Inline methods and use fluent API where possible.

See #2991
Original pull request: #2995
mp911de pushed a commit that referenced this pull request Jun 2, 2023
1. null check on variable `metadata` is missing in method `existsById`
2. `CrudMethodMetadata::getComment` should be `@Nullable`

Closes #2991
Original pull request: #2995
mp911de added a commit that referenced this pull request Jun 2, 2023
Reuse comment hint retrieval. Reorder methods. Inline methods and use fluent API where possible.

See #2991
Original pull request: #2995
mp911de pushed a commit that referenced this pull request Jun 2, 2023
1. null check on variable `metadata` is missing in method `existsById`
2. `CrudMethodMetadata::getComment` should be `@Nullable`

Closes #2991
Original pull request: #2995
mp911de added a commit that referenced this pull request Jun 2, 2023
Reuse comment hint retrieval. Reorder methods. Inline methods and use fluent API where possible.

See #2991
Original pull request: #2995
@mp911de
Copy link
Member

mp911de commented Jun 2, 2023

Thank you for your contribution. That's merged, polished, and backported now.

@mp911de mp911de closed this Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

existsById(…) fails with NullPointerException when metadata does not exist
3 participants