> + @MapBinder(BindToJsonPayload.class) > + ResourceGroup create(@PathParam("name") String name, > @PayloadParam("location") String location, @Nullable > @PayloadParam("tags")Map<String, String> tags); > + > + @Named("resourcegroup:get") > + @GET > + @Path("/{name}") > + @Fallback(NullOnNotFoundOr404.class) > + @Nullable > + ResourceGroup get(@PathParam("name") String name); > + > + @Named("resourcegroup:update") > + @PATCH > + @Produces(MediaType.APPLICATION_JSON) > + @Path("/{name}") > + @Fallback(NullOnNotFoundOr404.class) > + @Nullable
I think I did not explain properly the intent of my comment. Let's better remove the `@Nullable` and the fallback. 404 fallbacks are tricky in update operations: when you're updating something it is under the assumption that the object exists. What would a `null` returned value mean? The operation completed successfully? The object was actually updated and its current value is null? Does it still exist? 404 fallbacks are useful for read operations, and we also use them for convenience in delete methods, but when updating objects it is not quite a good fit. We'd better remove it so a ResourceNotFound exception is propagated. (More background in [JCLOUDS-691](https://issues.apache.org/jira/browse/JCLOUDS-691)). --- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/250/files/d69ec53fd4b92d8f787d91bb58733c09181e47ac#r58668411