Created
November 15, 2014 20:12
Revisions
-
akhikhl created this gist
Nov 15, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,24 @@ // The code below produces ClassNotFoundError. How to fix it? import groovy.transform.ToString @ToString class P2ModuleSource implements Serializable { private static final long serialVersionUID = 3526473395612776159L List uris P2ModuleSource(List uris) { this.uris = uris } } def x = new P2ModuleSource(['aaa', 'bbb']) def outBytes = new ByteArrayOutputStream() def outs = new ObjectOutputStream(outBytes) outs.writeObject(x) outs.close() def bytes = outBytes.toByteArray() def inBytes = new ByteArrayInputStream(bytes) def ins = new ObjectInputStream(inBytes) def y = ins.readObject()