1
0
mirror of https://github.com/square/okhttp.git synced 2025-11-27 18:21:14 +03:00

Add null check to HttpLoggingInterceptor.setLevel()

This commit is contained in:
Artem Zinnatullin
2015-11-23 05:35:43 +03:00
parent ad02ea2280
commit ee1dee1322
2 changed files with 11 additions and 0 deletions

View File

@@ -125,6 +125,7 @@ public final class HttpLoggingInterceptor implements Interceptor {
/** Change the level at which this interceptor logs. */
public HttpLoggingInterceptor setLevel(Level level) {
if (level == null) throw new NullPointerException("level == null. Use Level.NONE instead.");
this.level = level;
return this;
}