mirror of https://github.com/sbt/sbt.git
Merge pull request #10 from adriaanm/gkossakowski-nameHashing/private-members
Test & fix for regression in Lazy serialization uncovered by #2325
This commit is contained in:
commit
b76db70044
|
|
@ -3,11 +3,17 @@
|
|||
*/
|
||||
package xsbti.api;
|
||||
|
||||
import java.io.ObjectStreamException;
|
||||
import java.io.ObjectStreamException;
|
||||
|
||||
public abstract class AbstractLazy<T> implements Lazy<T>, java.io.Serializable
|
||||
{
|
||||
private Object writeReplace() throws ObjectStreamException
|
||||
// `writeReplace` must be `protected`, so that the `Impl` subclass
|
||||
// inherits the serialization override.
|
||||
//
|
||||
// (See source-dependencies/java-analysis-serialization-error, which would
|
||||
// crash trying to serialize an AbstractLazy, because it pulled in an
|
||||
// unserializable type eventually.)
|
||||
protected Object writeReplace() throws ObjectStreamException
|
||||
{
|
||||
return new StrictLazy<T>(get());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
public class Outer { private class T extends Thread {} }
|
||||
|
|
@ -0,0 +1 @@
|
|||
incOptions := incOptions.value.withNameHashing(true).withApiDebug(true)
|
||||
|
|
@ -0,0 +1 @@
|
|||
> compile
|
||||
Loading…
Reference in New Issue