xsync icon indicating copy to clipboard operation
xsync copied to clipboard

Remove hibernate package

Open oscarhaglund opened this issue 5 years ago • 2 comments

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).

oscarhaglund avatar Nov 06 '20 11:11 oscarhaglund

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

ppjangid avatar Nov 10 '20 07:11 ppjangid

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 avatar Nov 12 '20 12:11 antkorwin