Skip to content

Commit

Permalink
Delegate the default implementation of `BugReporter#sendBugReport(Thr…
Browse files Browse the repository at this point in the history
…owable)` to `BugReporter#sendBugReport(Throwable, List, String...)`.

PiperOrigin-RevId: 364682636
  • Loading branch information
justinhorvitz authored and copybara-github committed Mar 24, 2021
1 parent db9467f commit a8ef70e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -276,11 +276,6 @@ private static void logException(Throwable exception, List<String> args, String.

private static final class DefaultBugReporter implements BugReporter {

@Override
public void sendBugReport(Throwable exception) {
BugReport.sendBugReport(exception);
}

@Override
public void sendBugReport(Throwable exception, List<String> args, String... values) {
BugReport.sendBugReport(exception, args, values);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
// limitations under the License.
package com.google.devtools.build.lib.bugreport;

import com.google.common.collect.ImmutableList;
import java.util.List;

/**
Expand All @@ -29,9 +30,11 @@ static BugReporter defaultInstance() {
}

/** Reports an exception, see {@link BugReport#sendBugReport(Throwable)}. */
void sendBugReport(Throwable exception);
default void sendBugReport(Throwable exception) {
sendBugReport(exception, /*args=*/ ImmutableList.of());
}

/** Reports an exception, see {@link BugReport#sendBugReport(Throwable, List, String[])}. */
/** Reports an exception, see {@link BugReport#sendBugReport(Throwable, List, String...)}. */
void sendBugReport(Throwable exception, List<String> args, String... values);

/** See {@link BugReport#handleCrash}. */
Expand Down

0 comments on commit a8ef70e

Please sign in to comment.