Miscellaneous Javadoc cleanups to cut down on Eclipse warnings

Change-Id: Ifd80c546641db979911e3339fa40ab3585ca69a1
This commit is contained in:
Dave Borowitz
2013-10-08 11:06:19 -07:00
parent 6da366f2b3
commit 23da0d9f13
24 changed files with 58 additions and 66 deletions

View File

@@ -150,7 +150,7 @@ public class GitWebType {
/**
* 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()) {

View File

@@ -55,7 +55,7 @@ public class GroupInfoCache {
* <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) {

View File

@@ -30,7 +30,7 @@ public interface SuggestService extends RemoteJsonService {
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,

View File

@@ -21,7 +21,8 @@ import java.lang.annotation.Retention;
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})

View File

@@ -17,6 +17,7 @@ package com.google.gerrit.extensions.registration;
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 @@ public abstract class DynamicMap<T> implements Iterable<DynamicMap.Entry<T>> {
* @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;
}

View File

@@ -51,7 +51,7 @@ public class PrivateInternals_DynamicMapImpl<T> extends DynamicMap<T> {
* @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.

View File

@@ -47,9 +47,9 @@ public class LinkFindReplace implements FindReplace {
}
/**
* @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);

View File

@@ -29,9 +29,9 @@ public class RawFindReplace implements FindReplace {
}
/**
* @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);

View File

@@ -55,10 +55,8 @@ import java.util.Map;
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 @@ public class PatchTable extends Composite {
* @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 @@ public class PatchTable extends Composite {
* @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) {

View File

@@ -24,7 +24,7 @@ import net.codemirror.lib.TextMarker.FromTo;
/**
* 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) {

View File

@@ -19,7 +19,7 @@ import com.google.gwt.core.client.JavaScriptObject;
/**
* 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 {

View File

@@ -53,8 +53,8 @@ import javax.servlet.http.HttpServletResponseWrapper;
* 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>
*/

View File

@@ -208,7 +208,7 @@ class OpenIdServiceImpl {
}
}
/** 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))) {

View File

@@ -25,14 +25,10 @@ import java.sql.Timestamp;
* 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

View File

@@ -36,7 +36,7 @@ public interface SubmoduleSubscriptionAccess extends
* 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

View File

@@ -167,7 +167,6 @@ public interface ChangeHooks {
* @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);

View File

@@ -17,7 +17,6 @@ package com.google.gerrit.server.account;
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 @@ public class GroupBackends {
};
/**
* 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 @@ public class GroupBackends {
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 @@ public class GroupBackends {
}
/**
* 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 @@ public class GroupBackends {
}
/**
* 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

View File

@@ -42,7 +42,7 @@ public interface AvatarProvider {
/**
* 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.
*/

View File

@@ -30,7 +30,7 @@ public interface CommitValidationListener {
/**
* Commit validation.
*
* @param received commit event details
* @param receiveEvent commit event details
* @return list of validation messages
* @throws CommitValidationException if validation fails
*/

View File

@@ -550,7 +550,7 @@ public class CommitValidators {
*
* @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) {

View File

@@ -22,8 +22,8 @@ import java.util.List;
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 class PredicateArgs {
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 {

View File

@@ -21,8 +21,8 @@ import com.google.inject.BindingAnnotation;
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

View File

@@ -21,8 +21,8 @@ import com.google.inject.BindingAnnotation;
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

View File

@@ -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;
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";