> + *
> + * @author Ignasi Barrera
> + */
> +public class LocationNamingUtils {
> +
> + /**
> + * Extracts the region id for the given location.
> + *
> + * @param location The location to extract the region id from.
> + * @return The id of the region.
> + */
> + public static int extractRegionId(Location location) {
> + checkNotNull(location, "location cannot be null");
> + String regionIdAndName = location.getDescription();
> + int index = regionIdAndName.indexOf('/');
> + checkArgument(index >= 0, "location description should be in the form
> 'regionId/regionName'");
Here and below: add something like "but was '%s'" to the end of the error
message?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/63/files#r13060572