Hey guys,
I have a problem with these too but i believe it is a bit more general.
CreateImageOptions extends UpdateImageOptions
and each has a its own public static Builder.
that means that if i do :

  CreateImageOptions diskFormat = CreateImageOptions.Builder.diskFormat(
                    <some Format>).size( <some size>);

then this code will not compile since i will get the UpdateImageOptions in
return from the Builder and i will have to use Casting (face palm) :

CreateImageOptions diskFormat = (CreateImageOptions)
CreateImageOptions.Builder.diskFormat(
                    <some Format>).size( <some size>);

may i suggest we use constructors that return "this".
so this kind of inheritance problems wont happen and we wont have to
Override every parameter in the parent in order of overcoming this (kinda
beats the idea of x extends y).

any thoughts/suggestions?

btw this code is in the jclouds openstack lab project...

           Regards Inbar

Reply via email to