} else if (!inProductCodes) {
try {
String region = getRequest() != null ? AWSUtils.findRegionInArgsOrNull(getRequest()) : null;
if (region == null)
region = defaultRegion.get();
contents.add(new Image(region, architecture, this.name, description, imageId, imageLocation,
imageOwnerId, imageState, rawState, imageType, isPublic, productCodes, kernelId, platform,
ramdiskId, rootDeviceType, rootDeviceName, ebsBlockDevices, virtualizationType, hypervisor));
} catch (NullPointerException e) {
logger.warn(e, "malformed image: %s", imageId);
}