Skip to content

Commit

Permalink
fix to support java 8 workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
shrutiburman committed Nov 1, 2023
1 parent 01aa761 commit 031e478
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/main/java/com/sendgrid/BaseInterface.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,14 @@ public abstract class BaseInterface implements SendGridAPI {
private static final String USER_AGENT = "sendgrid/" + VERSION + ";java";
private static final int RATE_LIMIT_RESPONSE_CODE = 429;
private static final int THREAD_POOL_SIZE = 8;
private static final Map<String, String> allowedRegionsHostMap = Map.of(
"eu", "api.eu.sendgrid.com",
"global", "api.sendgrid.com"
);

private static final Map<String, String> allowedRegionsHostMap;
static {
//todo: change this to Map.of() when we've moved on from Java 8
allowedRegionsHostMap = new HashMap<>();
allowedRegionsHostMap.put("eu", "api.eu.sendgrid.com");
allowedRegionsHostMap.put("global", "api.sendgrid.com");
}
private ExecutorService pool;

/**
Expand Down

0 comments on commit 031e478

Please sign in to comment.