Skip to content

Commit

Permalink
Add checkNotNull to FormatOptions.of method
Browse files Browse the repository at this point in the history
  • Loading branch information
mziccard committed Dec 29, 2015
1 parent 7e052da commit f78da9d
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

package com.google.gcloud.bigquery;

import static com.google.common.base.Preconditions.checkNotNull;

import com.google.common.base.MoreObjects;

import java.io.Serializable;
Expand Down Expand Up @@ -85,7 +87,7 @@ public static FormatOptions datastoreBackup() {
* Default options for the provided format.
*/
public static FormatOptions of(String format) {
if (format.equals(CSV)) {
if (checkNotNull(format).equals(CSV)) {
return csv();
}
return new FormatOptions(format);
Expand Down

0 comments on commit f78da9d

Please sign in to comment.