[errorprone] Add missing javadoc summary See https://google.github.io/styleguide/javaguide.html#s7.2-summary-fragment Change-Id: Id3e65942de725294f7159a300d8a4aa8d207f53d
diff --git a/java/com/google/gitiles/AbstractHttpFilter.java b/java/com/google/gitiles/AbstractHttpFilter.java index f1a7657..51035b7 100644 --- a/java/com/google/gitiles/AbstractHttpFilter.java +++ b/java/com/google/gitiles/AbstractHttpFilter.java
@@ -42,7 +42,12 @@ // Default implementation does nothing. } - /** @see #doFilter(ServletRequest, ServletResponse, FilterChain) */ + /** + * The FilterChain passed in to this method allows the Filter to pass on the request and response + * to the next entity in the chain. + * + * @see #doFilter(ServletRequest, ServletResponse, FilterChain) + */ public abstract void doFilter(HttpServletRequest req, HttpServletResponse res, FilterChain chain) throws IOException, ServletException; }
diff --git a/java/com/google/gitiles/BaseServlet.java b/java/com/google/gitiles/BaseServlet.java index 860ffd8..e0ccce3 100644 --- a/java/com/google/gitiles/BaseServlet.java +++ b/java/com/google/gitiles/BaseServlet.java
@@ -133,6 +133,8 @@ } /** + * Get default format + * * @param req in-progress request. * @return the default {@link FormatType} used when {@code ?format=} is not specified. */ @@ -317,6 +319,8 @@ } /** + * Start to render text. + * * @see #startRenderText(HttpServletRequest, HttpServletResponse) * @param req in-progress request. * @param res in-progress response.
diff --git a/java/com/google/gitiles/CommitJsonData.java b/java/com/google/gitiles/CommitJsonData.java index 5f94a70..478d98f 100644 --- a/java/com/google/gitiles/CommitJsonData.java +++ b/java/com/google/gitiles/CommitJsonData.java
@@ -64,7 +64,7 @@ List<Diff> treeDiff; } - /** @see DiffEntry */ + /** Diff @see DiffEntry */ static class Diff { String type; String oldId; @@ -108,7 +108,7 @@ if (cd.message != null) { result.message = cd.message; } - if (cd.notes != null && !cd.notes.isEmpty()){ + if (cd.notes != null && !cd.notes.isEmpty()) { result.notes = cd.notes; } if (cd.diffEntries != null) {
diff --git a/java/com/google/gitiles/GitilesAccess.java b/java/com/google/gitiles/GitilesAccess.java index 505098a..55d6922 100644 --- a/java/com/google/gitiles/GitilesAccess.java +++ b/java/com/google/gitiles/GitilesAccess.java
@@ -68,21 +68,31 @@ throws ServiceNotEnabledException, ServiceNotAuthorizedException, IOException; /** + * Get user key. + * * @return an opaque object that uniquely identifies the end-user making the request, and supports * {@link Object#equals(Object)} and {@link Object#hashCode()}. Never null. */ Object getUserKey(); - /** @return the repository name associated with the request. */ + /** + * Get repository name. + * + * @return the repository name associated with the request. + */ String getRepositoryName(); /** + * Get repository description. + * * @return the description attached to the repository of this request. * @throws IOException an error occurred reading the description string from the repository. */ RepositoryDescription getRepositoryDescription() throws IOException; /** + * Get configuration. + * * @return configuration to apply to the host/repository for this request. * @throws IOException an error occurred reading the configuration. */
diff --git a/java/com/google/gitiles/GitilesView.java b/java/com/google/gitiles/GitilesView.java index e721c26..6a9e1c1 100644 --- a/java/com/google/gitiles/GitilesView.java +++ b/java/com/google/gitiles/GitilesView.java
@@ -617,7 +617,11 @@ return b.toString(); } - /** @return an escaped, relative URL representing this view. */ + /** + * Create relative URL representing this view. + * + * @return an escaped, relative URL representing this view. + */ public String toUrl() { StringBuilder url = new StringBuilder(servletPath).append('/'); ListMultimap<String, String> params = this.params; @@ -726,6 +730,8 @@ } /** + * Get breadcrumbs. + * * @return a list of maps with "text" and "url" keys for all file paths leading up to the path * represented by this view. All URLs allow auto-diving into one-entry subtrees; see also * {@link #getBreadcrumbs(List)}. @@ -737,6 +743,8 @@ private static final EnumSet<Type> NON_HTML_TYPES = EnumSet.of(Type.DESCRIBE, Type.ARCHIVE); /** + * Get breadcrumbs. + * * @param hasSingleTree list of booleans, one per path entry in this view's path excluding the * leaf. True entries indicate the tree at that path only has a single entry that is another * tree.
diff --git a/java/com/google/gitiles/IdentRevFilter.java b/java/com/google/gitiles/IdentRevFilter.java index ef3ddf8..bc29373 100644 --- a/java/com/google/gitiles/IdentRevFilter.java +++ b/java/com/google/gitiles/IdentRevFilter.java
@@ -51,7 +51,11 @@ return this; } - /** @return whether the given person matches the author filter. */ + /** + * Whether the given person matches the author filter. + * + * @return whether the given person matches the author filter. + */ @VisibleForTesting boolean matchesPerson(PersonIdent person) { // Equivalent to --fixed-strings, to avoid pathological performance of Java
diff --git a/java/com/google/gitiles/Paginator.java b/java/com/google/gitiles/Paginator.java index 3060e45..47c4470 100644 --- a/java/com/google/gitiles/Paginator.java +++ b/java/com/google/gitiles/Paginator.java
@@ -160,6 +160,8 @@ } /** + * Get previous start. + * * @return the ID at the start of the page of results preceding this one, or null if this is the * first page. */ @@ -168,6 +170,8 @@ } /** + * Get next start. + * * @return the ID at the start of the page of results after this one, or null if this is the last * page. */ @@ -176,12 +180,18 @@ return nextStart; } - /** @return entry corresponding to a rename or copy at the given commit. */ + /** + * Get rename. + * + * @return entry corresponding to a rename or copy at the given commit. + */ public DiffEntry getRename(ObjectId commitId) { return renamed != null ? renamed.get(commitId) : null; } /** + * Get iterator over the commits in this walk. + * * @return an iterator over the commits in this walk. * @throws RevWalkException if an error occurred, wrapping the checked exception from {@link * #next()}.
diff --git a/java/com/google/gitiles/blame/cache/BlameCache.java b/java/com/google/gitiles/blame/cache/BlameCache.java index e7f9fca..57a9166 100644 --- a/java/com/google/gitiles/blame/cache/BlameCache.java +++ b/java/com/google/gitiles/blame/cache/BlameCache.java
@@ -20,9 +20,17 @@ import org.eclipse.jgit.lib.Repository; public interface BlameCache { - /** @return the blame of a path at a given commit. */ + /** + * Gets the blame of a path at a given commit. + * + * @return the blame of a path at a given commit. + */ List<Region> get(Repository repo, ObjectId commitId, String path) throws IOException; - /** @return the last commit that modified a path, starting at the given commit. */ + /** + * Gets the last commit that modified a path. + * + * @return the last commit that modified a path, starting at the given commit. + */ ObjectId findLastCommit(Repository repo, ObjectId commitId, String path) throws IOException; }
diff --git a/javatests/com/google/gitiles/TestGitilesServlet.java b/javatests/com/google/gitiles/TestGitilesServlet.java index 036707c..df2be60 100644 --- a/javatests/com/google/gitiles/TestGitilesServlet.java +++ b/javatests/com/google/gitiles/TestGitilesServlet.java
@@ -31,13 +31,13 @@ /** Static utility methods for creating {@link GitilesServlet}s for testing. */ public class TestGitilesServlet { - /** @see #create(TestRepository,GitwebRedirectFilter, BranchRedirect) */ + /** Create GitilesServlet, @see #create(TestRepository,GitwebRedirectFilter, BranchRedirect) */ public static GitilesServlet create(final TestRepository<DfsRepository> repo) throws ServletException { return create(repo, new GitwebRedirectFilter(), new BranchRedirect()); } - /** @see #create(TestRepository,GitwebRedirectFilter, BranchRedirect) */ + /** Create GitilesServlet, @see #create(TestRepository,GitwebRedirectFilter, BranchRedirect) */ public static GitilesServlet create( final TestRepository<DfsRepository> repo, GitwebRedirectFilter gitwebRedirect) throws ServletException {