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

Internal refactoring to use "options" class #300

Closed
sleberknight opened this issue Oct 24, 2023 · 0 comments · Fixed by #301
Closed

Internal refactoring to use "options" class #300

sleberknight opened this issue Oct 24, 2023 · 0 comments · Fixed by #301
Assignees
Labels
refactoring Code refactoring
Milestone

Comments

@sleberknight
Copy link
Member

Many of the internal classes, e.g. Jdbi3ErrorContext and SimpleErrorContext, have a lot (11) of constructor parameters. The utility methods in ErrorContextUtilities also have a fair number of arguments, though not nearly as many, which come from the set of constructor parameters to the context classes.

These options should be factored into a separate (internal for now) class which can be supplied to constructors and methods. This will both simplify the code, and provide a single location where any new options can be added without impacting existing code that uses them.

@sleberknight sleberknight added the refactoring Code refactoring label Oct 24, 2023
@sleberknight sleberknight added this to the 2.1.0 milestone Oct 24, 2023
@sleberknight sleberknight self-assigned this Oct 24, 2023
sleberknight added a commit that referenced this issue Oct 24, 2023
Note specifically that NO public APIs are affected.

* Introduce ErrorContextOptions class
* Refactor code to use the options class instead of large argument lists
* Add Checker Nullable annotation to methods in ErrorContextUtilities

Closes #300
chrisrohr pushed a commit that referenced this issue Oct 25, 2023
)

Note specifically that NO public APIs are affected.

* Introduce ErrorContextOptions class
* Refactor code to use the options class instead of large argument lists
* Add Checker Nullable annotation to methods in ErrorContextUtilities

Closes #300
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Code refactoring
Projects
None yet
1 participant