Skip to content

Remove final from getTargetRepositoryViaReflection #2360

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
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
* @author Christoph Strobl
* @author Jens Schauder
* @author John Blum
* @author Dennis Melzer
*/
public abstract class RepositoryFactorySupport implements BeanClassLoaderAware, BeanFactoryAware {

Expand Down Expand Up @@ -521,7 +522,7 @@ protected void validate(RepositoryMetadata repositoryMetadata) {
* @param constructorArguments
* @return
*/
protected final <R> R getTargetRepositoryViaReflection(RepositoryInformation information,
protected <R> R getTargetRepositoryViaReflection(RepositoryInformation information,
Object... constructorArguments) {

Class<?> baseClass = information.getRepositoryBaseClass();
Expand All @@ -537,7 +538,7 @@ protected final <R> R getTargetRepositoryViaReflection(RepositoryInformation inf
* @return
*/
@SuppressWarnings("unchecked")
protected final <R> R getTargetRepositoryViaReflection(Class<?> baseClass, Object... constructorArguments) {
protected <R> R getTargetRepositoryViaReflection(Class<?> baseClass, Object... constructorArguments) {
Optional<Constructor<?>> constructor = ReflectionUtils.findConstructor(baseClass, constructorArguments);

return constructor.map(it -> (R) BeanUtils.instantiateClass(it, constructorArguments))
Expand Down