http://code.google.com/p/typica/source/detail?r=332
Modified:
/trunk/java/com/xerox/amazonws/ec2/ReservationDescription.java
=======================================
--- /trunk/java/com/xerox/amazonws/ec2/ReservationDescription.java Mon Mar
22 07:40:01 2010
+++ /trunk/java/com/xerox/amazonws/ec2/ReservationDescription.java Thu Jul
8 08:45:37 2010
@@ -26,6 +26,7 @@
import com.xerox.amazonws.typica.jaxb.GroupItemType;
import com.xerox.amazonws.typica.jaxb.GroupSetType;
import com.xerox.amazonws.typica.jaxb.InstanceBlockDeviceMappingItemType;
+import
com.xerox.amazonws.typica.jaxb.InstanceBlockDeviceMappingResponseType;
import
com.xerox.amazonws.typica.jaxb.InstanceBlockDeviceMappingResponseItemType;
import com.xerox.amazonws.typica.jaxb.InstanceStateType;
import com.xerox.amazonws.typica.jaxb.ProductCodesSetItemType;
@@ -237,13 +238,16 @@
this.rootDeviceType = rsp_item.getRootDeviceType();
this.rootDeviceName = rsp_item.getRootDeviceName();
this.blockDeviceMapping = new ArrayList<InstanceBlockDeviceMapping>();
- List<InstanceBlockDeviceMappingResponseItemType> bdmSet =
rsp_item.getBlockDeviceMapping().getItems();
- if (bdmSet != null) {
- for (InstanceBlockDeviceMappingResponseItemType mapping : bdmSet) {
- EbsInstanceBlockDeviceMappingResponseType ebs = mapping.getEbs();
- this.blockDeviceMapping.add(new
InstanceBlockDeviceMapping(mapping.getDeviceName(), ebs.getVolumeId(),
- ebs.getStatus(), ebs.getAttachTime().toGregorianCalendar(),
- ebs.isDeleteOnTermination()));
+ InstanceBlockDeviceMappingResponseType bdmType =
rsp_item.getBlockDeviceMapping();
+ if (bdmType != null) {
+ List<InstanceBlockDeviceMappingResponseItemType> bdmSet =
bdmType.getItems();
+ if (bdmSet != null) {
+ for (InstanceBlockDeviceMappingResponseItemType mapping : bdmSet) {
+ EbsInstanceBlockDeviceMappingResponseType ebs = mapping.getEbs();
+ this.blockDeviceMapping.add(new
InstanceBlockDeviceMapping(mapping.getDeviceName(), ebs.getVolumeId(),
+ ebs.getStatus(), ebs.getAttachTime().toGregorianCalendar(),
+ ebs.isDeleteOnTermination()));
+ }
}
}
this.instanceLifecycle = rsp_item.getInstanceLifecycle();