Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-1644

Configuration streams not reusable on IBM JVM


      This is a follow-up on https://hibernate.atlassian.net/browse/HV-563 which added the ability to reset configuration streams to be re-used when calling Configuration#buildValidatorFactory() multiple times. This however won't work on IBM JVM because it closes streams when creating an XMLEventReader out of them.

      This causes test failures in org.hibernate.validator.test.internal.engine.ConfigurationImplTest - tests testReusableConfigurationWithNonResettableInputStream and testReusableConfigurationWithInputStream

      Wrapping the configuration streams into a stream which ignores close() seems to resolve it - see https://github.com/jmartisk/hibernate-validator/commit/2060fb1e0e466155312d429001458d470a7d8251 but I wonder if not closing streams could lead to some resource leaks. Also perhaps this should be used only when IBM JVM is detected..

      Also see https://hibernate.atlassian.net/browse/HV-1007 for a related issue

            jmartisk@redhat.com Jan Martiska
            jmartisk@redhat.com Jan Martiska
            Jan Martiska Jan Martiska
            Jan Martiska Jan Martiska
            0 Vote for this issue
            2 Start watching this issue