From b89ea9452f1575be6d34fd2466c47b944edab9bb Mon Sep 17 00:00:00 2001 From: "Ray J. Greenwell" Date: Wed, 20 Mar 2013 18:05:26 -0700 Subject: [PATCH] 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. --- core/src/main/java/com/threerings/io/Streamer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/com/threerings/io/Streamer.java b/core/src/main/java/com/threerings/io/Streamer.java index e10e8be6c..3199d1e6a 100644 --- a/core/src/main/java/com/threerings/io/Streamer.java +++ b/core/src/main/java/com/threerings/io/Streamer.java @@ -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 " +