Github user ahgittin commented on a diff in the pull request:
https://github.com/apache/incubator-brooklyn/pull/161#discussion_r17530289
--- Diff: usage/rest-api/src/main/java/brooklyn/rest/api/ServerApi.java ---
@@ -53,7 +53,8 @@
@Consumes({MediaType.APPLICATION_FORM_URLENCODED})
public void shutdown(
@FormParam("stopAppsFirst") @DefaultValue("false") boolean
stopAppsFirst,
- @FormParam("delayMillis") @DefaultValue("250") long delayMillis);
+ @FormParam("delayMillis") @DefaultValue("250") long delayMillis,
--- End diff --
and add `@ApiParam` ? i now appreciate that the API here previously took
longs so you just followed that pattern, but i think we should move towards
consistency. to preserve backwards compatibility we could have
@ApiParam(name = "delay", value = "Minimum delay before system.exit",
required = false)
@FormParam("delay") @DefaultValue("250ms") String delay,
@ApiParam(name = "delayMillis", value = "Deprecated delay before
timeout", required = false)
@FormParam("delayMillis") Long delayMillis
and then in the code have an `if (delayMillis!=null) { /* log warn of
deprecated, and use this value */ }`
?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---