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

Prevent instantiation of NamedParameterBatchUpdateUtils [SPR-17215] #21748

Closed
spring-projects-issues opened this issue Aug 26, 2018 · 2 comments
Closed
Assignees
Labels
in: data type: enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented Aug 26, 2018

sjh836 opened SPR-17215 and commented

I think the utility class should not create objects.
Most utility classes in the Spring Framework are therefore abstract classes.
But SocketUtils, NamedParameterBatchUpdateUtils and ReflectUtils are not abstract classes.
I added the abstract keyword to these classes, to prevent instantiation and to adapt coding conventions.


Referenced from: pull request #1943, and commits 08ba53d, 1dac0df

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Aug 26, 2018

Sam Brannen commented

As noted in the review on GitHub:

  1. ReflectUtils is repackaged from CGLIB, and we don't modify such classes.
  2. SocketUtils is intentionally not abstract so that it can be instantiated. See the JavaDoc for its constructor for details.

I am therefore changing the title and scope of this issue.

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Aug 27, 2018

Sam Brannen commented

This has been addressed in 1dac0df

@spring-projects-issues spring-projects-issues added in: data type: enhancement labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 5.1 RC3 milestone Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: data type: enhancement
Projects
None yet
Development

No branches or pull requests

2 participants