Skip to content

Conversation

@KochTobi
Copy link
Contributor

Replaces #1230

@KochTobi KochTobi requested a review from a team as a code owner December 10, 2025 09:40
@github-actions github-actions bot added the fix label Dec 10, 2025
@KochTobi KochTobi changed the title Add client ID to ROR request Add client ID to ROR request and switch to APIv2 Dec 10, 2025
Copy link
Contributor

@sven1103 sven1103 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor but imo still notable requests

Co-authored-by: Sven F. <[email protected]>
@KochTobi KochTobi requested a review from sven1103 December 10, 2025 11:34
@KochTobi KochTobi requested a review from sven1103 December 11, 2025 06:48
Copy link
Contributor

@sven1103 sven1103 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @KochTobi , a huge improvement. I still have some suggestions about readability and error handling, that i would kindly ask you to have a look at.

@KochTobi KochTobi requested a review from sven1103 December 11, 2025 09:18
}

@Override
public String getDisplayedName() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The method signature does not indicate that an exception is thrown. Exceptions cause side effects and need to be taken into account by the client that calls the method. Why not making the method return value Optional in the first place?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should never be an exception as there should always be a display name in the v2 ROR API.
If there is not then an exception is appropriate. I would not annotate the method as I do not think we should ever expect that to happen.

throw new RorRequestException(e);
}

if (result.statusCode() == HttpStatus.NOT_FOUND_404) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

int in comparison vs an enum?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is not an enum but a static int value 😄

@sven1103 sven1103 self-requested a review December 11, 2025 09:53
sven1103
sven1103 previously approved these changes Dec 11, 2025
KochTobi and others added 2 commits December 11, 2025 11:10
Co-authored-by: Sven F. <[email protected]>
Copy link
Contributor

@sven1103 sven1103 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some valid sonar cloud warnings left. After they have been resolved i will happily approve your PR :D

Copy link
Contributor

@sven1103 sven1103 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great 🚀

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@KochTobi KochTobi merged commit 29d1f1b into main Dec 11, 2025
7 checks passed
@KochTobi KochTobi deleted the fix/provide-client-id-to-ror branch December 11, 2025 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants