Correct equals with incompatible types

Found via error-prone.
This commit is contained in:
Andrew Gaul 2016-04-24 23:27:57 -07:00
parent 66cda12b50
commit 6446627aad

View File

@ -357,7 +357,7 @@ public class EBSBootEC2ApiLiveTest extends BaseComputeServiceContextLiveTest {
imageIds(amiId)));
} catch (AWSResponseException e) {
// TODO add a retry handler for this HTTP code 400 and the below error
if (e.getError().getClass().equals("InvalidAMIID.NotFound"))
if (e.getError().getCode().equals("InvalidAMIID.NotFound"))
ebsImage = Iterables.getOnlyElement(client.getAMIApi().get().describeImagesInRegion(snapshot.getRegion(),
imageIds(amiId)));
else