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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user