Skip to content

Commit

Permalink
port away from deprecated Consumer#EMPTY_CONSUMER
Browse files Browse the repository at this point in the history
  • Loading branch information
uwolfer committed Jan 18, 2020
1 parent 87edf6c commit daed8a0
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
import com.intellij.openapi.ui.Messages;
import com.intellij.openapi.util.ThrowableComputable;
import com.intellij.util.Consumer;
import com.intellij.util.EmptyConsumer;
import com.urswolfer.gerrit.client.rest.GerritAuthData;
import com.urswolfer.gerrit.client.rest.GerritRestApi;
import com.urswolfer.gerrit.client.rest.GerritRestApiFactory;
Expand Down Expand Up @@ -182,7 +183,7 @@ public Void get() {
}
}
};
accessGerrit(supplier, Consumer.EMPTY_CONSUMER, project, "Failed to publish Gerrit change");
accessGerrit(supplier, EmptyConsumer.getInstance(), project, "Failed to publish Gerrit change");
}

@SuppressWarnings("unchecked")
Expand All @@ -199,7 +200,7 @@ public Void get() {
}
}
};
accessGerrit(supplier, Consumer.EMPTY_CONSUMER, project, "Failed to delete Gerrit change");
accessGerrit(supplier, EmptyConsumer.getInstance(), project, "Failed to delete Gerrit change");
}

@SuppressWarnings("unchecked")
Expand All @@ -217,7 +218,7 @@ public Void get() {
}
}
};
accessGerrit(supplier, Consumer.EMPTY_CONSUMER, project, "Failed to abandon Gerrit change");
accessGerrit(supplier, EmptyConsumer.getInstance(), project, "Failed to abandon Gerrit change");
}

@SuppressWarnings("unchecked")
Expand All @@ -235,7 +236,7 @@ public Void get() {
}
}
};
accessGerrit(supplier, Consumer.EMPTY_CONSUMER, project, "Failed to add reviewer");
accessGerrit(supplier, EmptyConsumer.getInstance(), project, "Failed to add reviewer");
}

/**
Expand All @@ -260,7 +261,7 @@ public Void get() {
}
}
};
accessGerrit(supplier, Consumer.EMPTY_CONSUMER, project, "Failed to star Gerrit change " +
accessGerrit(supplier, EmptyConsumer.getInstance(), project, "Failed to star Gerrit change " +
"(not supported for Gerrit versions older than 2.8)");
}

Expand All @@ -283,7 +284,7 @@ public Void get() {
}
}
};
accessGerrit(supplier, Consumer.EMPTY_CONSUMER, project, "Failed set file review status for Gerrit change");
accessGerrit(supplier, EmptyConsumer.getInstance(), project, "Failed set file review status for Gerrit change");
}

public void getChangesToReview(Project project, Consumer<List<ChangeInfo>> consumer) {
Expand Down

0 comments on commit daed8a0

Please sign in to comment.