Skip to content

Commit f78da9d

Browse files
committed
Add checkNotNull to FormatOptions.of method
1 parent 7e052da commit f78da9d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/FormatOptions.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
package com.google.gcloud.bigquery;
1818

19+
import static com.google.common.base.Preconditions.checkNotNull;
20+
1921
import com.google.common.base.MoreObjects;
2022

2123
import java.io.Serializable;
@@ -85,7 +87,7 @@ public static FormatOptions datastoreBackup() {
8587
* Default options for the provided format.
8688
*/
8789
public static FormatOptions of(String format) {
88-
if (format.equals(CSV)) {
90+
if (checkNotNull(format).equals(CSV)) {
8991
return csv();
9092
}
9193
return new FormatOptions(format);

0 commit comments

Comments
 (0)