sbt/interface
Adriaan Moors 95da6ec5a6 `AbstractLazy`'s `writeObject` is `protected`
Fix for regression triggered by #2325 -- apparently, the API visitor would
force all the lazy stubs so the `AbstractLazy` `writeReplace` was not exercised.
With the private subtrees being ignored, the visitor didn't force the lazy stub,
and the `writeProtected` method was not inherited in `SafeLazy.Impl`.

From https://docs.oracle.com/javase/7/docs/api/java/io/Serializable.html
`writeReplace` must be protected for its override to be inherited.

> `Serializable` classes that need to designate an alternative object to be used
> when writing an object to the stream should implement this special method with
> the exact signature:
> `ANY-ACCESS-MODIFIER Object writeReplace() throws ObjectStreamException;`
>
> This `writeReplace` method is invoked by serialization if the method exists and
> it would be accessible from a method defined within the class of the object
> being serialized. Thus, the method can have `private`, `protected` and
> `package-private` access.
>
> **Subclass access to this method follows java accessibility rules.**

(Thanks to retronym for digging up the docs.)

The fix is captured, indirectly, by the scripted test
`source-dependencies/java-analysis-serialization-error`.
2015-12-21 22:19:30 -08:00
..
src `AbstractLazy`'s `writeObject` is `protected` 2015-12-21 22:19:30 -08:00
definition preserve API information needed for detecting annotations on defs. fixes #232 2011-10-19 22:23:47 -04:00
other Add hashing of public names defined in a source file. 2013-12-04 01:34:18 +01:00
type API extraction: handle any type that is annotated, not just the spec'd simple type. Fixes #559. 2012-10-05 09:06:35 -04:00