Use Preconditions#checkNotNull vs. #checkArgument

This commit is contained in:
Chris Beams 2014-11-11 21:56:44 +01:00
parent ccd5f815f8
commit 15a6d8a295
No known key found for this signature in database
GPG Key ID: 3D214F8F5BC5ED73

View File

@ -27,7 +27,6 @@ import io.bitsquare.gui.util.ImageUtil;
import io.bitsquare.persistence.Persistence;
import io.bitsquare.user.User;
import com.google.common.base.Preconditions;
import com.google.common.base.Throwables;
import com.google.inject.Guice;
@ -47,6 +46,7 @@ import javafx.stage.Stage;
import org.springframework.core.env.Environment;
import static com.google.common.base.Preconditions.checkNotNull;
import static io.bitsquare.app.BitsquareEnvironment.*;
public class BitsquareApp extends Application {
@ -61,8 +61,7 @@ public class BitsquareApp extends Application {
@Override
public void start(Stage primaryStage) throws IOException {
Preconditions.checkArgument(env != null, "Environment must not be null");
checkNotNull(env, "Environment must not be null");
bitsquareAppModule = new BitsquareAppModule(env, primaryStage);
injector = Guice.createInjector(bitsquareAppModule);