/*
 * Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License").
 * You may not use this file except in compliance with the License.
 * A copy of the License is located at
 *
 *  http://aws.amazon.com/apache2.0
 *
 * or in the "license" file accompanying this file. This file 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 com.amazonaws.ant.s3;

import java.io.File;

import org.apache.tools.ant.BuildException;

import com.amazonaws.ant.AWSAntTask;
import com.amazonaws.ant.AWSTestUtils;
import com.amazonaws.services.s3.AmazonS3Client;

public class CleanUpS3TestsTask extends AWSAntTask {
    private String firstFile;

    public void setFirstFile(String firstFile) {
        this.firstFile = firstFile;
    }

    private String secondFile;

    public void setSecondFile(String secondFile) {
        this.secondFile = secondFile;
    }

    private String bucketName;

    public void setBucketName(String bucketName) {
        this.bucketName = bucketName;
    }

    private void checkParams() {
        if (firstFile == null) {
            throw new BuildException("File must be set");
        }
        if (secondFile == null) {
            throw new BuildException("Second file must be set");
        }
        if (bucketName == null) {
            throw new BuildException("Bucket name must be set");
        }
    }

    public void execute() {
        checkParams();
        File file1 = new File(firstFile);
        if (file1 != null && file1.exists()) {
            file1.delete();
        }
        File file2 = new File(secondFile);
        if (file2 != null && file2.exists()) {
            file2.delete();
        }
        AmazonS3Client client = getOrCreateClient(AmazonS3Client.class);

        AWSTestUtils.emptyAndDeleteBucket(client, bucketName);
    }
}

@@ -1588,24 +1588,35 @@
 %0A    %7D%0A%0A    
+@Override%0A%09
 public void 
@@ -1623,24 +1623,24 @@
 execute() %7B%0A
-
         chec
@@ -1713,25 +1713,8 @@
 ile1
- != null && file1
 .exi
@@ -1799,24 +1799,24 @@
 econdFile);%0A
+
         if (
@@ -1824,25 +1824,8 @@
 ile2
- != null && file2
 .exi

Fix Eclipse warning