> + */
> +package org.jclouds.glacier.predicates.validators;
> +
> +import org.jclouds.javax.annotation.Nullable;
> +import org.jclouds.predicates.Validator;
> +
> +/**
> + * Validates the part size parameter used when initiating multipart uploads.
> + */
> +public final class PartSizeValidator extends Validator<Integer> {
> + private static final int MIN_PART_SIZE = 1;
> + private static final int MAX_PART_SIZE = 4096;
> +
> + @Override
> + public void validate(@Nullable Integer partSizeInMB) throws
> IllegalArgumentException {
> + if (partSizeInMB == null || partSizeInMB < MIN_PART_SIZE ||
Do `Preconditions.checkArgument` and `checkNotNull` make this more succinct?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-aws/pull/18/files#r13948592