Throw exception in Java if log tag or message is null

Change-Id: If1d2cefcdf5441381bd6c06416cab24883d31481
Bug: webrtc:9357
Reviewed-on: https://webrtc-review.googlesource.com/80963
Commit-Queue: Paulina Hensman <phensman@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23510}
This commit is contained in:
Paulina Hensman
2018-06-04 16:32:49 +02:00
committed by Commit Bot
parent a24493e048
commit ac1501acd9

View File

@ -88,6 +88,9 @@ public class Logging {
}
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;