Skip to content

Deprecate/Remove internal APIs in ScriptUtils implementations #26947

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

Closed
sbrannen opened this issue May 16, 2021 · 0 comments
Closed

Deprecate/Remove internal APIs in ScriptUtils implementations #26947

sbrannen opened this issue May 16, 2021 · 0 comments
Assignees
Labels
in: data Issues in data modules (jdbc, orm, oxm, tx) status: backported An issue that has been backported to maintenance branches type: enhancement A general enhancement
Milestone

Comments

@sbrannen
Copy link
Member

Overview

Various utility methods in the ScriptUtils implementations in spring-jdbc and spring-r2dbc are public but should not be since they are effectively internal APIs that no external client should call.

Public due to historical reasons in spring-jdbc

Some of these utility methods are public because of historical reasons -- for example, many of the public methods in ScriptUtils in spring-jdbc are only public because they were once invoked from JdbdTestUtils in spring-test, which is no longer the case.

Public by accident in spring-r2dbc

Some of these utility methods are public by accident -- for example, many of the public methods in ScriptUtils in spring-r2dbc are only public because they were copied from ScriptUtils in spring-jdbc without changing the visibility.

Methods to deprecate

  • splitSqlScript(...)
  • readScript(...)
  • containsSqlScriptDelimiters()
@sbrannen sbrannen added in: data Issues in data modules (jdbc, orm, oxm, tx) type: enhancement A general enhancement labels May 16, 2021
@sbrannen sbrannen added this to the 5.3.8 milestone May 16, 2021
@sbrannen sbrannen self-assigned this May 16, 2021
@spring-projects-issues spring-projects-issues added status: backported An issue that has been backported to maintenance branches and removed for: backport-to-5.2.x labels May 16, 2021
sbrannen added a commit that referenced this issue May 17, 2021
Prior to this commit, many of the utility methods in ScriptUtils in
spring-r2dbc were public by accident: they were copied from ScriptUtils
in spring-jdbc without changing the visibility when spring-r2dbc was
introduced in Spring Framework. 5.3 GA.

This commit corrects this mistake by removing internal APIs from
ScriptUtils in spring-r2dbc from the public contract.

See gh-26947
@sbrannen sbrannen changed the title Deprecate internal APIs in ScriptUtils implementations Deprecate/Remove internal APIs in ScriptUtils implementations May 17, 2021
sbrannen added a commit to sbrannen/spring-framework that referenced this issue May 18, 2021
sbrannen added a commit to sbrannen/spring-framework that referenced this issue May 18, 2021
sbrannen added a commit to sbrannen/spring-framework that referenced this issue May 18, 2021
sbrannen added a commit to sbrannen/spring-framework that referenced this issue May 18, 2021
Many of the utility methods in ScriptUtils are public only because they
were once invoked from JdbdTestUtils in spring-test, which is no longer
the case. Consequently, there should no longer be a need for any
external clients to invoke such methods.

To address, this commit formally deprecates the following methods in
ScriptUtils in spring-jdbc.

- readScript(...)
- containsSqlScriptDelimiters(...)
- splitSqlScript(...)

Closes spring-projectsgh-26947
lxbzmy pushed a commit to lxbzmy/spring-framework that referenced this issue Mar 26, 2022
Prior to this commit, many of the utility methods in ScriptUtils in
spring-r2dbc were public by accident: they were copied from ScriptUtils
in spring-jdbc without changing the visibility when spring-r2dbc was
introduced in Spring Framework. 5.3 GA.

This commit corrects this mistake by removing internal APIs from
ScriptUtils in spring-r2dbc from the public contract.

See spring-projectsgh-26947
lxbzmy pushed a commit to lxbzmy/spring-framework that referenced this issue Mar 26, 2022
lxbzmy pushed a commit to lxbzmy/spring-framework that referenced this issue Mar 26, 2022
lxbzmy pushed a commit to lxbzmy/spring-framework that referenced this issue Mar 26, 2022
lxbzmy pushed a commit to lxbzmy/spring-framework that referenced this issue Mar 26, 2022
Many of the utility methods in ScriptUtils are public only because they
were once invoked from JdbdTestUtils in spring-test, which is no longer
the case. Consequently, there should no longer be a need for any
external clients to invoke such methods.

To address this, this commit formally deprecates the following methods
in ScriptUtils in spring-jdbc.

- readScript(...)
- containsSqlScriptDelimiters(...)
- splitSqlScript(...)

Closes spring-projectsgh-26947
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: data Issues in data modules (jdbc, orm, oxm, tx) status: backported An issue that has been backported to maintenance branches type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants