From e2f86a4f3c95a7b3175c57e6831df02f68eb9297 Mon Sep 17 00:00:00 2001 From: Dave Hoover Date: Fri, 17 Feb 2012 19:25:50 +0000 Subject: [PATCH] Nuke Resulting.ReusableInvocationException. Premature optimization the fun side effect of rendering the exception's attached stack trace completely useless. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6794 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../java/com/threerings/util/Resulting.java | 30 +------------------ 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/core/src/main/java/com/threerings/util/Resulting.java b/core/src/main/java/com/threerings/util/Resulting.java index 4f55db914..c348d2327 100644 --- a/core/src/main/java/com/threerings/util/Resulting.java +++ b/core/src/main/java/com/threerings/util/Resulting.java @@ -189,7 +189,7 @@ public class Resulting extends Invoker.Unit // from InvocationService.InvocationListener public final void requestFailed (String error) { - requestFailed(INV_EX.get().setMessage(error)); + requestFailed(new InvocationException(error)); } // from InvocationService.ConfirmListener @@ -266,34 +266,6 @@ public class Resulting extends Invoker.Unit protected Exception _error; - protected static final ThreadLocal INV_EX = - new ThreadLocal() { - @Override protected ReusableInvocationException initialValue () { - return new ReusableInvocationException(); - } - }; - - protected static class ReusableInvocationException extends InvocationException - { - public ReusableInvocationException () - { - super(""); - } - - public ReusableInvocationException setMessage (String msg) - { - _msg = msg; - return this; - } - - @Override public String getMessage () - { - return _msg; - } - - protected String _msg; - } - protected static final ThreadLocal STOP = new ThreadLocal() { @Override protected StopException initialValue () {