Fail with an informative message if there are NO constructors.

Which shouldn't happen.
And re: the last commit, this is only called once for each class
so the deal wasn't so big.
This commit is contained in:
Ray J. Greenwell
2013-03-20 18:05:26 -07:00
parent 09ff91cbdb
commit b89ea9452f
@@ -425,7 +425,7 @@ public abstract class Streamer
// otherwise there should be a single non-zero-argument constructor, which we'll call
// with zero-valued arguments at unstreaming time, which will then be overwritten by
// readObject()
if (ctors.length > 1) {
if (ctors.length != 1) {
throw new RuntimeException(
"Streamable closure classes must have either a zero-argument constructor " +
"or a single argument-taking constructor; multiple argument-taking " +