[
https://issues.apache.org/jira/browse/JCLOUDS-273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13761752#comment-13761752
]
Andrew Phillips commented on JCLOUDS-273:
-----------------------------------------
Looking at the code, I think the null check is there to prevent the
"ImmutableMap.copyOf" from blowing up:
this.metadata = ImmutableMap.copyOf(checkNotNull(metadata, "metadata")); [1]
The Builder [2], which is the "public" way of creating Server objects, should
not require metadata. If you run across that in your code, please file a bug!
Thanks
[1]
https://github.com/jclouds/jclouds/blob/master/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/domain/Server.java#L334
[2]
http://javadocs.jclouds.cloudbees.net/org/jclouds/openstack/nova/v2_0/domain/Server.Builder.html
> JClouds OpenStack Nova v2.0 Server domian doesn't follow OpenStack formal
> documentation
> ---------------------------------------------------------------------------------------
>
> Key: JCLOUDS-273
> URL: https://issues.apache.org/jira/browse/JCLOUDS-273
> Project: jclouds
> Issue Type: Bug
> Components: jclouds-compute
> Reporter: Maty Grosz
>
> Using class org.jclouds.openstack.nova.v2_0.domain.Server – look at the
> constructor “protected Server(… parameters)”:
> OpenStack formal documentation says that the metadata attribute is optional.
> The constructor above calls to(checkNotNull(metadata, "metadata")) – and
> fails.
> No need to check that in this case.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira