/* Copyright (c) 2013 OpenPlans. All rights reserved.
 * This code is licensed under the BSD New License, available at the root
 * application directory.
 */
package org.geogit.api.plumbing.merge;


import java.net.URL;
import java.util.Collections;
import java.util.List;

import org.geogit.api.AbstractGeoGitOp;
import org.geogit.api.plumbing.ResolveGeogitDir;
import com.google.common.base.Preconditions;

public class ConflictsReadOp extends AbstractGeoGitOp<List<Conflict>> {
    @Override
    public List<Conflict> call() {
        final URL repoUrl = getCommandLocator().command(ResolveGeogitDir.class).call();
        if (repoUrl == null) {
            return Collections.emptyList();
        } else {
            getIndex().getDatabase().open();
            return getIndex().getDatabase().getConflicts(null, null);
        }
    }
}

@@ -217,38 +217,8 @@
 RL;%0A
-import java.util.Collections;%0A
 impo
@@ -326,16 +326,17 @@
 gitDir;%0A
+%0A
 import c
@@ -356,26 +356,29 @@
 mon.
-base.Preconditions
+collect.ImmutableList
 ;%0A%0Ap
@@ -639,29 +639,24 @@
 urn 
-Collections.empty
+Immutable
 List
+.of
 ();%0A
@@ -676,53 +676,8 @@
 e %7B%0A
-            getIndex().getDatabase().open();%0A
     

Remove unneeded call to StagingDatabase.open()