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

Remove hibernate package #16

Open
oscarhaglund opened this issue Nov 6, 2020 · 2 comments · May be fixed by #17
Open

Remove hibernate package #16

oscarhaglund opened this issue Nov 6, 2020 · 2 comments · May be fixed by #17

Comments

@oscarhaglund
Copy link

This library currently uses a class from Hibernate and my guess is that in order to keep the size of the lib small this class has been copied from hibernate into an org.hibernate.validator.internal.util package.
The problem is that using this package name in this library means it can not be used in a modular way with other libraries that depend on hibernate due to a package name conflict.

This library should either depend on hibernate or place this class somewhere within its own namespace (com.antkorwin.xsync).

@ppjangid
Copy link

after going throgh the code, it seems there is only one Class in the package org.hibernate.validator.internal.util which is
ConcurrentReferenceHashMap, and this class in used only in com.antkorwin.xsync.XMutexFactoryImpl Class.

ConcurrentReferenceHashMap is also available in org.springframework.util under spring-core, which is lighter than hibernate.

so if hibernate dependency is being considered, i think it's better to go with spring-core

@antkorwin
Copy link
Owner

Hi @oscarhaglund @ppjangid

ConcurrentReferenceHashMap implementation by Doug Lea (from hibernate) is not the same as the version from the Spring Framework. I had a few problems with the version from the Spring. Some stress tests are regularly failing with this implementation.

I will change the name of package for this class, of course.

@antkorwin antkorwin linked a pull request Nov 12, 2020 that will close this issue
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 a pull request may close this issue.

3 participants