[
https://issues.apache.org/jira/browse/JCLOUDS-625?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14062791#comment-14062791
]
ASF subversion and git services commented on JCLOUDS-625:
---------------------------------------------------------
Commit 22c5fbbd783f319c3c534de4348dab84fb26b220 in jclouds's branch
refs/heads/master from [~wernerbu]
[ https://git-wip-us.apache.org/repos/asf?p=jclouds.git;h=22c5fbb ]
JCLOUDS-625: Set VolumeBuilder id to nullable in VolumeImpl
VolumeBuilder does not allow null id while VolumeImpl allows it to be nullable.
> VolumeBuilder does not allow null id while VolumeImpl allows it to be nullable
> ------------------------------------------------------------------------------
>
> Key: JCLOUDS-625
> URL: https://issues.apache.org/jira/browse/JCLOUDS-625
> Project: jclouds
> Issue Type: Bug
> Components: jclouds-core
> Affects Versions: 1.8.0
> Reporter: Werner Buck
> Priority: Trivial
> Labels: builder, volumes
> Fix For: 1.8.0
>
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> I have been busy serializing Nodemetadata and all other Jclouds constructs
> and found that VolumeBuilder does a checkNotNull on id. However if .id("id")
> is not called it remains null for the VolumeImpl that is created when
> building.
> It is a small issue, and the fix is to remove CheckNotNull at VolumeBuilder,
> which should not break anything.
> While this is a really small bug, it means that during building of a volume,
> the user has to do a separate call and check if id is null before calling
> VolumeBuilder. The other Jclouds constructs
> Image/Hardware/NodeMetadata/Location/OperatingSystem can all be created in a
> single xxBuilder call.
> Details:
> See VolumeBuilder being used here without id with it not being supplied in
> many cases:
> https://github.com/jclouds/jclouds/blob/4c74b497547e42b8bdc94dbae3d4cd94ff3945d6/apis/cloudservers/src/test/java/org/jclouds/cloudservers/compute/functions/ServerToNodeMetadataTest.java
> I
> https://github.com/jclouds/jclouds/blob/4c74b497547e42b8bdc94dbae3d4cd94ff3945d6/compute/src/main/java/org/jclouds/compute/domain/VolumeBuilder.java
> Then see VolumeImpl allowing a Nullable id:
> https://github.com/jclouds/jclouds/blob/4c74b497547e42b8bdc94dbae3d4cd94ff3945d6/compute/src/main/java/org/jclouds/compute/domain/internal/VolumeImpl.java
--
This message was sent by Atlassian JIRA
(v6.2#6252)