Program no longer terminates if .env file is not present (need for testing)
This commit is contained in:
@@ -5,7 +5,7 @@ import okhttp3.Request;
|
|||||||
|
|
||||||
public class APIAuthentication {
|
public class APIAuthentication {
|
||||||
|
|
||||||
private static Dotenv dotenv = Dotenv.load();
|
private static final Dotenv dotenv = Dotenv.configure().ignoreIfMissing().ignoreIfMalformed().load();
|
||||||
|
|
||||||
private APIAuthentication(){
|
private APIAuthentication(){
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ public class RecipeInformation {
|
|||||||
private final OkHttpClient client;
|
private final OkHttpClient client;
|
||||||
|
|
||||||
public RecipeInformation(){
|
public RecipeInformation(){
|
||||||
dotenv = Dotenv.load();
|
dotenv = Dotenv.configure().ignoreIfMissing().ignoreIfMalformed().load();
|
||||||
client = new OkHttpClient();
|
client = new OkHttpClient();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ public class RecipeSearch {
|
|||||||
|
|
||||||
public RecipeSearch(){
|
public RecipeSearch(){
|
||||||
rnd = new Random();
|
rnd = new Random();
|
||||||
dotenv = Dotenv.load();
|
dotenv = Dotenv.configure().ignoreIfMissing().ignoreIfMalformed().load();
|
||||||
recipeInformation = new RecipeInformation();
|
recipeInformation = new RecipeInformation();
|
||||||
client = new OkHttpClient();
|
client = new OkHttpClient();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user