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

Only force embedded H2 databases to be NOT_SHARED #309

Merged
merged 2 commits into from
Oct 30, 2023

Conversation

sleberknight
Copy link
Member

  • Add isH2EmbeddedDataStore to ApplicationErrorJdbc
  • Remove the erroneous implNote from isH2DataStore in ApplicationErrorJdbc; the method name tells you exactly wha it does
  • Change ErrorContextBuilder to force NOT_SHARED only when the data store type has already been set, and the JDBC URL in the DataSourceFactory is an H2 URL that is for an embedded connection.

Closes #306

* Add isH2EmbeddedDataStore to ApplicationErrorJdbc
* Remove the erroneous implNote from isH2DataStore in
  ApplicationErrorJdbc; the method name tells you
  exactly wha it does
* Change ErrorContextBuilder to force NOT_SHARED only
  when the data store type has already been set, and the
  JDBC URL in the DataSourceFactory is an H2 URL that
  is for an embedded connection.

Closes  #306
* Update isH2DataStore to check driver and URL
* No need to check blank URL in isH2EmbeddedDataStore anymore since
  we know it must be an H2 URL by that point in the code
* Introduce private isNotH2DataStore method because I just don't
  like reading !someThing(...) and prefer to see isNotSomeThing(...)
  in the main logic
* Update javadocs to match new logic
* IntelliJ reformatted some code, and I let it
@sleberknight sleberknight marked this pull request as ready for review October 28, 2023 22:09
@sonarcloud
Copy link

sonarcloud bot commented Oct 28, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@chrisrohr chrisrohr merged commit faab86f into master Oct 30, 2023
6 checks passed
@chrisrohr chrisrohr deleted the 306-only-force-embedded-h2-dbs-to-NOT-_SHARED branch October 30, 2023 13:53
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.

ErrorContextBuilder should only force embedded H2 databases to be DataStoreType.NOT_SHARED
2 participants