FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

JCL-476: Adjust ProblemDetails API by acoburn · Pull Request #1393 · inrupt/solid-client-java · GitHub

Repository navigation

JCL-476: Adjust ProblemDetails API - #1393

Merged
acoburn merged 4 commits into
mainfrom
JCL-476-problem-details
Jul 3, 2024
Merged

acoburn merged 4 commits into
mainfrom
JCL-476-problem-details

Conversation

acoburn commented Jul 2, 2024 •
edited
Loading

Copy link
Copy Markdown
Contributor

There are three significant changes to the ProblemsDetails API in this PR:

  • ProblemDetails::getDetails becomes ProblemDetails::getDetail. This aligns the implementation with the RFC
  • The ProblemDetails.DEFAULT_TYPE value is now a URI (instead of a String)
  • SolidClientException::fromErrorResponse has been refactored.
    • The autocloseable InputStream is now handled in a try-with-resources block to prevent resource leakage
    • The method accepts a response URI so that any relative URIs in the ProblemDetails body can be resolved correctly
    • The method is made package-private, since it is not used outside of the package and I don't see a reason to make it part of the public API
    • The logic has been reworked to remove duplication and simplify the flow considerably

In addition, the compiler arguments are changed from the old-style maven.compiler.source / maven.compiler.target to the new approach maven.compiler.release. This eliminates a troublesome compiler warning.

acoburn requested a review from a team as a code owner July 2, 2024 19:04
acoburn enabled auto-merge (squash) July 2, 2024 19:16
acoburn disabled auto-merge July 2, 2024 19:49
acoburn enabled auto-merge (squash) July 2, 2024 20:00
try (final InputStream input = new ByteArrayInputStream(body)) {
final Data pdData = jsonService.fromJson(input, Data.class);
final URI type = Optional.ofNullable(pdData.type)
.map(uri::resolve)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

The same is required for the instance URI

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Addressed in 89c65a3

Copy link
Copy Markdown

acoburn merged commit acbc518 into main Jul 3, 2024
acoburn deleted the JCL-476-problem-details branch July 3, 2024 15:00
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL