We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7921afd commit 384441aCopy full SHA for 384441a
aws-android-sdk-iot/src/main/java/com/amazonaws/mobileconnectors/iot/AwsIotEndpointUtility.java
@@ -91,8 +91,8 @@ static Region getRegionFromIotEndpoint(String endpoint) {
91
String endpointWithoutPort = stripPort(endpoint);
92
validateIotEndpoint(endpointWithoutPort);
93
String[] splits = splitEndpoint(endpointWithoutPort);
94
-
95
- return Region.getRegion(Regions.fromName(splits[ENDPOINT_REGION_OFFSET]));
+ int offset = splits.length == ENDPOINT_CN_ATS_SPLIT_SIZE?(ENDPOINT_REGION_OFFSET+1):ENDPOINT_REGION_OFFSET;
+ return Region.getRegion(Regions.fromName(splits[offset]));
96
}
97
98
/**
0 commit comments