Skip to content
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

feature: eclipse-tractusx/traceability-foss#639 add catch clause #698

Conversation

ds-lcapellino
Copy link
Contributor

Description

Pre-review checks

Please ensure to do as many of the following checks as possible, before asking for committer review:

@@ -39,4 +42,12 @@ public EdcClientException(final Throwable cause) {
public EdcClientException(final String msg) {
super(msg);
}

public String getBusinessPartnerNumber() {
Copy link
Contributor

Choose a reason for hiding this comment

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

@ds-lcapellino,

this violates the Liskov Substitution Principle (LSP):

The base exception class EdcClientException throws NotImplementedException for the methods getBusinessPartnerNumber() and getPolicy(). If subclasses override these methods to provide actual implementations, then the behavior of instances of the subclass when accessed via a reference of the superclass will differ from those of the superclass.

This can lead to unexpected behavior at runtime if the code handling exceptions assumes that these methods are always implemented (since they're part of the class's interface), leading to potential runtime errors or crashes.

Maybe there is a better solution using a common interface?

@ds-lcapellino ds-lcapellino force-pushed the feature/639-handle-policy-expiration branch from ebea478 to 3a53557 Compare July 10, 2024 08:15
Copy link
Contributor

@ds-jhartmann ds-jhartmann left a comment

Choose a reason for hiding this comment

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

LGTM

@ds-jhartmann ds-jhartmann merged commit da3bc67 into eclipse-tractusx:main Jul 10, 2024
14 of 16 checks passed
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.

3 participants