OK, sorry I missed that other case. Thanks for the feedback. -Marshall
On 8/11/2016 3:53 PM, Richard Eckart de Castilho wrote: > On 11.08.2016, at 21:34, Marshall Schor <[email protected]> wrote: >> I see - you're using the TS part of the TSI to do lenient loading for >> Compressed >> Form 6. >> >> What about an API which expresses this more directly? >> >> E.g. >> >> load ( InputStream casInputStream, TypeSystem compressedForm6originalTS) ? >> >> Form 6 is always "lenient", if it is passed an original (meaning the one that >> corresponds to the serialized form) type system. >> >> Would this cover all the cases more directly (as an API)? > That would defy the content-auto-detection on the input stream, wouldn't it? > I'd have to reimplement the logic to detect if the stream is > form 6 or something else. If it is form 6, I'd use your suggested > method. If it is not, I'd use the regular method. Also doesn't sound > very attractive. > > As it is implemented right now, form 6 is not always lenient: > > - if "leniently" is true, then it is loaded leniently. If leniently > - is false and a TSI is specified, then the CAS is reinitialized. > > The good thing right now is that we have one load method which > covers all the cases. > > I know it's ugly because CASMgrSerializer is a internal class ... > ... but I don't really have a better idea. > > Cheers, > > -- Richard
