Skip to content

Commit

Permalink
Throw exception in Java if log tag or message is null
Browse files Browse the repository at this point in the history
Change-Id: If1d2cefcdf5441381bd6c06416cab24883d31481
Bug: webrtc:9357
Reviewed-on: https://webrtc-review.googlesource.com/80963
Commit-Queue: Paulina Hensman <[email protected]>
Reviewed-by: Magnus Jedvert <[email protected]>
Cr-Commit-Position: refs/heads/master@{#23510}
  • Loading branch information
Paulina Hensman authored and Commit Bot committed Jun 4, 2018
1 parent a24493e commit ac1501a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions rtc_base/java/src/org/webrtc/Logging.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ public static synchronized void enableLogToDebugOutput(Severity severity) {
}

public static void log(Severity severity, String tag, String message) {
if (tag == null || message == null) {
throw new IllegalArgumentException("Logging tag or message may not be null.");
}
if (loggingEnabled) {
nativeLog(severity.ordinal(), tag, message);
return;
Expand Down

0 comments on commit ac1501a

Please sign in to comment.