> + }
> + }
> +
> + private String getObjectManifest(String container, String key) {
> + MutableObjectInfoWithMetadata objectInfo =
> sync.getObjectInfo(container, key);
> + return objectInfo == null ? null : objectInfo.getObjectManifest();
> + }
> +
> + private void removeObjectsWithPrefix(String containerAndPrefix) {
> + int separatorIndex = containerAndPrefix.indexOf('/');
> + checkArgument(separatorIndex >= 0,
> + "No / separator found in \"%s\"",
> + containerAndPrefix);
> +
> + String container = containerAndPrefix.substring(0, separatorIndex);
> + String prefix = containerAndPrefix.substring(separatorIndex + 1);
I've done something similar in e42f4f77000a160f4eafef2cc5d2f954108df897. I
created a `splitContainerAndKey` method so I could unit test it to check it
worked. I used the name `splitContainerAndKey` instead of
`splitContainerAndPrefix` because 'key' is more general than 'prefix' and this
method is potentially reusable. I then explicitly did `String prefix =
parts[1]` to try to make it clear that I was deliberately treating the 'key'
part of the string as a prefix.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/123/files#r5929187