Source:
<code>public static void composeObject_test1() throws Exception { String methodName = "composeObject(String bucketName, String objectName,List<ComposeSource> composeSources, " + "Map <String,String > headerMap, ServerSideEncryption sseTarget)"; if (!mintEnv) { System.out.println("Test :" + methodName); } long startTime = System.currentTimeMillis(); String mintArgs = "size: 6 MB & 6 MB "; try { String destinationObjectName = getRandomName(); String filename1 = createFile6Mb(); String filename2 = createFile6Mb(); PutObjectOptions options = new PutObjectOptions(6 * MB, -1); client.putObject(bucketName, filename1, filename1, options); client.putObject(bucketName, filename2, filename2, options); ComposeSource s1 = new ComposeSource(bucketName, filename1, null, null, null, null, null); ComposeSource s2 = new ComposeSource(bucketName, filename2, null, null, null, null, null); List<ComposeSource> listSourceObjects = new ArrayList<ComposeSource>(); listSourceObjects.add(s1); listSourceObjects.add(s2); try { client.composeObject(bucketName, destinationObjectName, listSourceObjects, null, null); client.removeObject( RemoveObjectArgs.builder().bucket(bucketName).object(destinationObjectName).build()); } finally { <START> Files.delete(Paths.get(filename1)); Files.delete(Paths.get(filename2)); client.removeObject( RemoveObjectArgs.builder().bucket(bucketName).object(filename1).build()); client.removeObject( RemoveObjectArgs.builder().bucket(bucketName).object(filename2).build()); <END> } mintSuccessLog(methodName, mintArgs, startTime); } catch (Exception e) { handleException(methodName, mintArgs, startTime, e); } }</code><technical_language>suggestion for (filename : new String[]{filename1, filename2}) { Files.delete(Paths.get(filename)); client.removeObject( RemoveObjectArgs.builder().bucket(bucketName).object(filename).build()); }</technical_language>

Target:
public static void composeObject_test1() throws Exception { String methodName = "composeObject(String bucketName, String objectName,List<ComposeSource> composeSources, " + "Map <String,String > headerMap, ServerSideEncryption sseTarget)"; if (!mintEnv) { System.out.println("Test :" + methodName); } long startTime = System.currentTimeMillis(); String mintArgs = "size: 6 MB & 6 MB "; try { String destinationObjectName = getRandomName(); String filename1 = createFile6Mb(); String filename2 = createFile6Mb(); PutObjectOptions options = new PutObjectOptions(6 * MB, -1); client.putObject(bucketName, filename1, filename1, options); client.putObject(bucketName, filename2, filename2, options); ComposeSource s1 = new ComposeSource(bucketName, filename1, null, null, null, null, null); ComposeSource s2 = new ComposeSource(bucketName, filename2, null, null, null, null, null); List<ComposeSource> listSourceObjects = new ArrayList<ComposeSource>(); listSourceObjects.add(s1); listSourceObjects.add(s2); try { client.composeObject(bucketName, destinationObjectName, listSourceObjects, null, null); client.removeObject( RemoveObjectArgs.builder().bucket(bucketName).object(destinationObjectName).build()); } finally { deleteFilesAndObjects(bucketName, new String[] {filename1, filename2}); } mintSuccessLog(methodName, mintArgs, startTime); } catch (Exception e) { handleException(methodName, mintArgs, startTime, e); } }