Remove redundant 'public' modifiers
CheckStyle reports 'public' being redundant on the constructor of ApproveOption#Handler, but removing it causes test failures due to org.kohsuke.args4j.Option requiring an explicitly public constructor. Add a suppression for that one, and remove the 'public' in other places where it's reported. Change-Id: Ifbcf279ffa783d33b81efc1c675f468c3ea39135
This commit is contained in:
parent
e7996de77f
commit
d79c03a7f6
@ -138,7 +138,7 @@ public class AvatarImage extends Image implements LoadHandler {
|
|||||||
private Timer showTimer;
|
private Timer showTimer;
|
||||||
private Timer hideTimer;
|
private Timer hideTimer;
|
||||||
|
|
||||||
public PopupHandler(AccountInfo account, UIObject target) {
|
PopupHandler(AccountInfo account, UIObject target) {
|
||||||
this.account = account;
|
this.account = account;
|
||||||
this.target = target;
|
this.target = target;
|
||||||
}
|
}
|
||||||
|
@ -205,7 +205,7 @@ public class SearchSuggestOracle extends HighlightSuggestOracle {
|
|||||||
private static class SearchSuggestion implements SuggestOracle.Suggestion {
|
private static class SearchSuggestion implements SuggestOracle.Suggestion {
|
||||||
private final String suggestion;
|
private final String suggestion;
|
||||||
private final String fullQuery;
|
private final String fullQuery;
|
||||||
public SearchSuggestion(String suggestion, String fullQuery) {
|
SearchSuggestion(String suggestion, String fullQuery) {
|
||||||
this.suggestion = suggestion;
|
this.suggestion = suggestion;
|
||||||
// Add a space to the query if it is a complete operation (e.g.
|
// Add a space to the query if it is a complete operation (e.g.
|
||||||
// "status:open") so the user can keep on typing.
|
// "status:open") so the user can keep on typing.
|
||||||
|
@ -727,7 +727,7 @@ public class ProjectInfoScreen extends ProjectScreen {
|
|||||||
private static class LabeledWidgetsGrid extends FlexTable {
|
private static class LabeledWidgetsGrid extends FlexTable {
|
||||||
private String labelSuffix;
|
private String labelSuffix;
|
||||||
|
|
||||||
public LabeledWidgetsGrid() {
|
LabeledWidgetsGrid() {
|
||||||
super();
|
super();
|
||||||
labelSuffix = ":";
|
labelSuffix = ":";
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ class DocTable extends NavigationTable<DocInfo> {
|
|||||||
private int rows = 0;
|
private int rows = 0;
|
||||||
private int dataBeginRow = 0;
|
private int dataBeginRow = 0;
|
||||||
|
|
||||||
public DocTable() {
|
DocTable() {
|
||||||
super(Util.C.docItemHelp());
|
super(Util.C.docItemHelp());
|
||||||
|
|
||||||
table.setText(0, C_TITLE, Util.C.docTableColumnTitle());
|
table.setText(0, C_TITLE, Util.C.docTableColumnTitle());
|
||||||
@ -117,7 +117,7 @@ class DocTable extends NavigationTable<DocInfo> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static class DocLink extends Anchor {
|
public static class DocLink extends Anchor {
|
||||||
public DocLink(DocInfo d) {
|
DocLink(DocInfo d) {
|
||||||
super(com.google.gerrit.client.changes.Util.cropSubject(d.title()));
|
super(com.google.gerrit.client.changes.Util.cropSubject(d.title()));
|
||||||
setHref(d.getFullUrl());
|
setHref(d.getFullUrl());
|
||||||
}
|
}
|
||||||
|
@ -85,7 +85,7 @@ public abstract class CherryPickDialog extends TextAreaActionDialog {
|
|||||||
static class BranchSuggestion implements Suggestion {
|
static class BranchSuggestion implements Suggestion {
|
||||||
private BranchInfo branch;
|
private BranchInfo branch;
|
||||||
|
|
||||||
public BranchSuggestion(BranchInfo branch) {
|
BranchSuggestion(BranchInfo branch) {
|
||||||
this.branch = branch;
|
this.branch = branch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ public abstract class CreateChangeDialog extends TextAreaActionDialog {
|
|||||||
static class BranchSuggestion implements Suggestion {
|
static class BranchSuggestion implements Suggestion {
|
||||||
private BranchInfo branch;
|
private BranchInfo branch;
|
||||||
|
|
||||||
public BranchSuggestion(BranchInfo branch) {
|
BranchSuggestion(BranchInfo branch) {
|
||||||
this.branch = branch;
|
this.branch = branch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -147,7 +147,7 @@ public abstract class RebaseDialog extends CommentedActionDialog {
|
|||||||
private static class ChangeSuggestion implements Suggestion {
|
private static class ChangeSuggestion implements Suggestion {
|
||||||
private ChangeInfo change;
|
private ChangeInfo change;
|
||||||
|
|
||||||
public ChangeSuggestion(ChangeInfo change) {
|
ChangeSuggestion(ChangeInfo change) {
|
||||||
this.change = change;
|
this.change = change;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ public class GitOverHttpServlet extends GitServlet {
|
|||||||
|
|
||||||
private final boolean enableReceive;
|
private final boolean enableReceive;
|
||||||
|
|
||||||
public Module(boolean enableReceive) {
|
Module(boolean enableReceive) {
|
||||||
this.enableReceive = enableReceive;
|
this.enableReceive = enableReceive;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ class ContextMapper {
|
|||||||
private final String base;
|
private final String base;
|
||||||
private final String authorizedBase;
|
private final String authorizedBase;
|
||||||
|
|
||||||
public ContextMapper(String contextPath) {
|
ContextMapper(String contextPath) {
|
||||||
base = Strings.nullToEmpty(contextPath) + PLUGINS_PREFIX;
|
base = Strings.nullToEmpty(contextPath) + PLUGINS_PREFIX;
|
||||||
authorizedBase = Strings.nullToEmpty(contextPath) + AUTHORIZED_PREFIX;
|
authorizedBase = Strings.nullToEmpty(contextPath) + AUTHORIZED_PREFIX;
|
||||||
}
|
}
|
||||||
|
@ -91,7 +91,7 @@ final class WrappableSearcherManager extends ReferenceManager<IndexSearcher> {
|
|||||||
*
|
*
|
||||||
* @throws IOException if there is a low-level I/O error
|
* @throws IOException if there is a low-level I/O error
|
||||||
*/
|
*/
|
||||||
public WrappableSearcherManager(IndexWriter writer, boolean applyAllDeletes, SearcherFactory searcherFactory) throws IOException {
|
WrappableSearcherManager(IndexWriter writer, boolean applyAllDeletes, SearcherFactory searcherFactory) throws IOException {
|
||||||
if (searcherFactory == null) {
|
if (searcherFactory == null) {
|
||||||
searcherFactory = new SearcherFactory();
|
searcherFactory = new SearcherFactory();
|
||||||
}
|
}
|
||||||
@ -108,7 +108,7 @@ final class WrappableSearcherManager extends ReferenceManager<IndexSearcher> {
|
|||||||
*
|
*
|
||||||
* @throws IOException if there is a low-level I/O error
|
* @throws IOException if there is a low-level I/O error
|
||||||
*/
|
*/
|
||||||
public WrappableSearcherManager(Directory dir, SearcherFactory searcherFactory) throws IOException {
|
WrappableSearcherManager(Directory dir, SearcherFactory searcherFactory) throws IOException {
|
||||||
if (searcherFactory == null) {
|
if (searcherFactory == null) {
|
||||||
searcherFactory = new SearcherFactory();
|
searcherFactory = new SearcherFactory();
|
||||||
}
|
}
|
||||||
@ -127,7 +127,7 @@ final class WrappableSearcherManager extends ReferenceManager<IndexSearcher> {
|
|||||||
*
|
*
|
||||||
* @throws IOException if there is a low-level I/O error
|
* @throws IOException if there is a low-level I/O error
|
||||||
*/
|
*/
|
||||||
public WrappableSearcherManager(DirectoryReader reader, SearcherFactory searcherFactory) throws IOException {
|
WrappableSearcherManager(DirectoryReader reader, SearcherFactory searcherFactory) throws IOException {
|
||||||
if (searcherFactory == null) {
|
if (searcherFactory == null) {
|
||||||
searcherFactory = new SearcherFactory();
|
searcherFactory = new SearcherFactory();
|
||||||
}
|
}
|
||||||
|
@ -108,7 +108,7 @@ public class Move implements RestModifyView<ChangeResource, MoveInput> {
|
|||||||
private Change change;
|
private Change change;
|
||||||
private Branch.NameKey newDestKey;
|
private Branch.NameKey newDestKey;
|
||||||
|
|
||||||
public Op(ChangeControl ctl, MoveInput input) {
|
Op(ChangeControl ctl, MoveInput input) {
|
||||||
this.input = input;
|
this.input = input;
|
||||||
this.caller = ctl.getUser().asIdentifiedUser();
|
this.caller = ctl.getUser().asIdentifiedUser();
|
||||||
}
|
}
|
||||||
|
@ -90,7 +90,7 @@ public class PutTopic implements RestModifyView<ChangeResource, Input>,
|
|||||||
private String oldTopicName;
|
private String oldTopicName;
|
||||||
private String newTopicName;
|
private String newTopicName;
|
||||||
|
|
||||||
public Op(Input input) {
|
Op(Input input) {
|
||||||
this.input = input;
|
this.input = input;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -214,7 +214,7 @@ public class Revert implements RestModifyView<ChangeResource, RevertInput>,
|
|||||||
private class SendEmailOp extends BatchUpdate.Op {
|
private class SendEmailOp extends BatchUpdate.Op {
|
||||||
private final ChangeInserter ins;
|
private final ChangeInserter ins;
|
||||||
|
|
||||||
public SendEmailOp(ChangeInserter ins) {
|
SendEmailOp(ChangeInserter ins) {
|
||||||
this.ins = ins;
|
this.ins = ins;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -236,7 +236,7 @@ public class Revert implements RestModifyView<ChangeResource, RevertInput>,
|
|||||||
private class PostRevertedMessageOp extends BatchUpdate.Op {
|
private class PostRevertedMessageOp extends BatchUpdate.Op {
|
||||||
private final ObjectId computedChangeId;
|
private final ObjectId computedChangeId;
|
||||||
|
|
||||||
public PostRevertedMessageOp(ObjectId computedChangeId) {
|
PostRevertedMessageOp(ObjectId computedChangeId) {
|
||||||
this.computedChangeId = computedChangeId;
|
this.computedChangeId = computedChangeId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ class DbGroupMemberAuditListener implements GroupMemberAuditListener {
|
|||||||
private final UniversalGroupBackend groupBackend;
|
private final UniversalGroupBackend groupBackend;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public DbGroupMemberAuditListener(SchemaFactory<ReviewDb> schema,
|
DbGroupMemberAuditListener(SchemaFactory<ReviewDb> schema,
|
||||||
AccountCache accountCache, GroupCache groupCache,
|
AccountCache accountCache, GroupCache groupCache,
|
||||||
UniversalGroupBackend groupBackend) {
|
UniversalGroupBackend groupBackend) {
|
||||||
this.schema = schema;
|
this.schema = schema;
|
||||||
|
@ -259,7 +259,7 @@ public class CreateBranch implements RestModifyView<ProjectResource, Input> {
|
|||||||
|
|
||||||
public static final String MESSAGE = "Invalid Revision";
|
public static final String MESSAGE = "Invalid Revision";
|
||||||
|
|
||||||
public InvalidRevisionException() {
|
InvalidRevisionException() {
|
||||||
super(MESSAGE);
|
super(MESSAGE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ import java.util.TreeMap;
|
|||||||
class RepositoryStatistics extends TreeMap<String, Object> {
|
class RepositoryStatistics extends TreeMap<String, Object> {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
public RepositoryStatistics(Properties p) {
|
RepositoryStatistics(Properties p) {
|
||||||
for (Entry<Object, Object> e : p.entrySet()) {
|
for (Entry<Object, Object> e : p.entrySet()) {
|
||||||
put(CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE,
|
put(CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE,
|
||||||
e.getKey().toString()), e.getValue());
|
e.getKey().toString()), e.getValue());
|
||||||
|
@ -83,7 +83,7 @@ public class SubmitRuleEvaluator {
|
|||||||
private static class UserTermExpected extends Exception {
|
private static class UserTermExpected extends Exception {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
public UserTermExpected(SubmitRecord.Label label) {
|
UserTermExpected(SubmitRecord.Label label) {
|
||||||
super(String.format("A label with the status %s must contain a user.",
|
super(String.format("A label with the status %s must contain a user.",
|
||||||
label.toString()));
|
label.toString()));
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ class HANA extends BaseDataSourceType {
|
|||||||
private Config cfg;
|
private Config cfg;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public HANA(@GerritServerConfig final Config cfg) {
|
HANA(@GerritServerConfig final Config cfg) {
|
||||||
super("com.sap.db.jdbc.Driver");
|
super("com.sap.db.jdbc.Driver");
|
||||||
this.cfg = cfg;
|
this.cfg = cfg;
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ class MaxDb extends BaseDataSourceType {
|
|||||||
private Config cfg;
|
private Config cfg;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public MaxDb(@GerritServerConfig final Config cfg) {
|
MaxDb(@GerritServerConfig final Config cfg) {
|
||||||
super("com.sap.dbtech.jdbc.DriverSapDB");
|
super("com.sap.dbtech.jdbc.DriverSapDB");
|
||||||
this.cfg = cfg;
|
this.cfg = cfg;
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@ class MySql extends BaseDataSourceType {
|
|||||||
private Config cfg;
|
private Config cfg;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public MySql(@GerritServerConfig final Config cfg) {
|
MySql(@GerritServerConfig final Config cfg) {
|
||||||
super("com.mysql.jdbc.Driver");
|
super("com.mysql.jdbc.Driver");
|
||||||
this.cfg = cfg;
|
this.cfg = cfg;
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ class PostgreSQL extends BaseDataSourceType {
|
|||||||
private Config cfg;
|
private Config cfg;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public PostgreSQL(@GerritServerConfig final Config cfg) {
|
PostgreSQL(@GerritServerConfig final Config cfg) {
|
||||||
super("org.postgresql.Driver");
|
super("org.postgresql.Driver");
|
||||||
this.cfg = cfg;
|
this.cfg = cfg;
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ public class ColumnFormatterTest {
|
|||||||
private PrintWriter printWriter;
|
private PrintWriter printWriter;
|
||||||
private StringWriter stringWriter;
|
private StringWriter stringWriter;
|
||||||
|
|
||||||
public PrintWriterComparator() {
|
PrintWriterComparator() {
|
||||||
stringWriter = new StringWriter();
|
stringWriter = new StringWriter();
|
||||||
printWriter = new PrintWriter(stringWriter);
|
printWriter = new PrintWriter(stringWriter);
|
||||||
}
|
}
|
||||||
|
@ -268,7 +268,7 @@ public class SubmoduleSectionParserTest extends LocalDiskRepositoryTestCase {
|
|||||||
private final String path;
|
private final String path;
|
||||||
private final String branch;
|
private final String branch;
|
||||||
|
|
||||||
public SubmoduleSection(final String url, final String path,
|
SubmoduleSection(final String url, final String path,
|
||||||
final String branch) {
|
final String branch) {
|
||||||
this.url = url;
|
this.url = url;
|
||||||
this.path = path;
|
this.path = path;
|
||||||
|
@ -123,6 +123,7 @@ final class ApproveOption implements Option, Setter<Short> {
|
|||||||
public static class Handler extends OneArgumentOptionHandler<Short> {
|
public static class Handler extends OneArgumentOptionHandler<Short> {
|
||||||
private final ApproveOption cmdOption;
|
private final ApproveOption cmdOption;
|
||||||
|
|
||||||
|
// CS IGNORE RedundantModifier FOR NEXT 1 LINES. REASON: needed by org.kohsuke.args4j.Option
|
||||||
public Handler(final CmdLineParser parser, final OptionDef option,
|
public Handler(final CmdLineParser parser, final OptionDef option,
|
||||||
final Setter<Short> setter) {
|
final Setter<Short> setter) {
|
||||||
super(parser, option, setter);
|
super(parser, option, setter);
|
||||||
|
@ -82,7 +82,7 @@ final class StreamEvents extends BaseCommand {
|
|||||||
/** Special event to notify clients they missed other events. */
|
/** Special event to notify clients they missed other events. */
|
||||||
private static final class DroppedOutputEvent extends Event {
|
private static final class DroppedOutputEvent extends Event {
|
||||||
private static final String TYPE = "dropped-output";
|
private static final String TYPE = "dropped-output";
|
||||||
public DroppedOutputEvent() {
|
DroppedOutputEvent() {
|
||||||
super(TYPE);
|
super(TYPE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,7 @@ class UnzippedDistribution implements PluginsDistribution {
|
|||||||
private ServletContext servletContext;
|
private ServletContext servletContext;
|
||||||
private File pluginsDir;
|
private File pluginsDir;
|
||||||
|
|
||||||
public UnzippedDistribution(ServletContext servletContext) {
|
UnzippedDistribution(ServletContext servletContext) {
|
||||||
this.servletContext = servletContext;
|
this.servletContext = servletContext;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit fb6e534d297e121a9ddef503f6c4f393b50f9238
|
Subproject commit 32b238a2ff9625b17d9dc44e145de269ec833736
|
Loading…
x
Reference in New Issue
Block a user