Extract a ListOption class, deduplicating fromBits method
Remove the toBits method, which was unused in all cases. It was primarily for the GWT UI code. Change-Id: I755c4b4a752ba9fe2a6771f313c4a9361d4c071b
This commit is contained in:
@@ -17,6 +17,7 @@ package com.google.gerrit.server.restapi.change;
|
||||
import com.google.common.collect.Iterables;
|
||||
import com.google.common.flogger.FluentLogger;
|
||||
import com.google.gerrit.extensions.client.ListChangesOption;
|
||||
import com.google.gerrit.extensions.client.ListOption;
|
||||
import com.google.gerrit.extensions.common.ChangeInfo;
|
||||
import com.google.gerrit.extensions.restapi.AuthException;
|
||||
import com.google.gerrit.extensions.restapi.BadRequestException;
|
||||
@@ -70,7 +71,7 @@ public class QueryChanges implements RestReadView<TopLevelResource>, DynamicOpti
|
||||
|
||||
@Option(name = "-O", usage = "Output option flags, in hex")
|
||||
void setOptionFlagsHex(String hex) {
|
||||
options.addAll(ListChangesOption.fromBits(Integer.parseInt(hex, 16)));
|
||||
options.addAll(ListOption.fromBits(ListChangesOption.class, Integer.parseInt(hex, 16)));
|
||||
}
|
||||
|
||||
@Option(
|
||||
|
||||
Reference in New Issue
Block a user