-
Bug
-
Resolution: Done
-
Major
-
4.5.3.Final
-
None
-
None
The resteasy-validator-provider class org.jboss.resteasy.plugins.validation.SimpleViolationsContainer is using HibernateValidator impl classes as given below.
import org.hibernate.validator.internal.engine.path.NodeImpl; import org.hibernate.validator.internal.metadata.descriptor.ConstraintDescriptorImpl; // method private static boolean compareNode(Node n1, Node n2) if (!(n1 instanceof NodeImpl)) { return false; } NodeImpl ni1 = (NodeImpl) n1; NodeImpl ni2 = (NodeImpl) n2; if (ni1.getIndex() == null) { if (ni2.getIndex() != null) { return false; } } // method static boolean compareConstraintViolation(ConstraintViolation<?> cv1, ConstraintViolation<?> cv2) if (cv1.getConstraintDescriptor() instanceof ConstraintDescriptorImpl && cv2.getConstraintDescriptor() instanceof ConstraintDescriptorImpl) { ConstraintDescriptorImpl<?> cdi1 = (ConstraintDescriptorImpl<?>) cv1.getConstraintDescriptor(); ConstraintDescriptorImpl<?> cdi2 = (ConstraintDescriptorImpl<?>) cv2.getConstraintDescriptor(); if (cdi1.getElementType() != null ? !cdi1.getElementType().equals(cdi2.getElementType()) : cdi2.getElementType() != null) { return false; } }
I am using HibernateValidator bundle in OSGi and the impl packages are not being exported which results in my RESTEasy based REST service bundle not being resolved.
Can we somehow stick to interfaces so that any reference to impl packages to be avoided?
Thanks,
Rakesh