Merge pull request #61 from dralves/master

Issue 676: Simple change to avoid NPE when tranforming nova.domain.Image into compute.domain.Image
This commit is contained in:
Adrian Cole 2011-09-01 16:14:08 -07:00
commit de19f777a6
1 changed files with 1 additions and 1 deletions

View File

@ -46,7 +46,7 @@ public class NovaImageToImage implements Function<org.jclouds.openstack.nova.dom
builder.ids(from.getId() + "");
builder.name(from.getName() != null ? from.getName() : "unspecified");
builder.description(from.getName() != null ? from.getName() : "unspecified");
builder.version(from.getUpdated().getTime() + "");
builder.version(from.getUpdated() != null ? from.getUpdated().getTime() + "" : "-1");
builder.operatingSystem(imageToOs.apply(from)); //image name may not represent the OS type
builder.defaultCredentials(new Credentials("root", null));
builder.uri(from.getURI());