> +      ContentMetadata meta = 
> BaseMutableContentMetadata.fromContentMetadata(input.getContentMetadata())
> +                                                       .toBuilder()
> +                                                       .contentLength(size)
> +                                                       .contentMD5(null)
> +                                                       .build();
> +
> +      if (input.getRawContent() instanceof File) {
> +         return doSlice((File) input.getRawContent(), meta);
> +      } else if (input.getRawContent() instanceof String) {
> +         return doSlice((String) input.getRawContent(), meta);
> +      } else if (input.getRawContent() instanceof byte[]) {
> +         return doSlice((byte[]) input.getRawContent(), meta);
> +      } else if (input.getRawContent() instanceof InputStream) {
> +         return doSlice((InputStream) input.getRawContent(), meta);
> +      } else {
> +         return doSlice(input, meta);

Why an "else" here if the assumption is that input is an `InputSupplier`? How 
about
```
else if (input instanceOf InputSupplier) {
...
} else {
  throw new ....
}
```
?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/192/files#r7291628

Reply via email to