From ade4b7028c77ccc7b12d55d7a77e718316f33095 Mon Sep 17 00:00:00 2001 From: Shinsuke Sugaya Date: Sun, 7 Jun 2026 06:22:33 +0900 Subject: [PATCH] docs(javadoc): resolve missing Javadoc warnings Add Javadoc for undocumented default constructors in CookieConfig, CredentialsConfig, and WebAuthenticationConfig, document PsExtractor .extractText, add missing @param sitemapBaseUrl to SitemapsHelper parse methods, and document the SizeLimitedInputStream constructor. --- .../fess/crawler/client/http/config/CookieConfig.java | 7 +++++++ .../crawler/client/http/config/CredentialsConfig.java | 7 +++++++ .../client/http/config/WebAuthenticationConfig.java | 7 +++++++ .../codelibs/fess/crawler/extractor/impl/PsExtractor.java | 5 +++++ .../org/codelibs/fess/crawler/helper/SitemapsHelper.java | 8 ++++++++ 5 files changed, 34 insertions(+) diff --git a/fess-crawler/src/main/java/org/codelibs/fess/crawler/client/http/config/CookieConfig.java b/fess-crawler/src/main/java/org/codelibs/fess/crawler/client/http/config/CookieConfig.java index 6b726fdc..fb2c4fb8 100644 --- a/fess-crawler/src/main/java/org/codelibs/fess/crawler/client/http/config/CookieConfig.java +++ b/fess-crawler/src/main/java/org/codelibs/fess/crawler/client/http/config/CookieConfig.java @@ -37,6 +37,13 @@ */ public class CookieConfig { + /** + * Creates a new CookieConfig instance. + */ + public CookieConfig() { + // Default constructor + } + private String name; private String value; private String domain; diff --git a/fess-crawler/src/main/java/org/codelibs/fess/crawler/client/http/config/CredentialsConfig.java b/fess-crawler/src/main/java/org/codelibs/fess/crawler/client/http/config/CredentialsConfig.java index 886d05d1..0e8baee9 100644 --- a/fess-crawler/src/main/java/org/codelibs/fess/crawler/client/http/config/CredentialsConfig.java +++ b/fess-crawler/src/main/java/org/codelibs/fess/crawler/client/http/config/CredentialsConfig.java @@ -37,6 +37,13 @@ */ public class CredentialsConfig { + /** + * Creates a new CredentialsConfig instance. + */ + public CredentialsConfig() { + // Default constructor + } + /** * Type of credentials. */ diff --git a/fess-crawler/src/main/java/org/codelibs/fess/crawler/client/http/config/WebAuthenticationConfig.java b/fess-crawler/src/main/java/org/codelibs/fess/crawler/client/http/config/WebAuthenticationConfig.java index 221f6fb0..9ed68c2a 100644 --- a/fess-crawler/src/main/java/org/codelibs/fess/crawler/client/http/config/WebAuthenticationConfig.java +++ b/fess-crawler/src/main/java/org/codelibs/fess/crawler/client/http/config/WebAuthenticationConfig.java @@ -48,6 +48,13 @@ */ public class WebAuthenticationConfig { + /** + * Creates a new WebAuthenticationConfig instance. + */ + public WebAuthenticationConfig() { + // Default constructor + } + /** * Type of authentication scheme. */ diff --git a/fess-crawler/src/main/java/org/codelibs/fess/crawler/extractor/impl/PsExtractor.java b/fess-crawler/src/main/java/org/codelibs/fess/crawler/extractor/impl/PsExtractor.java index 4cf73d13..a647c83d 100644 --- a/fess-crawler/src/main/java/org/codelibs/fess/crawler/extractor/impl/PsExtractor.java +++ b/fess-crawler/src/main/java/org/codelibs/fess/crawler/extractor/impl/PsExtractor.java @@ -99,6 +99,11 @@ public void setEncoding(final String encoding) { this.encoding = encoding; } + /** + * Extracts readable text from the given PostScript content. + * @param psContent the PostScript content to extract text from + * @return the extracted text + */ protected String extractText(final String psContent) { final List collectedTexts = new ArrayList<>(); final List stack = new ArrayList<>(); diff --git a/fess-crawler/src/main/java/org/codelibs/fess/crawler/helper/SitemapsHelper.java b/fess-crawler/src/main/java/org/codelibs/fess/crawler/helper/SitemapsHelper.java index d2dca1dd..974c4c66 100644 --- a/fess-crawler/src/main/java/org/codelibs/fess/crawler/helper/SitemapsHelper.java +++ b/fess-crawler/src/main/java/org/codelibs/fess/crawler/helper/SitemapsHelper.java @@ -212,6 +212,7 @@ protected SitemapSet parse(final InputStream in, final boolean recursive, final /** * Parses a text-based sitemap from the given input stream. * @param in the input stream to parse + * @param sitemapBaseUrl the base URL used to resolve relative sitemap URLs * @return the parsed sitemap set */ protected SitemapSet parseTextSitemaps(final InputStream in, final String sitemapBaseUrl) { @@ -265,6 +266,7 @@ protected SitemapSet parseTextSitemaps(final InputStream in, final String sitema /** * Parses an XML sitemap from the given input stream. * @param in the input stream to parse + * @param sitemapBaseUrl the base URL used to resolve relative sitemap URLs * @return the parsed sitemap set */ protected SitemapSet parseXmlSitemaps(final InputStream in, final String sitemapBaseUrl) { @@ -699,6 +701,7 @@ public SitemapSet getSitemapSet() { /** * Parses an XML sitemap index from the given input stream. * @param in the input stream to parse + * @param sitemapBaseUrl the base URL used to resolve relative sitemap URLs * @return the parsed sitemap set */ protected SitemapSet parseXmlSitemapsIndex(final InputStream in, final String sitemapBaseUrl) { @@ -1161,6 +1164,11 @@ protected static class SizeLimitedInputStream extends FilterInputStream { private long bytesRead; + /** + * Creates a new SizeLimitedInputStream wrapping the given input stream. + * @param in the input stream to wrap + * @param maxSize the maximum number of bytes allowed to be read + */ protected SizeLimitedInputStream(final InputStream in, final long maxSize) { super(in); this.maxSize = maxSize;