mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
style: unnecessary conditions and expressions simplified
This commit is contained in:
@@ -69,13 +69,12 @@ public class HgCheckoutProvider implements CheckoutProvider {
|
||||
|
||||
// handle result
|
||||
HgCommandResult myCloneResult = clone.execute();
|
||||
if (myCloneResult == null) {
|
||||
new HgCommandResultNotifier(project).notifyError(null, "Clone failed", "Clone failed due to unknown error");
|
||||
} else if (HgErrorUtil.hasErrorsInCommandExecution(myCloneResult)) {
|
||||
if (myCloneResult == null || HgErrorUtil.hasErrorsInCommandExecution(myCloneResult)) {
|
||||
new HgCommandResultNotifier(project).notifyError(myCloneResult, "Clone failed", "Clone from " +
|
||||
sourceRepositoryURL +
|
||||
" failed.");
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
ApplicationManager.getApplication().invokeLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
@@ -197,9 +197,6 @@ public class HgHistoryUtil {
|
||||
|
||||
@Nullable
|
||||
public static List<String> prepareHashes(@NotNull List<String> hashes) {
|
||||
if (hashes.isEmpty()) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
List<String> hashArgs = new ArrayList<String>();
|
||||
for (String hash : hashes) {
|
||||
hashArgs.add("-r");
|
||||
|
||||
@@ -30,6 +30,7 @@ import java.util.List;
|
||||
import static com.intellij.openapi.vcs.Executor.cd;
|
||||
import static com.intellij.openapi.vcs.Executor.touch;
|
||||
import static hg4idea.test.HgExecutor.hg;
|
||||
import static java.util.Calendar.YEAR;
|
||||
|
||||
/**
|
||||
* @author Nadya Zabrodina
|
||||
@@ -52,10 +53,9 @@ public class HgBrowseChangesTest extends HgPlatformTest {
|
||||
hg("add");
|
||||
hg("commit -m add");
|
||||
java.util.Calendar now = java.util.Calendar.getInstance();
|
||||
int year = java.util.Calendar.YEAR;
|
||||
now.set(year, now.get(year) + 1);
|
||||
now.add(YEAR, 1);
|
||||
dateBefore = ChangeBrowserSettings.DATE_FORMAT.format(now.getTime());
|
||||
now.set(year, 1970);
|
||||
now.set(YEAR, 1970);
|
||||
dateAfter = ChangeBrowserSettings.DATE_FORMAT.format(now.getTime());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user