>
> return new Messages(messages, messagesWithHref.getLinks());
> }
>
> - private static String getMessageId(String rawMessageHref) {
> - // strip off everything but the message id
> - return rawMessageHref.substring(rawMessageHref.lastIndexOf('/')+1);
> + /**
> + * Strip off everything but the message id.
> + */
> + private static String getIdFromHref(String rawMessageHref) {
> + int indexOfQuestionMark = rawMessageHref.indexOf('?');
> + int lastIndexOfSlash = rawMessageHref.lastIndexOf('/') + 1;
> +
> + if (indexOfQuestionMark > 0) {
Safer to do `if (indexOfQuestionMark > lastIndexOfSlash )`?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/60/files#r8318853