This is an automated email from the ASF dual-hosted git repository.

ddekany pushed a commit to branch FREEMARKER-35
in repository https://gitbox.apache.org/repos/asf/freemarker.git

commit 89e934d211a33e1683b74ea449e72043748ab06f
Author: ddekany <[email protected]>
AuthorDate: Mon Nov 8 01:55:34 2021 +0100

    [FREEMARKER-35] JavaDoc fixes
---
 src/main/java/freemarker/core/Configurable.java    | 26 +++++++++++-----------
 .../freemarker/core/TemplateTemporalFormat.java    |  1 +
 .../java/freemarker/ext/beans/BeansWrapper.java    |  2 +-
 .../java/freemarker/template/Configuration.java    |  1 +
 .../freemarker/template/TemplateTemporalModel.java |  8 ++++++-
 5 files changed, 23 insertions(+), 15 deletions(-)

diff --git a/src/main/java/freemarker/core/Configurable.java 
b/src/main/java/freemarker/core/Configurable.java
index a3d2d64..c62abfd 100644
--- a/src/main/java/freemarker/core/Configurable.java
+++ b/src/main/java/freemarker/core/Configurable.java
@@ -1054,7 +1054,7 @@ public class Configurable {
      * Gets the custom number format factory registered for the name, or 
{@code null} if no format with the given name
      * was registered.
      *
-     * @name The name of the custom format; do not start it with {@code '@'}!
+     * @param name The name of the custom format; do not start it with {@code 
'@'}!
      * @return The format factory, or {@code null}
      * 
      * @since 2.3.24
@@ -1392,7 +1392,7 @@ public class Configurable {
      *
      * <p>Defaults to {@code "medium"}, which means {@link FormatStyle#MEDIUM}.
      *
-     * @param localDateTimeFormat
+     * @param instantFormat
      *     See the similar parameter of {@link 
#setZonedDateTimeFormat(String)};
      *     {@code iso}/{@code xs} will show the time offset.
      *
@@ -1426,7 +1426,7 @@ public class Configurable {
      *
      * <p>Defaults to {@code "medium"}, which means {@link FormatStyle#MEDIUM}.
      *
-     * @param localDateTimeFormat
+     * @param localDateFormat
      *     See the similar parameter of {@link 
#setZonedDateTimeFormat(String)};
      *     {@code iso}/{@code xs} will not show the time part.
      *
@@ -1494,7 +1494,7 @@ public class Configurable {
      *
      * <p>Defaults to {@code "medium"}, which means {@link FormatStyle#MEDIUM}.
      *
-     * @param localDateTimeFormat
+     * @param localTimeFormat
      *     See the similar parameter of {@link 
#setZonedDateTimeFormat(String)};
      *     {@code iso}/{@code xs} will not show the time offset.
      *
@@ -1531,7 +1531,7 @@ public class Configurable {
      * <p>Defaults to {@code "medium"}, which means {@link 
FormatStyle#MEDIUM}, which usually doesn't show the time
      * offset; see the parameter JavaDoc for more.
      *
-     * @param localDateTimeFormat
+     * @param offsetDateTimeFormat
      *     See the similar parameter of {@link 
#setZonedDateTimeFormat(String)}.
      *
      * @since 2.3.32
@@ -1568,7 +1568,7 @@ public class Configurable {
      * <p>Defaults to {@code "long"}, which means {@link FormatStyle#LONG}, 
which usually show the time offset; see the
      * parameter JavaDoc for more.
      *
-     * @param localDateTimeFormat
+     * @param offsetTimeFormat
      *     See the similar parameter of {@link 
#setZonedDateTimeFormat(String)}, but it <b>must show the offset</b>
      *     (see earlier why).
      *
@@ -1604,7 +1604,7 @@ public class Configurable {
      * <p>Defaults to {@code "medium"}, which means {@link 
FormatStyle#MEDIUM}, which usually doesn't show the time
      * zone; see the parameter JavaDoc for more.
      *
-     * @param localDateTimeFormat
+     * @param zonedDateTimeFormat
      *     One of:
      *     <ul>
      *         <li>{@code "iso"}: ISO-8601 format (like {@code 
2021-09-29T13:00:05.2})
@@ -1650,7 +1650,7 @@ public class Configurable {
      *
      * <p>Defaults to {@code "iso"}, which will simply show the year like 
{@code "2021"} (without the quotation marks).
      *
-     * @param localDateTimeFormat
+     * @param yearFormat
      *     See the similar parameter of {@link 
#setZonedDateTimeFormat(String)},
      *     {@code iso}/{@code xs} only the year is shown.
      *     Java (as of version 8) doesn't support "styles" (like "short", 
"medium", etc.) for this.
@@ -1684,7 +1684,7 @@ public class Configurable {
      *
      * <p>Defaults to {@code "iso"}, which will show the value like {@code 
"2021-12"} (without the quotation marks).
      *
-     * @param localDateTimeFormat
+     * @param yearMonthFormat
      *     See the similar parameter of {@link 
#setZonedDateTimeFormat(String)};
      *     {@code iso}/{@code xs} will look like {@code 2021-12}.
      *     Java (as of version 8) doesn't support "styles" (like "short", 
"medium", etc.) for this.
@@ -1722,8 +1722,8 @@ public class Configurable {
      *
      * @return Never {@code null}.
      *
-     * @throws NullPointerException If {@link temporalClass} was {@code null}
-     * @throws IllegalArgumentException If {@link temporalClass} is not a 
supported {@link Temporal} subclass.
+     * @throws NullPointerException If {@code temporalClass} was {@code null}
+     * @throws IllegalArgumentException If {@code temporalClass} is not a 
supported {@link Temporal} subclass.
      *
      * @since 2.3.32
      */
@@ -1823,7 +1823,7 @@ public class Configurable {
      * Gets the custom date format factory registered for the name, or {@code 
null} if no format with the given name
      * was registered.
      *
-     * @name The name of the custom format; do not start it with {@code '@'}!
+     * @param name The name of the custom format; do not start it with {@code 
'@'}!
      * @return The format factory, or {@code null}
      * 
      * @since 2.3.24
@@ -1901,7 +1901,7 @@ public class Configurable {
      * Gets the custom temporal format factory registered for the name, or 
{@code null} if no format with the given name
      * was registered.
      *
-     * @name The name of the custom format; do not start it with {@code '@'}!
+     * @param name The name of the custom format; do not start it with {@code 
'@'}!
      * @return The format factory or, {@code null}
      *
      * @since 2.3.32
diff --git a/src/main/java/freemarker/core/TemplateTemporalFormat.java 
b/src/main/java/freemarker/core/TemplateTemporalFormat.java
index bf0602f..e864487 100644
--- a/src/main/java/freemarker/core/TemplateTemporalFormat.java
+++ b/src/main/java/freemarker/core/TemplateTemporalFormat.java
@@ -19,6 +19,7 @@
 package freemarker.core;
 
 import java.time.format.DateTimeFormatter;
+import java.time.temporal.Temporal;
 
 import freemarker.template.TemplateModelException;
 import freemarker.template.TemplateTemporalModel;
diff --git a/src/main/java/freemarker/ext/beans/BeansWrapper.java 
b/src/main/java/freemarker/ext/beans/BeansWrapper.java
index d654a63..6ae3ec9 100644
--- a/src/main/java/freemarker/ext/beans/BeansWrapper.java
+++ b/src/main/java/freemarker/ext/beans/BeansWrapper.java
@@ -956,7 +956,7 @@ public class BeansWrapper implements RichObjectWrapper, 
WriteProtectable {
      * <li>if the object is null, returns the {@link 
#setNullModel(TemplateModel) null model},</li>
      * <li>if the object is a Number returns a {@link NumberModel} for it,</li>
      * <li>if the object is a Date returns a {@link DateModel} for it,</li>
-     * <li>if the object is a java.time.Temporal returns a {@link 
TemporalModel} for it,</li>
+     * <li>if the object is a {@link Temporal} returns a {@link TemporalModel} 
for it,</li>
      * <li>if the object is a Boolean returns
      * {@link freemarker.template.TemplateBooleanModel#TRUE} or 
      * {@link freemarker.template.TemplateBooleanModel#FALSE}</li>
diff --git a/src/main/java/freemarker/template/Configuration.java 
b/src/main/java/freemarker/template/Configuration.java
index e6772d0..45f2c78 100644
--- a/src/main/java/freemarker/template/Configuration.java
+++ b/src/main/java/freemarker/template/Configuration.java
@@ -953,6 +953,7 @@ public class Configuration extends Configurable implements 
Cloneable, ParserConf
      *       {@link BeansWrapper} and {@link DefaultObjectWrapper} now wraps 
{@link Temporal}-s into
      *       {@link SimpleTemporal}. Before that, {@link Temporal}-s were 
treated as generic Java objects;
      *       see {@link BeansWrapper#BeansWrapper(Version)}.
+     *     </ul>
      *   </li>
      * </ul>
      * 
diff --git a/src/main/java/freemarker/template/TemplateTemporalModel.java 
b/src/main/java/freemarker/template/TemplateTemporalModel.java
index 1f2d6d6..7b642bf 100644
--- a/src/main/java/freemarker/template/TemplateTemporalModel.java
+++ b/src/main/java/freemarker/template/TemplateTemporalModel.java
@@ -18,13 +18,19 @@
  */
 package freemarker.template;
 
+import java.time.LocalDate;
 import java.time.LocalDateTime;
+import java.time.LocalTime;
+import java.time.OffsetDateTime;
+import java.time.OffsetTime;
+import java.time.Year;
 import java.time.YearMonth;
+import java.time.ZonedDateTime;
 import java.time.temporal.Temporal;
 
 /**
  * Any {@link Temporal} value that's included in Java; in Java 8 these are: 
{@link LocalDateTime}, {@link LocalDate},
- * {@link LocalTime}, {@link OffsetDateTime}, {@link OffsetTime}, {@link 
ZonedDateTime}, {@link ZonedTime},
+ * {@link LocalTime}, {@link OffsetDateTime}, {@link OffsetTime}, {@link 
ZonedDateTime},
  * {@link YearMonth}, {@link Year}.
  * This does not deal with {@link java.time.Duration}, and {@link 
java.time.Period}, because those don't implement the
  * {@link Temporal} interface.

Reply via email to