Removes deprecated HttpThrowableReporter

Change-Id: I1546cddde2889cf743f7f6146df99b81dfcfd145
diff --git a/tools/api-checker/config/gwt27_28userApi.conf b/tools/api-checker/config/gwt27_28userApi.conf
index 44c23ec..b27ed0e 100644
--- a/tools/api-checker/config/gwt27_28userApi.conf
+++ b/tools/api-checker/config/gwt27_28userApi.conf
@@ -157,3 +157,6 @@
 java.util.IdentityHashMap::hasStringValue(Ljava/lang/String;) MISSING
 java.util.IdentityHashMap::putStringValue(Ljava/lang/String;Ljava/lang/Object;) MISSING
 java.util.IdentityHashMap::removeStringValue(Ljava/lang/String;) MISSING
+
+# Removed deprecated HttpThrowableReporter
+com.google.gwt.core.client.HttpThrowableReporter MISSING
\ No newline at end of file
diff --git a/user/src/com/google/gwt/core/client/HttpThrowableReporter.java b/user/src/com/google/gwt/core/client/HttpThrowableReporter.java
deleted file mode 100644
index 60ffaf5..0000000
--- a/user/src/com/google/gwt/core/client/HttpThrowableReporter.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Copyright 2009 Google Inc.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.google.gwt.core.client;
-
-import com.google.gwt.core.client.GWT.UncaughtExceptionHandler;
-
-/**
- * This is a utility class which can report Throwables to the server via a
- * JSON-formatted payload.
- *
- * @deprecated Use {@link JsonLogRecordClientUtil} instead.
- */
-@Deprecated
-public final class HttpThrowableReporter {
-
-  private static class MyHandler implements UncaughtExceptionHandler {
-    private final String url;
-
-    public MyHandler(String url) {
-      this.url = url;
-    }
-
-    public void onUncaughtException(Throwable e) {
-      report(url, e);
-    }
-  }
-
-  /**
-   * Installs an {@link UncaughtExceptionHandler} that will automatically invoke
-   * {@link #report(String, Throwable)}.
-   *
-   * @param url A URL that is suitable for use with {@code XMLHttpRequest}
-   */
-  public static void installUncaughtExceptionHandler(String url) {
-    GWT.setUncaughtExceptionHandler(new MyHandler(url));
-  }
-
-  /**
-   * Report a Throwable to the server. This method will sent an HTTP <code>POST</code> request with a
-   * JSON-formatted payload. The payload will consist of a single JSON object with the following
-   * keys:
-   * <dl>
-   * <dt>strongName</dt>
-   * <dd>The result of calling {@link GWT#getPermutationStrongName()}</dd>
-   * <dt>message</dt>
-   * <dd>The result of calling {@link Throwable#getMessage()}</dd>
-   * <dt>stackTrace</dt>
-   * <dd>A list of the methods names in the Throwable's stack trace, derived from
-   * {@link StackTraceElement#getMethodName()}.</dd>
-   * </dl>
-   *
-   * The response from the server is ignored.
-   *
-   * @param url A URL that is suitable for use with {@code XMLHttpRequest}
-   * @param t The Throwable to report
-   * @return <code>true</code> if the request was successfully initiated
-   * @see com.google.gwt.core.linker.SymbolMapsLinker
-   */
-  public static native boolean report(String url, Throwable t) /*-{
-    try {
-      var xhr = new XMLHttpRequest();
-      xhr.open("POST", url);
-      xhr.send(@HttpThrowableReporter::buildPayload(*)(t));
-      return true;
-    } catch (e) {
-      return false;
-    }
-  }-*/;
-
-  /**
-   * Visible for testing.
-   */
-  static String buildPayload(Throwable t) {
-    StringBuilder sb = new StringBuilder();
-    sb.append("{\"strongName\" : ");
-    sb.append(JsonUtils.escapeValue(GWT.getPermutationStrongName()));
-    sb.append(",\"message\" : ");
-    sb.append(JsonUtils.escapeValue(t.getMessage()));
-
-    sb.append(",\"stackTrace\" : [");
-    boolean needsComma = false;
-    for (StackTraceElement e : t.getStackTrace()) {
-      if (needsComma) {
-        sb.append(",");
-      } else {
-        needsComma = true;
-      }
-
-      sb.append(JsonUtils.escapeValue(e.getMethodName()));
-    }
-    sb.append("]}");
-
-    return sb.toString();
-  }
-
-  private HttpThrowableReporter() {
-  }
-}
diff --git a/user/test/com/google/gwt/core/CoreSuite.java b/user/test/com/google/gwt/core/CoreSuite.java
index 5cc1fe1..dd90a7a 100644
--- a/user/test/com/google/gwt/core/CoreSuite.java
+++ b/user/test/com/google/gwt/core/CoreSuite.java
@@ -17,7 +17,6 @@
 
 import com.google.gwt.core.client.GWTTest;
 import com.google.gwt.core.client.GwtServletBaseTest;
-import com.google.gwt.core.client.HttpThrowableReporterTest;
 import com.google.gwt.core.client.JavaScriptExceptionTest;
 import com.google.gwt.core.client.JavaScriptObjectTest;
 import com.google.gwt.core.client.JsArrayMixedTest;
@@ -49,7 +48,6 @@
     suite.addTestSuite(CoercionsTest.class);
     suite.addTestSuite(GwtServletBaseTest.class);
     suite.addTestSuite(GWTTest.class);
-    suite.addTestSuite(HttpThrowableReporterTest.class);
     suite.addTestSuite(ImplTest.class);
     suite.addTestSuite(JavaScriptExceptionTest.class);
     suite.addTestSuite(JavaScriptObjectTest.class);
diff --git a/user/test/com/google/gwt/core/client/HttpThrowableReporterTest.java b/user/test/com/google/gwt/core/client/HttpThrowableReporterTest.java
deleted file mode 100644
index 6e9fafe..0000000
--- a/user/test/com/google/gwt/core/client/HttpThrowableReporterTest.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright 2009 Google Inc.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.google.gwt.core.client;
-
-import com.google.gwt.junit.client.GWTTestCase;
-
-/**
- * Tests the HttpThrowableReporter.
- */
-public class HttpThrowableReporterTest extends GWTTestCase {
-  private static final class Payload extends JavaScriptObject {
-    protected Payload() {
-    }
-
-    public native String getMessage() /*-{
-      return this.message;
-    }-*/;
-
-    public native JsArrayString getStackTrace() /*-{
-      return this.stackTrace;
-    }-*/;
-
-    public native String getStrongName() /*-{
-      return this.strongName;
-    }-*/;
-  }
-
-  @Override
-  public String getModuleName() {
-    return "com.google.gwt.core.Core";
-  }
-
-  public void testPayload() {
-    String payload;
-    Throwable e;
-
-    try {
-      throw new RuntimeException("foo");
-    } catch (Throwable t) {
-      e = t;
-      payload = HttpThrowableReporter.buildPayload(t);
-    }
-
-    assertNotNull(payload);
-    Payload p = JsonUtils.unsafeEval(payload);
-
-    assertEquals("foo", p.getMessage());
-    assertEquals(GWT.getPermutationStrongName(), p.getStrongName());
-
-    JsArrayString stack = p.getStackTrace();
-    assertNotNull(stack);
-    assertEquals(e.getStackTrace().length, stack.length());
-
-    for (int i = 0, j = e.getStackTrace().length; i < j; i++) {
-      assertEquals(e.getStackTrace()[i].getMethodName(), stack.get(i));
-    }
-  }
-}