Miscellaneous Javadoc cleanups to cut down on Eclipse warnings
Change-Id: Ifd80c546641db979911e3339fa40ab3585ca69a1
diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/data/GitWebType.java b/gerrit-common/src/main/java/com/google/gerrit/common/data/GitWebType.java
index 8528c0f..f4dc444 100644
--- a/gerrit-common/src/main/java/com/google/gerrit/common/data/GitWebType.java
+++ b/gerrit-common/src/main/java/com/google/gerrit/common/data/GitWebType.java
@@ -150,7 +150,7 @@
/**
* Set the pattern for link-name type.
*
- * @param pattern The pattern for link-name type
+ * @param name The link-name type
*/
public void setLinkName(final String name) {
if (name != null && !name.isEmpty()) {
diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/data/GroupInfoCache.java b/gerrit-common/src/main/java/com/google/gerrit/common/data/GroupInfoCache.java
index 085973c..5a0561d 100644
--- a/gerrit-common/src/main/java/com/google/gerrit/common/data/GroupInfoCache.java
+++ b/gerrit-common/src/main/java/com/google/gerrit/common/data/GroupInfoCache.java
@@ -55,7 +55,7 @@
* <li>an anonymous info block, if <code>id</code> was not loaded.</li>
* </ul>
*
- * @param id the id desired.
+ * @param uuid the id desired.
* @return info block for the group.
*/
public GroupInfo get(final AccountGroup.UUID uuid) {
diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/data/SuggestService.java b/gerrit-common/src/main/java/com/google/gerrit/common/data/SuggestService.java
index 7205b74..2423757 100644
--- a/gerrit-common/src/main/java/com/google/gerrit/common/data/SuggestService.java
+++ b/gerrit-common/src/main/java/com/google/gerrit/common/data/SuggestService.java
@@ -30,7 +30,7 @@
AsyncCallback<List<AccountInfo>> callback);
/**
- * @see #suggestAccountGroup(com.google.gerrit.reviewdb.client.Project.NameKey, String, int, AsyncCallback)
+ * @see #suggestAccountGroupForProject(com.google.gerrit.reviewdb.client.Project.NameKey, String, int, AsyncCallback)
*/
@Deprecated
void suggestAccountGroup(String query, int limit,
diff --git a/gerrit-extension-api/src/main/java/com/google/gerrit/extensions/annotations/RequiresCapability.java b/gerrit-extension-api/src/main/java/com/google/gerrit/extensions/annotations/RequiresCapability.java
index b8e07d1..ec0b361 100644
--- a/gerrit-extension-api/src/main/java/com/google/gerrit/extensions/annotations/RequiresCapability.java
+++ b/gerrit-extension-api/src/main/java/com/google/gerrit/extensions/annotations/RequiresCapability.java
@@ -21,7 +21,8 @@
import java.lang.annotation.Target;
/**
- * Annotation on {@link SshCommand} or {@link RestApiServlet} declaring a
+ * Annotation on {@link com.google.gerrit.sshd.SshCommand} or
+ * {@link com.google.gerrit.httpd.restapi.RestApiServlet} declaring a
* capability must be granted.
*/
@Target({ElementType.TYPE})
diff --git a/gerrit-extension-api/src/main/java/com/google/gerrit/extensions/registration/DynamicMap.java b/gerrit-extension-api/src/main/java/com/google/gerrit/extensions/registration/DynamicMap.java
index a4c5eb5..ea4a751 100644
--- a/gerrit-extension-api/src/main/java/com/google/gerrit/extensions/registration/DynamicMap.java
+++ b/gerrit-extension-api/src/main/java/com/google/gerrit/extensions/registration/DynamicMap.java
@@ -17,6 +17,7 @@
import com.google.inject.Binder;
import com.google.inject.Key;
import com.google.inject.Provider;
+import com.google.inject.ProvisionException;
import com.google.inject.Scopes;
import com.google.inject.TypeLiteral;
import com.google.inject.util.Types;
@@ -103,7 +104,7 @@
* @throws ProvisionException if the registered provider is unable to obtain
* an instance of the requested implementation.
*/
- public T get(String pluginName, String exportName) {
+ public T get(String pluginName, String exportName) throws ProvisionException {
Provider<T> p = items.get(new NamePair(pluginName, exportName));
return p != null ? p.get() : null;
}
diff --git a/gerrit-extension-api/src/main/java/com/google/gerrit/extensions/registration/PrivateInternals_DynamicMapImpl.java b/gerrit-extension-api/src/main/java/com/google/gerrit/extensions/registration/PrivateInternals_DynamicMapImpl.java
index 3558794..e930a69 100644
--- a/gerrit-extension-api/src/main/java/com/google/gerrit/extensions/registration/PrivateInternals_DynamicMapImpl.java
+++ b/gerrit-extension-api/src/main/java/com/google/gerrit/extensions/registration/PrivateInternals_DynamicMapImpl.java
@@ -51,7 +51,7 @@
* @param key unique description from the item's Guice binding. This can be
* later obtained from the registration handle to facilitate matching
* with the new equivalent instance during a hot reload. The key must
- * use an {@link @Export} annotation.
+ * use an {@link Export} annotation.
* @param item the item to add to the collection right now. Must not be null.
* @return a handle that can remove this item later, or hot-swap the item
* without it ever leaving the collection.
diff --git a/gerrit-gwtexpui/src/main/java/com/google/gwtexpui/safehtml/client/LinkFindReplace.java b/gerrit-gwtexpui/src/main/java/com/google/gwtexpui/safehtml/client/LinkFindReplace.java
index eaa4f23..7e32ff0 100644
--- a/gerrit-gwtexpui/src/main/java/com/google/gwtexpui/safehtml/client/LinkFindReplace.java
+++ b/gerrit-gwtexpui/src/main/java/com/google/gwtexpui/safehtml/client/LinkFindReplace.java
@@ -47,9 +47,9 @@
}
/**
- * @param regex regular expression pattern to match substrings with.
- * @param repl replacement link href. Capture groups within
- * <code>regex</code> can be referenced with <code>$<i>n</i></code>.
+ * @param find regular expression pattern to match substrings with.
+ * @param link replacement link href. Capture groups within
+ * <code>find</code> can be referenced with <code>$<i>n</i></code>.
*/
public LinkFindReplace(String find, String link) {
this.pat = RegExp.compile(find);
diff --git a/gerrit-gwtexpui/src/main/java/com/google/gwtexpui/safehtml/client/RawFindReplace.java b/gerrit-gwtexpui/src/main/java/com/google/gwtexpui/safehtml/client/RawFindReplace.java
index d22fef6..63b5fde 100644
--- a/gerrit-gwtexpui/src/main/java/com/google/gwtexpui/safehtml/client/RawFindReplace.java
+++ b/gerrit-gwtexpui/src/main/java/com/google/gwtexpui/safehtml/client/RawFindReplace.java
@@ -29,9 +29,9 @@
}
/**
- * @param regex regular expression pattern to match substrings with.
- * @param repl replacement expression. Capture groups within
- * <code>regex</code> can be referenced with <code>$<i>n</i></code>.
+ * @param find regular expression pattern to match substrings with.
+ * @param replace replacement expression. Capture groups within
+ * <code>find</code> can be referenced with <code>$<i>n</i></code>.
*/
public RawFindReplace(String find, String replace) {
this.pat = RegExp.compile(find);
diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/PatchTable.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/PatchTable.java
index d6c1de1..42705db 100644
--- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/PatchTable.java
+++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/PatchTable.java
@@ -55,10 +55,8 @@
public class PatchTable extends Composite {
public interface PatchValidator {
/**
- * Returns true if patch is valid
- *
* @param patch
- * @return
+ * @return true if patch is valid.
*/
boolean isValid(Patch patch);
}
@@ -836,7 +834,7 @@
* @param validators
* @param loopAround loops back around to the front and traverses if this is
* true
- * @return
+ * @return index of next valid patch, or -1 if no valid patches
*/
public int getNextPatch(int currentIndex, boolean loopAround,
PatchValidator... validators) {
@@ -851,7 +849,7 @@
* @param validators
* @param loopAround
* @param maxIndex will only traverse up to this index
- * @return
+ * @return index of next valid patch, or -1 if no valid patches
*/
private int getNextPatchHelper(int currentIndex, boolean loopAround,
int maxIndex, PatchValidator... validators) {
diff --git a/gerrit-gwtui/src/main/java/net/codemirror/lib/CodeMirror.java b/gerrit-gwtui/src/main/java/net/codemirror/lib/CodeMirror.java
index ae34ebe..96daa49 100644
--- a/gerrit-gwtui/src/main/java/net/codemirror/lib/CodeMirror.java
+++ b/gerrit-gwtui/src/main/java/net/codemirror/lib/CodeMirror.java
@@ -24,7 +24,7 @@
/**
* Glue to connect CodeMirror to be callable from GWT.
*
- * @link http://codemirror.net/doc/manual.html#api
+ * @see <a href="http://codemirror.net/doc/manual.html#api">CodeMirror API</a>
*/
public class CodeMirror extends JavaScriptObject {
public static void initLibrary(AsyncCallback<Void> cb) {
diff --git a/gerrit-gwtui/src/main/java/net/codemirror/lib/Configuration.java b/gerrit-gwtui/src/main/java/net/codemirror/lib/Configuration.java
index fde7970..862e0f7 100644
--- a/gerrit-gwtui/src/main/java/net/codemirror/lib/Configuration.java
+++ b/gerrit-gwtui/src/main/java/net/codemirror/lib/Configuration.java
@@ -19,7 +19,7 @@
/**
* Simple map-like structure to pass configuration to CodeMirror.
*
- * @link http://codemirror.net/doc/manual.html#config
+ * @see <a href="http://codemirror.net/doc/manual.html#config">CodeMirror config</a>
* @see CodeMirror#create(com.google.gwt.dom.client.Element, Configuration)
*/
public class Configuration extends JavaScriptObject {
diff --git a/gerrit-httpd/src/main/java/com/google/gerrit/httpd/ProjectBasicAuthFilter.java b/gerrit-httpd/src/main/java/com/google/gerrit/httpd/ProjectBasicAuthFilter.java
index d87e4af..c55f9d3 100644
--- a/gerrit-httpd/src/main/java/com/google/gerrit/httpd/ProjectBasicAuthFilter.java
+++ b/gerrit-httpd/src/main/java/com/google/gerrit/httpd/ProjectBasicAuthFilter.java
@@ -53,8 +53,8 @@
* The current HTTP request is authenticated by looking up the username and
* password from the Base64 encoded Authorization header and validating them
* against any username/password configured authentication system in Gerrit.
- * This filter is intended only to protect the {@link ProjectServlet} and its
- * handled URLs, which provide remote repository access over HTTP.
+ * This filter is intended only to protect the {@link GitOverHttpServlet} and
+ * its handled URLs, which provide remote repository access over HTTP.
*
* @see <a href="http://www.ietf.org/rfc/rfc2617.txt">RFC 2617</a>
*/
diff --git a/gerrit-openid/src/main/java/com/google/gerrit/httpd/auth/openid/OpenIdServiceImpl.java b/gerrit-openid/src/main/java/com/google/gerrit/httpd/auth/openid/OpenIdServiceImpl.java
index 5d74166..5817a55 100644
--- a/gerrit-openid/src/main/java/com/google/gerrit/httpd/auth/openid/OpenIdServiceImpl.java
+++ b/gerrit-openid/src/main/java/com/google/gerrit/httpd/auth/openid/OpenIdServiceImpl.java
@@ -208,7 +208,7 @@
}
}
- /** Called by {@link OpenIdLoginForm} doGet, doPost */
+ /** Called by {@link OpenIdLoginServlet} doGet, doPost */
void doAuth(final HttpServletRequest req, final HttpServletResponse rsp)
throws Exception {
if (OMODE_CANCEL.equals(req.getParameter(OPENID_MODE))) {
diff --git a/gerrit-reviewdb/src/main/java/com/google/gerrit/reviewdb/client/Account.java b/gerrit-reviewdb/src/main/java/com/google/gerrit/reviewdb/client/Account.java
index 221ba46..3ae61e4 100644
--- a/gerrit-reviewdb/src/main/java/com/google/gerrit/reviewdb/client/Account.java
+++ b/gerrit-reviewdb/src/main/java/com/google/gerrit/reviewdb/client/Account.java
@@ -25,14 +25,10 @@
* A user may have multiple identities they can use to login to Gerrit (see
* {@link AccountExternalId}), but in such cases they always map back to a
* single Account entity.
- *<p>
+ * <p>
* Entities "owned" by an Account (that is, their primary key contains the
* {@link Account.Id} key as part of their key structure):
* <ul>
- * <li>{@link AccountAgreement}: any record of the user's acceptance of a
- * predefined {@link ContributorAgreement}. Multiple records indicate
- * potentially multiple agreements, especially if agreements must be retired and
- * replaced with new agreements.</li>
*
* <li>{@link AccountExternalId}: OpenID identities and email addresses known to
* be registered to this user. Multiple records can exist when the user has more
diff --git a/gerrit-reviewdb/src/main/java/com/google/gerrit/reviewdb/server/SubmoduleSubscriptionAccess.java b/gerrit-reviewdb/src/main/java/com/google/gerrit/reviewdb/server/SubmoduleSubscriptionAccess.java
index c0e1eb6..6dce287 100644
--- a/gerrit-reviewdb/src/main/java/com/google/gerrit/reviewdb/server/SubmoduleSubscriptionAccess.java
+++ b/gerrit-reviewdb/src/main/java/com/google/gerrit/reviewdb/server/SubmoduleSubscriptionAccess.java
@@ -36,7 +36,7 @@
* Fetches all <code>SubmoduleSubscription</code>s in which some branch of
* <code>superProject</code> subscribes a branch.
*
- * Use {@link #bySuperproject(Branch.NameKey)} to fetch for a branch instead
+ * Use {@link #bySuperProject(Branch.NameKey)} to fetch for a branch instead
* of a project.
*
* @param superProject the project to fetch subscriptions for
diff --git a/gerrit-server/src/main/java/com/google/gerrit/common/ChangeHooks.java b/gerrit-server/src/main/java/com/google/gerrit/common/ChangeHooks.java
index 28c64a9..1d37002 100644
--- a/gerrit-server/src/main/java/com/google/gerrit/common/ChangeHooks.java
+++ b/gerrit-server/src/main/java/com/google/gerrit/common/ChangeHooks.java
@@ -167,7 +167,6 @@
* @param uploader The gerrit user running the command
* @param oldId The ref's old id
* @param newId The ref's new id
- * @param account The gerrit user who moved the ref
*/
public HookResult doRefUpdateHook(Project project, String refName,
Account uploader, ObjectId oldId, ObjectId newId);
diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/account/GroupBackends.java b/gerrit-server/src/main/java/com/google/gerrit/server/account/GroupBackends.java
index c2e840a..69ca1e9 100644
--- a/gerrit-server/src/main/java/com/google/gerrit/server/account/GroupBackends.java
+++ b/gerrit-server/src/main/java/com/google/gerrit/server/account/GroupBackends.java
@@ -17,7 +17,6 @@
import com.google.common.collect.Iterables;
import com.google.gerrit.common.Nullable;
import com.google.gerrit.common.data.GroupReference;
-import com.google.gerrit.reviewdb.client.Project;
import com.google.gerrit.server.project.ProjectControl;
import java.util.Collection;
@@ -37,8 +36,8 @@
};
/**
- * Runs {@link GroupBackend#suggest(String, Project)} and filters the result to return
- * the best suggestion, or null if one does not exist.
+ * Runs {@link GroupBackend#suggest(String, ProjectControl)} and filters the
+ * result to return the best suggestion, or null if one does not exist.
*
* @param groupBackend the group backend
* @param name the name for which to suggest groups
@@ -49,9 +48,10 @@
String name) {
return findBestSuggestion(groupBackend, name, null);
}
+
/**
- * Runs {@link GroupBackend#suggest(String, Project)} and filters the result to return
- * the best suggestion, or null if one does not exist.
+ * Runs {@link GroupBackend#suggest(String, ProjectControl)} and filters the
+ * result to return the best suggestion, or null if one does not exist.
*
* @param groupBackend the group backend
* @param name the name for which to suggest groups
@@ -75,8 +75,8 @@
}
/**
- * Runs {@link GroupBackend#suggest(String, Project)} and filters the result to return
- * the exact suggestion, or null if one does not exist.
+ * Runs {@link GroupBackend#suggest(String, ProjectControl)} and filters the
+ * result to return the exact suggestion, or null if one does not exist.
*
* @param groupBackend the group backend
* @param name the name for which to suggest groups
@@ -89,8 +89,8 @@
}
/**
- * Runs {@link GroupBackend#suggest(String, Project)} and filters the result to return
- * the exact suggestion, or null if one does not exist.
+ * Runs {@link GroupBackend#suggest(String, ProjectControl)} and filters the
+ * result to return the exact suggestion, or null if one does not exist.
*
* @param groupBackend the group backend
* @param name the name for which to suggest groups
diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/avatar/AvatarProvider.java b/gerrit-server/src/main/java/com/google/gerrit/server/avatar/AvatarProvider.java
index c0140d0..4b30a8d 100644
--- a/gerrit-server/src/main/java/com/google/gerrit/server/avatar/AvatarProvider.java
+++ b/gerrit-server/src/main/java/com/google/gerrit/server/avatar/AvatarProvider.java
@@ -42,7 +42,7 @@
/**
* Gets a URL for a user to modify their avatar image.
*
- * @param user The user wishing to change their avatar image
+ * @param forUser The user wishing to change their avatar image
* @return a URL the user should visit to modify their avatar, or null if
* modification is not possible.
*/
diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/git/validators/CommitValidationListener.java b/gerrit-server/src/main/java/com/google/gerrit/server/git/validators/CommitValidationListener.java
index 8f11243..e98c49b 100644
--- a/gerrit-server/src/main/java/com/google/gerrit/server/git/validators/CommitValidationListener.java
+++ b/gerrit-server/src/main/java/com/google/gerrit/server/git/validators/CommitValidationListener.java
@@ -30,7 +30,7 @@
/**
* Commit validation.
*
- * @param received commit event details
+ * @param receiveEvent commit event details
* @return list of validation messages
* @throws CommitValidationException if validation fails
*/
diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/git/validators/CommitValidators.java b/gerrit-server/src/main/java/com/google/gerrit/server/git/validators/CommitValidators.java
index 6175367..10fa148 100644
--- a/gerrit-server/src/main/java/com/google/gerrit/server/git/validators/CommitValidators.java
+++ b/gerrit-server/src/main/java/com/google/gerrit/server/git/validators/CommitValidators.java
@@ -550,7 +550,7 @@
*
* @return the canonical URL (with any trailing slash removed) if it is
* configured, otherwise fall back to "http://hostname" where hostname
- * is the value returned by {@link #getGerritHost()}.
+ * is the value returned by {@link #getGerritHost(String)}.
*/
private static String getGerritUrl(String canonicalWebUrl) {
if (canonicalWebUrl != null) {
diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/query/change/PredicateArgs.java b/gerrit-server/src/main/java/com/google/gerrit/server/query/change/PredicateArgs.java
index 2d2f254..3e794b7 100644
--- a/gerrit-server/src/main/java/com/google/gerrit/server/query/change/PredicateArgs.java
+++ b/gerrit-server/src/main/java/com/google/gerrit/server/query/change/PredicateArgs.java
@@ -22,8 +22,8 @@
import java.util.Map;
/**
- * This class is used to extract comma separated values in a predicate
- *
+ * This class is used to extract comma separated values in a predicate.
+ * <p>
* If tags for the values are present (e.g. "branch=jb_2.3,vote=approved") then
* the args are placed in a map that maps tag to value (e.g., "branch" to "jb_2.3").
* If no tag is present (e.g. "jb_2.3,approved") then the args are placed into a
@@ -35,14 +35,12 @@
public Map<String, String> keyValue;
/**
- * Parses query arguments into keyValue and/or positional values
- * labels for these arguments should be kept in ChangeQueryBuilder
- * as ARG_ID_{argument name}.
+ * Parses query arguments into {@link #keyValue} and/or {@link #positional}..
+ * <p>
+ * Labels for these arguments should be kept in ChangeQueryBuilder
+ * as {@code ARG_ID_{argument name}}.
*
- * @param args - arguments to be parsed
- *
- * @return - the static values keyValue and positional will contain
- * the parsed values.
+ * @param args arguments to be parsed
* @throws QueryParseException
*/
PredicateArgs(String args) throws QueryParseException {
diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/ssh/SshAdvertisedAddresses.java b/gerrit-server/src/main/java/com/google/gerrit/server/ssh/SshAdvertisedAddresses.java
index 2219298..4a6eb29 100644
--- a/gerrit-server/src/main/java/com/google/gerrit/server/ssh/SshAdvertisedAddresses.java
+++ b/gerrit-server/src/main/java/com/google/gerrit/server/ssh/SshAdvertisedAddresses.java
@@ -21,8 +21,8 @@
import java.lang.annotation.Retention;
/**
- * Marker on the list of {@link SocketAddress}es configured to be advertised by
- * the server.
+ * Marker on the list of {@link java.net.SocketAddress}es configured to be
+ * advertised by the server.
*/
@Retention(RUNTIME)
@BindingAnnotation
diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/ssh/SshListenAddresses.java b/gerrit-server/src/main/java/com/google/gerrit/server/ssh/SshListenAddresses.java
index be40567..a4e238d 100644
--- a/gerrit-server/src/main/java/com/google/gerrit/server/ssh/SshListenAddresses.java
+++ b/gerrit-server/src/main/java/com/google/gerrit/server/ssh/SshListenAddresses.java
@@ -21,8 +21,8 @@
import java.lang.annotation.Retention;
/**
- * Marker on the list of {@link SocketAddress}es on which the SSH daemon is
- * configured to listen.
+ * Marker on the list of {@link java.net.SocketAddress}es on which the SSH
+ * daemon is configured to listen.
*/
@Retention(RUNTIME)
@BindingAnnotation
diff --git a/lib/asciidoctor/java/DocIndexer.java b/lib/asciidoctor/java/DocIndexer.java
index 7f9f77a..ce6d9fe 100644
--- a/lib/asciidoctor/java/DocIndexer.java
+++ b/lib/asciidoctor/java/DocIndexer.java
@@ -12,17 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.zip.ZipOutputStream;
-
import com.google.common.io.Files;
import org.apache.lucene.analysis.standard.StandardAnalyzer;
@@ -36,12 +25,22 @@
import org.apache.lucene.index.IndexWriterConfig.OpenMode;
import org.apache.lucene.store.NIOFSDirectory;
import org.apache.lucene.util.Version;
-
import org.kohsuke.args4j.Argument;
import org.kohsuke.args4j.CmdLineException;
import org.kohsuke.args4j.CmdLineParser;
import org.kohsuke.args4j.Option;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.zip.ZipOutputStream;
+
public class DocIndexer {
private static final Version LUCENE_VERSION = Version.LUCENE_44;
private static final String DOC_FIELD = "doc";