Enforce that Preloaded SourceFile loaders are never created with `null` code.
@@ -19,7 +19,6 @@ package com.google.javascript.jscomp;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.base.Strings.isNullOrEmpty;
-import static com.google.common.base.Strings.nullToEmpty;
import static java.lang.Math.max;
import static java.lang.Math.min;
import static java.nio.charset.StandardCharsets.UTF_8;
@@ -658,7 +657,7 @@ public final class SourceFile implements StaticSourceFile, Serializable {
Preloaded(String preloadedCode) {
super();
- this.preloadedCode = nullToEmpty(preloadedCode);
+ this.preloadedCode = checkNotNull(preloadedCode);
}
@Override
