This is an automated email from the ASF dual-hosted git repository.
gk pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/turbine-core.git
The following commit(s) were added to refs/heads/trunk by this push:
new 6d483823 remove javadoc errors and warnings
6d483823 is described below
commit 6d4838231264b2e14fd76701de67220bae1d6ae2
Author: Georg Kallidis <[email protected]>
AuthorDate: Mon Jan 15 16:33:11 2024 +0100
remove javadoc errors and warnings
---
.../turbine/annotation/AnnotationProcessor.java | 4 +-
.../apache/turbine/modules/screens/JSONScreen.java | 4 +-
.../turbine/services/jsonrpc/package-info.java | 2 +-
.../localization/DateTimeFormatterInterface.java | 50 +++++++++++++---------
.../localization/DateTimeFormatterService.java | 19 +++-----
.../localization/RundataLocalizationInterface.java | 2 +-
.../org/apache/turbine/services/package-info.java | 21 ++++-----
.../turbine/services/pull/TurbinePullService.java | 2 +-
.../services/pull/util/DateTimeFormatterTool.java | 6 +--
.../services/rundata/DefaultTurbineRunData.java | 2 +-
.../services/schedule/QuartzSchedulerService.java | 2 +-
.../services/template/TemplateEngineService.java | 2 +-
.../org/apache/turbine/util/BrowserDetector.java | 2 +-
.../org/apache/turbine/util/TurbineConfig.java | 2 +-
.../turbine/util/velocity/VelocityHtmlEmail.java | 16 +++----
15 files changed, 70 insertions(+), 66 deletions(-)
diff --git a/src/java/org/apache/turbine/annotation/AnnotationProcessor.java
b/src/java/org/apache/turbine/annotation/AnnotationProcessor.java
index be1a1873..58149f8c 100644
--- a/src/java/org/apache/turbine/annotation/AnnotationProcessor.java
+++ b/src/java/org/apache/turbine/annotation/AnnotationProcessor.java
@@ -397,7 +397,7 @@ public class AnnotationProcessor
* injects annotations provided in the tool.
*
* @param object the object to process
- * @param assembler AssemblerBrokerService, provides the tool
+ * @param pool PoolService, provides the pool
* @param field the field
* @param annotation the value of the annotation
*
@@ -625,7 +625,7 @@ public class AnnotationProcessor
* @param manager the service manager
* @param method The method
* @param annotation the value of the annotation
- * @throws TurbineException
+ * @throws TurbineException - If service could not be injected.
*/
private static void injectTurbineService(Object object, ServiceManager
manager, Method method, TurbineService annotation) throws TurbineException
{
diff --git a/src/java/org/apache/turbine/modules/screens/JSONScreen.java
b/src/java/org/apache/turbine/modules/screens/JSONScreen.java
index 1da41277..8df01ea3 100644
--- a/src/java/org/apache/turbine/modules/screens/JSONScreen.java
+++ b/src/java/org/apache/turbine/modules/screens/JSONScreen.java
@@ -44,7 +44,7 @@ import org.jabsorb.JSONRPCBridge;
* logged in prior to executing the functions you provide.
*
* <p>Here is an example from a superclass:
- * <code>
+ * {@code
* public void doOutput(PipelineData data) throws Exception
* {
* User user = data.getUser();
@@ -59,7 +59,7 @@ import org.jabsorb.JSONRPCBridge;
*
* super.doOutput(data);
* }
- * </code>
+ * }
*
* <p>The class MyFunctions would be something like:
* <code>
diff --git a/src/java/org/apache/turbine/services/jsonrpc/package-info.java
b/src/java/org/apache/turbine/services/jsonrpc/package-info.java
index 10d0ae6f..14631457 100644
--- a/src/java/org/apache/turbine/services/jsonrpc/package-info.java
+++ b/src/java/org/apache/turbine/services/jsonrpc/package-info.java
@@ -19,6 +19,6 @@
/**
* The JSON-RPC Service supports JavaScript to Java AJAX communications between
- * browsers and Turbine applications.<br />
+ * browsers and Turbine applications.<br>
*/
package org.apache.turbine.services.jsonrpc;
diff --git
a/src/java/org/apache/turbine/services/localization/DateTimeFormatterInterface.java
b/src/java/org/apache/turbine/services/localization/DateTimeFormatterInterface.java
index 95b3efd1..cf3bfab9 100644
---
a/src/java/org/apache/turbine/services/localization/DateTimeFormatterInterface.java
+++
b/src/java/org/apache/turbine/services/localization/DateTimeFormatterInterface.java
@@ -27,10 +27,10 @@ public interface DateTimeFormatterInterface {
String getFormatPattern();
/**
- * Formats the given datetime as a String with the #{@link
DateTimeFormatterService#defaultFormat}.
+ * Formats the given datetime as a String with the #{@link
DateTimeFormatterService#getDefaultFormat()}.
* using the default date format.
*
- * @param the {@link TemporalAccessor to format
+ * @param temporalAccessor {@link TemporalAccessor to format
* @return String value of the date
*/
<T extends TemporalAccessor> String format(T temporalAccessor);
@@ -38,7 +38,7 @@ public interface DateTimeFormatterInterface {
/**
* Formats the given date as a String.
*
- * @param the TimeDate date to format
+ * @param temporalAccessor TimeDate date to format
* @param dateFormatString format string to use. See {@link
DateTimeFormatter}
* for details.
* @return String value of the date
@@ -48,10 +48,10 @@ public interface DateTimeFormatterInterface {
/**
* Formats the given date as a String.
*
- * @param the TimeDate date to format
+ * @param temporalAccessor TimeDate date to format
* @param dateFormatString format string to use. See {@link
DateTimeFormatter}
* for details.
- * @param locale
+ * @param locale used to loclize the format
* @return String value of the date
*/
<T extends TemporalAccessor> String format(T temporalAccessor, String
dateFormatString, Locale locale);
@@ -59,7 +59,7 @@ public interface DateTimeFormatterInterface {
/**
* Formats the given date as a String.
*
- * @param the TimeDate date to format
+ * @param temporalAccessor TimeDate date to format
* @param dateFormatString format string to use. See {@link
DateTimeFormatter}
* for details.
* @param locale the {@link Locale}
@@ -71,43 +71,51 @@ public interface DateTimeFormatterInterface {
/**
* Maps from an incoming format to an outgoing format {@link
DateTimeFormatter}.
* @param src the formatted datetime
- * @param outgoingFormat {@link DateTimeFormatter}
+ * @param outgoingFormat the outgoingFormat pattern, {@link
DateTimeFormatter}
* @param locale Locale, if needed for outgoing formatting, no default.
- * @param incomingFormat {@link DateTimeFormatter}, optional, default is
{@link #defaultFormat}.
+ * @param incomingFormat the incming format pattern {@link
DateTimeFormatter}, optional, default is {@link #getDefaultFormat()}.
* @return the newly mapped
*/
- String map(String src, String outgoingFormatPattern, Locale locale, String
incomingFormatPattern);
+ String map(String src, String outgoingFormat, Locale locale, String
incomingFormat);
/**
- * Uses as incoming format {@link #defaultFormat} and no locale.
- * @param src
- * @param outgoingFormat
+ * Uses as incoming format {@link #getDefaultFormat()} and no locale.
+ * @param src the text, which will be parsed using the incomingFormat.
+ * @param outgoingFormat the outgoing formatter, which will format.
+ * @param locale The locale, if not null which will outgoingFormat use,
{@link DateTimeFormatter#withLocale(Locale)}.
+ * @param incomingFormat the incoming formatter, which will be parsed.
* @return the formatted string
*
- * @throws java.time.temporal.UnsupportedTemporalTypeException
*/
String map(String src, DateTimeFormatter outgoingFormat, Locale locale,
DateTimeFormatter incomingFormat);
/**
- * Uses as outgoing {@link DateTimeFormatter} {@link #defaultFormat} and
no locale.
+ * Uses as outgoing {@link DateTimeFormatter} {@link #getDefaultFormat()}
and no locale.
+ *
* @param src the datetime formatted string
- * @param incomingFormat the format of this string
- * @return the date time formatted using the {@link #defaultFormat}.
+ * @param outgoingFormat the format of this string
+ * @return the date time formatted
*/
String mapTo(String src, DateTimeFormatter outgoingFormat);
/**
- * Uses as incoming {@link DateTimeFormatter} {@link #defaultFormat}.
* @param src the datetime formatted string
- * @param outgoingFormat the format to which this string should be
formatted.
- * @param locale
- * @return the newly formatted date time string
+ * @param incomingFormat the format to which this incoming string should
be formatted.
*
- * @throws java.time.temporal.UnsupportedTemporalTypeException
+ * @return the newly formatted date time string
*/
String mapFrom(String src, DateTimeFormatter incomingFormat);
+ /**
+ * Uses as incoming {@link DateTimeFormatter} {@link #getDefaultFormat()}.
+ *
+ * @param src the datetime formatted string
+ * @param outgoingFormat the format to which this string should be
formatted.
+ * @param locale The locale, if not null,the incomingFormat will use.
+ *
+ * @return the newly formatted date time string
+ */
String map(String src, DateTimeFormatter outgoingFormat, Locale locale);
ZoneId getZoneId();
diff --git
a/src/java/org/apache/turbine/services/localization/DateTimeFormatterService.java
b/src/java/org/apache/turbine/services/localization/DateTimeFormatterService.java
index 33659901..f6416cfd 100644
---
a/src/java/org/apache/turbine/services/localization/DateTimeFormatterService.java
+++
b/src/java/org/apache/turbine/services/localization/DateTimeFormatterService.java
@@ -21,7 +21,7 @@ import org.apache.turbine.util.LocaleUtils;
* objects into strings.
*
* The methods may throw {@link
java.time.temporal.UnsupportedTemporalTypeException} or
- * {@link DateTimeParseException}.
+ * {@link DateTimeParseException}, e.g.
* if the source and the target format do not match appropriately.
*
*/
@@ -38,11 +38,6 @@ public class DateTimeFormatterService
private ZoneId zoneId;
- /**
- * configura
- */
- private boolean useTurbineLocale = true;
-
@Override
public DateTimeFormatter getDefaultFormat()
{
@@ -76,22 +71,22 @@ public class DateTimeFormatterService
formatPattern = Turbine.getConfiguration()
.getString(DATE_TIME_FORMAT_KEY, DATE_TIME_FORMAT_DEFAULT);
- useTurbineLocale = Turbine.getConfiguration()
+ boolean useTurbineLocale = Turbine.getConfiguration()
.getBoolean(USE_TURBINE_LOCALE_KEY, true);
- Locale locale = (useTurbineLocale && LocaleUtils.getDefaultLocale() !=
null)?
+ Locale localeSetter = (useTurbineLocale &&
LocaleUtils.getDefaultLocale() != null)?
LocaleUtils.getDefaultLocale()
: Locale.getDefault();
- setLocale(locale);
+ setLocale(localeSetter);
String zoneIdStr = Turbine.getConfiguration()
.getString(DATE_TIME_ZONEID_KEY);
- ZoneId zoneId = (zoneIdStr != null)? ZoneId.of( zoneIdStr ) :
+ ZoneId zoneIdSet = (zoneIdStr != null)? ZoneId.of( zoneIdStr ) :
ZoneId.systemDefault();
- setZoneId(zoneId);
+ setZoneId(zoneIdSet);
dateTimeFormat = DateTimeFormatter.ofPattern(formatPattern)
- .withLocale(locale).withZone(zoneId);
+ .withLocale(localeSetter).withZone(zoneIdSet);
log.info("Initialized DateTimeFormatterService with pattern {}, locale
{} and zone {}",
formatPattern, dateTimeFormat.getLocale(),
diff --git
a/src/java/org/apache/turbine/services/localization/RundataLocalizationInterface.java
b/src/java/org/apache/turbine/services/localization/RundataLocalizationInterface.java
index 552b910f..7e744e31 100644
---
a/src/java/org/apache/turbine/services/localization/RundataLocalizationInterface.java
+++
b/src/java/org/apache/turbine/services/localization/RundataLocalizationInterface.java
@@ -11,7 +11,7 @@ public interface RundataLocalizationInterface extends
LocalizationService, Seria
/**
* Get the locale from the session first, then fallback to normal request
headers.
*
- * @param data
+ * @param data the {@link RunData}, which allows a guess for the locale.
* @return Current locale based on state.
*/
Locale getLocale(RunData data);
diff --git a/src/java/org/apache/turbine/services/package-info.java
b/src/java/org/apache/turbine/services/package-info.java
index 253708dc..f49e2794 100644
--- a/src/java/org/apache/turbine/services/package-info.java
+++ b/src/java/org/apache/turbine/services/package-info.java
@@ -22,10 +22,10 @@
* <p>
* Services are singletons that have pluggable implementation
* and can participate in Turbine startup and shutdown.
- * <p>
- * <table><tr><td width="100%">
- *
- * <h3>What is a service?</h3>
+ * </p>
+ * <table summary="Turbine service explained.">
+ * <tr><th>What is a service?</th></tr>
+ * <tr><td style="width: 100%">
* <ul>
* <li> Is a singleton - there is only one instance of it in the system
* i.e. memory or connections are allocated once only, and the internal
@@ -43,7 +43,7 @@
* <li> Can execute some action upon system shutdown e.g. close the
* opened connections.
* </ul>
- * <h3>The life cycle of a Service</h3>
+ * <strong>The life cycle of a Service</strong>
* <p>
* A Service (or any other Initable, if we had any) is not supposed
* to do much in it's constructor. Especially it should not allocate
@@ -52,7 +52,7 @@
* is sitting in the config file, but the application does not
* need it, so allocating all resources at system startup might
* be a loss.
- * <p>
+ * </p><p>
* Early initialization is similar to the constructor. It is used
* to pass some information that the Service will need in it's
* future operation.
@@ -66,20 +66,21 @@
* being sent to it), and does not to allocate any resources during
* late initialization, the internal state can be changed so that
* getInit() returns true.
- * <p>
+ * </p><p>
* Late initialization happens when the Service is requested by the
* application for the first time. It should allocate any resources
* needed and change the state so that getInit() returns true.
* If getInit() returns false after init() is executed, the Service
* has malfunctioned.
- * <p>
+ * </p><p>
* After late initialization, the Service is ready to perform actions
* on behalf of the application.
- * <p>
+ * </p><p>
* When the Service is no longer needed (this usually happens when
* system is shutting down), the shutdown() method is called.
* shutdown() should deallocate all resources. If any error conditions
* occur they are ignored.
+ * </p>
* <h3>Initialization of services outside of the Turbine servlet</h3>
* <p>
* In the case where specific Turbine services are desired outside the
@@ -88,7 +89,7 @@
* <code>TurbineResources.properties</code> file to initialize a specific
* set of services to use in your application. The following sample
* code performs such initialization:
- * <p>
+ * </p>
* <code>
* String webAppRoot = "/var/httpd/webapps";
* String trProps = "/var/httpd/TurbineResources.properties";
diff --git a/src/java/org/apache/turbine/services/pull/TurbinePullService.java
b/src/java/org/apache/turbine/services/pull/TurbinePullService.java
index f673749a..4ab67a7b 100644
--- a/src/java/org/apache/turbine/services/pull/TurbinePullService.java
+++ b/src/java/org/apache/turbine/services/pull/TurbinePullService.java
@@ -805,7 +805,7 @@ public class TurbinePullService
* Refresh a given Tool.
*
* @param tool A Tool Object
- * @param pipelineData The current RunData Object
+ * @param dataObject The current RunData Object
*/
private void refreshTool(Object tool, Object dataObject)
{
diff --git
a/src/java/org/apache/turbine/services/pull/util/DateTimeFormatterTool.java
b/src/java/org/apache/turbine/services/pull/util/DateTimeFormatterTool.java
index 1edb6c83..e641714e 100644
--- a/src/java/org/apache/turbine/services/pull/util/DateTimeFormatterTool.java
+++ b/src/java/org/apache/turbine/services/pull/util/DateTimeFormatterTool.java
@@ -77,7 +77,7 @@ public class DateTimeFormatterTool extends DateFormatter
* <li>For session and persistent tools data will be of type User</li>
* </ul>
*
- * the {@link #defaultFormat} from {@link #formatPattern}
+ * the {@link #getDefaultFormat()} from {@link #getFormatPattern()}
* with {@link DateTimeFormatterService#getLocale()}
* and zoneId {@link DateTimeFormatterService#getZoneId()} is used.
*
@@ -141,10 +141,10 @@ public class DateTimeFormatterTool extends DateFormatter
}
/**
- * Formats the given datetime as a String with the #{@link
DateTimeFormatterTool#defaultFormat}.
+ * Formats the given datetime as a String with the #{@link
DateTimeFormatterTool#getDefaultFormat()}.
* using the default date format.
*
- * @param the {@link TemporalAccessor to format
+ * @param temporalAccessor {@link TemporalAccessor to format
* @return String value of the date
*/
@Override
diff --git
a/src/java/org/apache/turbine/services/rundata/DefaultTurbineRunData.java
b/src/java/org/apache/turbine/services/rundata/DefaultTurbineRunData.java
index b659e3d6..0230715f 100644
--- a/src/java/org/apache/turbine/services/rundata/DefaultTurbineRunData.java
+++ b/src/java/org/apache/turbine/services/rundata/DefaultTurbineRunData.java
@@ -98,7 +98,7 @@ public class DefaultTurbineRunData
/** The character encoding of template files. */
private String templateEncoding;
- /** This is what will build the <title></title> of the document. */
+ /** This is what will build the title of the document. */
private String title;
/** Determines if there is information in the outputstream or not. */
diff --git
a/src/java/org/apache/turbine/services/schedule/QuartzSchedulerService.java
b/src/java/org/apache/turbine/services/schedule/QuartzSchedulerService.java
index c7dfe777..10cd7edd 100644
--- a/src/java/org/apache/turbine/services/schedule/QuartzSchedulerService.java
+++ b/src/java/org/apache/turbine/services/schedule/QuartzSchedulerService.java
@@ -370,7 +370,7 @@ public class QuartzSchedulerService
/**
* @param je a generic job entry
- * @throws TurbineException
+ * @throws TurbineException - If the cast fails.
*
* @return A downcasted JobEntry type
*/
diff --git
a/src/java/org/apache/turbine/services/template/TemplateEngineService.java
b/src/java/org/apache/turbine/services/template/TemplateEngineService.java
index 0db66a6d..c18ec633 100644
--- a/src/java/org/apache/turbine/services/template/TemplateEngineService.java
+++ b/src/java/org/apache/turbine/services/template/TemplateEngineService.java
@@ -72,7 +72,7 @@ public interface TemplateEngineService
* Supplies the file extension to key this engine in {@link
* org.apache.turbine.services.template.TemplateService}'s
* registry with.
- * @return the list of extensions this engine supports
+ * @return the array of extensions this engine supports
*/
String[] getAssociatedFileExtensions();
diff --git a/src/java/org/apache/turbine/util/BrowserDetector.java
b/src/java/org/apache/turbine/util/BrowserDetector.java
index 0c47206e..58e5be28 100644
--- a/src/java/org/apache/turbine/util/BrowserDetector.java
+++ b/src/java/org/apache/turbine/util/BrowserDetector.java
@@ -27,7 +27,7 @@ import nl.basjes.parse.useragent.UserAgentAnalyzer;
/**
* This class parses the user agent string and provides getters for
- * its parts. It uses YAUAA (https://yauaa.basjes.nl/)
+ * its parts. It uses (<a href="https://yauaa.basjes.nl/">YAUAA</a>).
*
* The initialization step for a full UserAgentAnalyzer
* (i.e. all fields) usually takes something in the range of 2-5 seconds.
diff --git a/src/java/org/apache/turbine/util/TurbineConfig.java
b/src/java/org/apache/turbine/util/TurbineConfig.java
index 69fc3b84..fb242744 100644
--- a/src/java/org/apache/turbine/util/TurbineConfig.java
+++ b/src/java/org/apache/turbine/util/TurbineConfig.java
@@ -171,7 +171,7 @@ public class TurbineConfig
*/
public TurbineConfig(String path, Map<String, String> initParams)
{
- this(path, new HashMap<String, Object>(0), initParams);
+ this(path, new HashMap<>(0), initParams);
}
/**
diff --git a/src/java/org/apache/turbine/util/velocity/VelocityHtmlEmail.java
b/src/java/org/apache/turbine/util/velocity/VelocityHtmlEmail.java
index 1b3123d5..cda46af4 100644
--- a/src/java/org/apache/turbine/util/velocity/VelocityHtmlEmail.java
+++ b/src/java/org/apache/turbine/util/velocity/VelocityHtmlEmail.java
@@ -224,14 +224,14 @@ public class VelocityHtmlEmail extends HtmlEmail
*
* <p>Example of template:
*
- * <pre>
- * <html>
- * <!-- $mail.embed("http://server/border.gif","border.gif"); -->
- * <img src=$mail.getCid("border.gif")>
- * <p>This is your content
- * <img src=$mail.getCid("border.gif")>
- * </html>
- * </pre>
+ * {@code
+ * <html>
+ * <!-- $mail.embed("http://server/border.gif","border.gif"); -->
+ * <img src=$mail.getCid("border.gif")>
+ * <p>This is your content
+ * <img src=$mail.getCid("border.gif")>
+ * </html>
+ * }
*
* @param surl A String.
* @param name A String.