AmarGhugare opened a new pull request, #1883:
URL: https://github.com/apache/commons-lang/pull/1883

   `SerializationUtils.roundtrip` uses a plain `ObjectInputStream`, so it can 
deserialize an isolated-loader object into a same-named application-loader 
class. The returned object is then not an instance of the original type. 
Dynamic proxies similarly lose their original interface identity, and 
plugin-only classes fail with `ClassNotFoundException`.
   
   Delegate to the existing class-loader-aware `clone` implementation. This 
reuses its class and proxy resolution without adding an overload or a separate 
resolution implementation. If neither the original object's loader nor the 
context loader can resolve a class, retain the standard ObjectInputStream 
lookup as a final fallback. This preserves roundtrips of bootstrap-loaded 
collections containing application objects when the context loader is null or 
isolated. Null input still returns null.
   
   Three regressions fail before the fix: an isolated class with an 
application-loader namesake, an isolated proxy interface, and a compiled 
plugin-only Serializable class absent from the application and context loaders. 
A null-input guard is also included.
   
   Two additional compatibility cases protect standard class lookup when the 
context loader is null or isolated.
   
   Validation: all 46 SerializationUtils tests, Checkstyle, and SpotBugs pass. 
Full required Maven build: 118163 tests, zero failures/errors, 29 skipped; 
coverage, license, Checkstyle, binary compatibility, SpotBugs, PMD, and Javadoc 
checks pass.
   
   Jira filing is pending account approval.
   


-- 
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