Skip to content

chore: add final to 258 leaf classes (non-extended, non-abstract, non-Impl)#561

Open
armando-rodriguez-cko wants to merge 1 commit intomasterfrom
chore/add-final-to-leaf-classes
Open

chore: add final to 258 leaf classes (non-extended, non-abstract, non-Impl)#561
armando-rodriguez-cko wants to merge 1 commit intomasterfrom
chore/add-final-to-leaf-classes

Conversation

@armando-rodriguez-cko
Copy link
Contributor

This pull request updates multiple classes across the codebase to make them final. By marking these classes as final, we prevent them from being subclassed, which can improve code safety, maintainability, and potentially performance. The changes are primarily focused on model, configuration, and utility classes.

Key changes include:

General codebase hardening:

  • Made exception classes such as CheckoutArgumentException and CheckoutAuthorizationException final to prevent further subclassing and reinforce their intended usage. [1] [2]
  • Marked key configuration and environment-related classes like CustomEnvironment, CustomTransportConfiguration, DefaultTransportConfiguration, Resilience4jConfiguration, and EnvironmentSubdomain as final. [1] [2] [3] [4] [5]
  • Updated utility and serializer classes, such as GsonSerializer and CustomAwsRedirectStrategy, to be final. [1] [2]

Model and response classes:

  • Marked various model classes and response wrappers as final, including ContentResponse, ItemsResponse, RequestMetrics, and several account-related classes (AccountsCorporateAccountHolder, AccountsIndividualAccountHolder, EntityFinancialDetails, EntityFinancialDocuments, EntityMemberResponse, EntityMembersResponse, InstrumentDetailsCardToken, InstrumentDetailsFasterPayments). [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]

These changes collectively ensure that these classes cannot be extended, which helps enforce their intended design and usage throughout the codebase.

…-Impl)

Systematic technical debt cleanup: all concrete classes that are not extended
by any other class in the codebase now declare final. Excludes *ClientImpl
classes (repo-wide convention without final) and Abstract* classes.
@armando-rodriguez-cko armando-rodriguez-cko requested a review from a team March 24, 2026 11:03
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant