stevedlawrence opened a new pull request, #1086:
URL: https://github.com/apache/daffodil/pull/1086

   When Scala serializes a Map, it uses writeReplace() to actually serialize a 
HashMap$SerializationProxy object. There appears to be a bug in the 
deserialization of this proxy object which can lead to very confusing 
diagnostics if classpaths are not set up correctly when reloading a saved 
parser.
   
   For example, if a layer transformer is not on the classpath when reloading, 
you could get an error mentioning only this HashMap$SerializationProxy and the 
ChoiceCombinator parser. It is not clear at all that the core issue is a layer 
transformer is not on the classpath.
   
   To fix this, this changes the choice combinator parsers and unparsers to use 
Java Maps instead. This do not have the deserialization issues that Scala Maps 
have. Now, if a layer transformer is not on the classpath you get a much more 
helpful diagnostic stating the saved parser was "created with a different set 
of dependencies containing a class no longer on the classpath", and includes 
the actual transformer factory class name, making it much more clear what the 
problem is.
   
   DAFFODIL-2728


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to