Skip to content

Conversation

@tomwetjens
Copy link
Collaborator

@tomwetjens tomwetjens commented Apr 30, 2025

Fixes #153

Signed-off-by: Tom Wetjens <tom.wetjens@edsn.nl>
@MartenMeijboom98 MartenMeijboom98 requested a review from Copilot July 1, 2025 06:30
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR removes the HttpStatusCode enum from the codebase and updates exception handling to directly use primitive status codes with revised exception types.

  • Removed HttpStatusCode enum usage in tests and production code.
  • Updated exception handling and unit tests to work with int status codes and new exception types.
  • Consolidated exception flows in the receiving, sending, crypto, and XSD validation components.

Reviewed Changes

Copilot reviewed 27 out of 27 changed files in this pull request and generated no comments.

Show a summary per file
File Description
spring/src/test/java/org/lfenergy/shapeshifter/spring/service/receiving/UftpInternalControllerTest.java Updated tests to remove HttpStatusCode usage and adjust expected HTTP status codes.
spring/src/main/java/org/lfenergy/shapeshifter/spring/service/receiving/UftpInternalController.java Modified exception handling to use HttpStatusCode fields replaced with int values.
spring/src/main/java/org/lfenergy/shapeshifter/spring/service/handler/UftpPayloadDispatcher.java Replaced UftpConnectorException with UftpNotImplementedException for missing handler cases.
spring/src/main/java/org/lfenergy/shapeshifter/spring/service/handler/UftpNotImplementedException.java Introduced a new exception type for “not implemented” cases.
core/* Multiple updates in tests, serialization, crypto, sending, and XSD validation modules to reflect the removal of the HttpStatusCode enum and updated exception handling.
Comments suppressed due to low confidence (1)

spring/src/test/java/org/lfenergy/shapeshifter/spring/service/receiving/UftpInternalControllerTest.java:100

  • The test 'receiveUftpMessageUftpNotImplementedException' instantiates a UftpVerifyException but expects a 501 Not Implemented response, which may indicate a design mismatch. Consider using UftpNotImplementedException for not implemented scenarios to align the exception type with the expected HTTP status code.
  void receiveUftpMessageUftpNotImplementedException() {

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.

Invalid status code: 524

1 participant