Remove hibernate package
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).
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
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.