Skip to content

Commit

Permalink
Merge pull request #46 from akdriggs/master
Browse files Browse the repository at this point in the history
Move to using RegionUtils.getRegion
  • Loading branch information
SalusaSecondus authored Mar 22, 2018
2 parents 6385048 + bee3b0d commit 5af4b07
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
import com.amazonaws.handlers.RequestHandler2;
import com.amazonaws.regions.Region;
import com.amazonaws.regions.Regions;
import com.amazonaws.regions.RegionUtils;
import com.amazonaws.services.kms.AWSKMS;
import com.amazonaws.services.kms.AWSKMSClient;
import com.amazonaws.services.kms.AWSKMSClientBuilder;
Expand Down Expand Up @@ -560,7 +561,7 @@ public KmsMasterKeyProvider withGrantTokens(String... grantTokens) {
private static Region getStartingRegion(final String keyArn) {
final String region = parseRegionfromKeyArn(keyArn);
if (region != null) {
return Region.getRegion(Regions.fromName(region));
return RegionUtils.getRegion(region);
}
final Region currentRegion = Regions.getCurrentRegion();
if (currentRegion != null) {
Expand Down

0 comments on commit 5af4b07

Please sign in to comment.