-
-
Notifications
You must be signed in to change notification settings - Fork 586
HH-563 #110
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
HH-563 #110
Conversation
… This will allow to reuse the Configuration even if xml configuration is used. Also introducing CloseIgnoringInputStream which prevents that JAXB closes the input stream. This should be done by the client anyways.
|
I think there is a problem if an We could avoid the repeated parsing of input streams by retrieving the configuration represented by each mapping stream only once and storing it for later re-use. If This might be done by using the same WDYT? |
Sure. That's similar to closing the input stream after the first invocation of buildValidatorFactory(). Because we are using _InputStream_s in Configuration we are getting into a grey area when it comes to reusing the configuration instance. It is our responsibility to cache the input stream data? I am not so sure. In the end the client can always wrap his provided InputStream into a BufferedInputStream. Maybe it is just a question of documenting this properly in the javadocs? We could also go down the route you are suggesting, but I don't find this so clean (caching against an input stream seems odd). |
…t a buffered input stream needs to be passed in order to make the configuration reusable
Or maybe we could do this ourselves in |
we could. I definitely prefer this over caching the config information. I am still not convinced so that we should do it though |
…e that the stream does not support mark/reset
|
@gunnarmorling I added the additional wrapping to validationBootstrapParameters.addMapping (at least for now). I think we are good on this for now. We might need to have another look once BVAL-282 is settled. |
|
+1 I'll apply the pull request asap. I'll just remove the JavaDoc comment on |
No description provided.