> + * Unless required by applicable law or agreed to in writing, software
> + * distributed under the License is distributed on an "AS IS" BASIS,
> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
> + * See the License for the specific language governing permissions and
> + * limitations under the License.
> + */
> +package org.jclouds.openstack.swift.blobstore.strategy.internal;
> +
> +public class MultipartNamingStrategy {
> +
> +    private static final String PART_SEPARATOR = "/";
> +
> +    protected String getPartName(String key, int partNumber, int totalParts) 
> {
> +        int base = (int)Math.log10(totalParts) + 1;
> +        String format = String.format("%%s%%s%%0%dd", base);
> +        return String.format(format, key, PART_SEPARATOR, partNumber);

Can you rewrite this more simply as:

```
return String.format("%s%s%0" + base + "d", key, PART_SEPARATOR, partNumber);
```

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

Reply via email to