Merge changes from topic 'coverity_scan' * changes: Fix a resource leak Fix possible data race condition
diff --git a/Documentation/user-review-ui.txt b/Documentation/user-review-ui.txt index 42c3e0d..ab1070a 100644 --- a/Documentation/user-review-ui.txt +++ b/Documentation/user-review-ui.txt
@@ -599,10 +599,6 @@ each label on which the user is allowed to vote. Voting on non-current patch sets is not possible. -Typing "LGTM" (acronym for 'Looks Good To Me') in the summary comment -text box automatically selects the highest possible score for the -'Code-Review' label. - The inline draft comments that will be published are displayed in a separate section so that they can be reviewed before publishing. There are links to navigate to the inline comments which can be used if a
diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/ReplyBox.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/ReplyBox.java index 5eb936c..fd9f4bc 100644 --- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/ReplyBox.java +++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/ReplyBox.java
@@ -76,8 +76,6 @@ import java.util.TreeSet; class ReplyBox extends Composite { - private static final String CODE_REVIEW = "Code-Review"; - interface Binder extends UiBinder<HTMLPanel, ReplyBox> {} private static final Binder uiBinder = GWT.create(Binder.class); @@ -92,7 +90,6 @@ private final String revision; private ReviewInput in = ReviewInput.create(); private int labelHelpColumn; - private Runnable lgtm; @UiField Styles style; @UiField TextArea message; @@ -173,20 +170,6 @@ }}, 0); } - @UiHandler("message") - void onMessageKey(KeyPressEvent event) { - if (lgtm != null - && event.getCharCode() == 'M' - && message.getValue().equals("LGT")) { - Scheduler.get().scheduleDeferred(new ScheduledCommand() { - @Override - public void execute() { - lgtm.run(); - } - }); - } - } - @UiHandler("post") void onPost(@SuppressWarnings("unused") ClickEvent e) { postReview(); @@ -358,15 +341,6 @@ labelsTable.setWidget(row, 1 + i, b); } } - - if (CODE_REVIEW.equalsIgnoreCase(id) && !group.buttons.isEmpty()) { - lgtm = new Runnable() { - @Override - public void run() { - group.selectMax(); - } - }; - } } private void renderCheckBox(int row, LabelAndValues lv) { @@ -390,15 +364,6 @@ }); b.setStyleName(style.label_name()); labelsTable.setWidget(row, 0, b); - - if (CODE_REVIEW.equalsIgnoreCase(id)) { - lgtm = new Runnable() { - @Override - public void run() { - b.setValue(true, true); - } - }; - } } private static boolean isCheckBox(Set<Short> values) { @@ -467,16 +432,6 @@ selected = b; labelsTable.setText(row, labelHelpColumn, b.text); } - - void selectMax() { - for (int i = 0; i < buttons.size() - 1; i++) { - buttons.get(i).setValue(false, false); - } - - LabelRadioButton max = buttons.get(buttons.size() - 1); - max.setValue(true, true); - max.select(); - } } private class LabelRadioButton extends RadioButton implements