Switched Java to 21, fixed JavaDoc warnings.

This commit is contained in:
Konrad Neitzel
2025-12-14 14:31:34 +01:00
parent e47e30d602
commit e8ae777939
7 changed files with 74 additions and 3 deletions
@@ -24,6 +24,17 @@ import java.time.format.DateTimeParseException;
*/
public class InstantTypeAdapter implements JsonSerializer<Instant>, JsonDeserializer<Instant> {
/**
* Constructs a new {@code InstantTypeAdapter} instance.
* <p>
* This is a default, no-argument constructor for the {@link InstantTypeAdapter} class,
* which provides custom (de)serialization support for {@link Instant} objects in
* accordance with the ISO-8601 standard.
*/
public InstantTypeAdapter() {
// Default constructor
}
/**
* Serializes an {@link Instant} object into its ISO-8601 string representation as a {@link JsonElement}.
*
@@ -21,7 +21,6 @@ import java.util.Map;
*/
@Builder(builderClassName = "ConfigurationBuilder")
public class JsonConfiguration {
/**
* The name of the application.
* This variable is used to identify the application and is incorporated into various configurations,
@@ -67,6 +66,21 @@ public class JsonConfiguration {
*/
private final Gson gson;
/**
* Constructs a new {@code JsonConfiguration} instance with the specified parameters.
*
* @param appName the name of the application
* @param homeDir the home directory path for the application
* @param settings a map containing configuration settings as key-value pairs
* @param gson the Gson instance used for JSON serialization and deserialization
*/
public JsonConfiguration(String appName, String homeDir, Map<String, String> settings, Gson gson) {
this.appName = appName;
this.homeDir = homeDir;
this.settings = settings;
this.gson = gson;
}
/**
* Stores a key-value pair into the configuration settings.
* The value is serialized into a JSON string before being stored.
@@ -206,6 +220,18 @@ public class JsonConfiguration {
*/
private String homeDir = System.getProperty("user.home");
/**
* Default constructor for the {@code JsonConfigurationBuilder} class.
* Initializes a new instance of the {@code JsonConfigurationBuilder}.
* This constructor allows creation of a builder used for configuring
* {@code JsonConfiguration} instances, enabling the specification of
* application-specific settings such as the application name, home directory,
* and custom Gson adapters.
*/
public JsonConfigurationBuilder() {
// Default constructor
}
/**
* Sets the application name to be used in the configuration.
*