io.spine.tools
@@ -342,7 +342,7 @@ all modules and does not describe the project structure per-subproject.
org.jetbrains.kotlinx
kover-jvm-agent
- 0.9.8
+ 0.9.9
diff --git a/gradle-plugin/build.gradle.kts b/gradle-plugin/build.gradle.kts
index ade95b36b..bf4d1da57 100644
--- a/gradle-plugin/build.gradle.kts
+++ b/gradle-plugin/build.gradle.kts
@@ -97,7 +97,7 @@ afterEvaluate {
// The `io.spine.artifact-meta` attempts to add the dependency between
// `sourcesJar` and `writeArtifactMeta` tasks automatically.
// However, the `sourcesJar` task is added in the `afterEvaluate` block
- // which hanbdles the custom publishing above.
+ // that handles the custom publishing above.
// The above `publishing` block is executed after `ArtifactMetaPlugin` attempts to add
// the dependency in the `afterEvaluate` block the plugin adds itself.
// Therefore, we have to arrange the dependency manually below.
diff --git a/pom.xml b/pom.xml
deleted file mode 100644
index 501424618..000000000
--- a/pom.xml
+++ /dev/null
@@ -1,353 +0,0 @@
-
-
-4.0.0
-
-io.spine
-spine-time
-2.0.0-SNAPSHOT.240
-
-2015
-
-
-
- Apache License, Version 2.0
- https://www.apache.org/licenses/LICENSE-2.0.txt
- repo
-
-
-
-
-
- com.google.guava
- guava
- 33.5.0-jre
- compile
-
-
- com.google.protobuf
- protobuf-java
- 4.34.1
- compile
-
-
- com.google.protobuf
- protobuf-java-util
- 4.34.1
- compile
-
-
- com.google.protobuf
- protobuf-kotlin
- 4.34.1
- compile
-
-
- io.spine
- spine-base
- 2.0.0-SNAPSHOT.387
- compile
-
-
- io.spine
- spine-time
- 2.0.0-SNAPSHOT.238
- compile
-
-
- io.spine
- spine-validation-jvm-runtime
- 2.0.0-SNAPSHOT.414
- compile
-
-
- io.spine.tools
- compiler-gradle-api
- 2.0.0-SNAPSHOT.043
- compile
-
-
- io.spine.tools
- compiler-jvm
- 2.0.0-SNAPSHOT.043
- compile
-
-
- io.spine.tools
- gradle-plugin-api
- 2.0.0-SNAPSHOT.378
- compile
-
-
- io.spine.tools
- jvm-tools
- 2.0.0-SNAPSHOT.378
- compile
-
-
- org.jetbrains.kotlin
- kotlin-bom
- 2.3.20
- compile
-
-
- org.jetbrains.kotlin
- kotlin-stdlib
- 2.3.20
- compile
-
-
- org.jetbrains.kotlinx
- kotlinx-coroutines-bom
- 1.10.2
- compile
-
-
- org.jetbrains.kotlinx
- kotlinx-datetime
- 0.7.1
- compile
-
-
- org.jspecify
- jspecify
- 1.0.0
- compile
-
-
- com.google.guava
- guava-testlib
- 33.5.0-jre
- test
-
-
- io.kotest
- kotest-assertions-core
- 6.1.11
- test
-
-
- io.spine.tools
- base-testlib
- 2.0.0-SNAPSHOT.213
- test
-
-
- io.spine.tools
- compiler-testlib
- 2.0.0-SNAPSHOT.043
- test
-
-
- io.spine.tools
- logging-testlib
- 2.0.0-SNAPSHOT.417
- test
-
-
- org.junit
- junit-bom
- 6.0.3
- test
-
-
- org.junit-pioneer
- junit-pioneer
- 2.3.0
- test
-
-
- org.junit.jupiter
- junit-jupiter-api
- 6.0.3
- test
-
-
- org.junit.jupiter
- junit-jupiter-engine
- 6.0.3
- test
-
-
- org.junit.jupiter
- junit-jupiter-params
- 6.0.3
- test
-
-
- com.google.auto.service
- auto-service-annotations
- 1.1.1
- provided
-
-
- com.google.devtools.ksp
- symbol-processing
- 2.3.6
-
-
- com.google.devtools.ksp
- symbol-processing-api
- 2.3.6
-
-
- com.google.errorprone
- error_prone_annotations
- 2.36.0
- provided
-
-
- com.google.errorprone
- error_prone_core
- 2.36.0
-
-
- com.google.errorprone
- error_prone_type_annotations
- 2.36.0
- provided
-
-
- com.google.protobuf
- protoc
- 4.34.1
-
-
- com.puppycrawl.tools
- checkstyle
- 10.12.1
-
-
- dev.zacsweers.autoservice
- auto-service-ksp
- 1.2.0
-
-
- io.gitlab.arturbosch.detekt
- detekt-cli
- 1.23.8
-
-
- io.spine.tools
- compiler-cli-all
- 2.0.0-SNAPSHOT.043
-
-
- io.spine.tools
- compiler-protoc-plugin
- 2.0.0-SNAPSHOT.043
-
-
- io.spine.tools
- core-jvm-plugins
- 2.0.0-SNAPSHOT.063
-
-
- io.spine.tools
- prototap-protoc-plugin
- 0.14.0
-
-
- io.spine.tools
- spine-dokka-extensions
- 2.0.0-SNAPSHOT.7
-
-
- io.spine.tools
- time-validation
- 2.0.0-SNAPSHOT.236
-
-
- io.spine.tools
- validation-java-bundle
- 2.0.0-SNAPSHOT.414
-
-
- net.sourceforge.pmd
- pmd-ant
- 7.12.0
-
-
- net.sourceforge.pmd
- pmd-java
- 7.12.0
-
-
- org.checkerframework
- checker-qual
- 3.40.0
- provided
-
-
- org.jacoco
- org.jacoco.agent
- 0.8.13
-
-
- org.jacoco
- org.jacoco.ant
- 0.8.13
-
-
- org.jacoco
- org.jacoco.report
- 0.8.13
-
-
- org.jetbrains.dokka
- all-modules-page-plugin
- 2.2.0
-
-
- org.jetbrains.dokka
- analysis-kotlin-symbols
- 2.2.0
-
-
- org.jetbrains.dokka
- dokka-base
- 2.2.0
-
-
- org.jetbrains.dokka
- dokka-core
- 2.2.0
-
-
- org.jetbrains.dokka
- javadoc-plugin
- 2.2.0
-
-
- org.jetbrains.dokka
- templating-plugin
- 2.2.0
-
-
- org.jetbrains.kotlin
- kotlin-build-tools-compat
- 2.3.20
-
-
- org.jetbrains.kotlin
- kotlin-build-tools-impl
- 2.3.20
-
-
- org.jetbrains.kotlin
- kotlin-scripting-compiler-embeddable
- 2.3.20
-
-
- org.jetbrains.kotlinx
- kover-jvm-agent
- 0.9.1
-
-
-
-
\ No newline at end of file
diff --git a/testlib/src/main/java/io/spine/testing/time/Future.java b/testlib/src/main/java/io/spine/testing/time/Future.java
index 32eb23aac..3f86d1431 100644
--- a/testlib/src/main/java/io/spine/testing/time/Future.java
+++ b/testlib/src/main/java/io/spine/testing/time/Future.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2025, TeamDev. All rights reserved.
+ * Copyright 2026, TeamDev. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -39,7 +39,7 @@
import static io.spine.util.Preconditions2.checkPositive;
/**
- * Utility class for working with timestamps of the the future.
+ * Utility class for working with timestamps of the future.
*/
@VisibleForTesting
public final class Future {
@@ -51,11 +51,11 @@ private Future() {
}
/**
- * Obtains timestamp in the future a number of seconds from current time.
+ * Obtains a timestamp in the future a number of seconds from current time.
*
* @param seconds
* a positive number of seconds
- * @return the moment which is {@code seconds} from now
+ * @return the moment that is {@code seconds} from now
*/
public static Timestamp secondsFromNow(long seconds) {
checkPositive(seconds);
@@ -70,7 +70,7 @@ public static Timestamp secondsFromNow(long seconds) {
*/
public static boolean isFuture(Timestamp timestamp) {
checkNotNull(timestamp);
- // Do not use `currentTime()` as we may use custom `TimestampProvider` already.
+ // Do not use `currentTime()` as we may use a custom `TimestampProvider` already.
// Get time from metal.
var currentSystemTime = systemTime();
diff --git a/testlib/src/main/java/io/spine/testing/time/Past.java b/testlib/src/main/java/io/spine/testing/time/Past.java
index da355c6b0..52b937d20 100644
--- a/testlib/src/main/java/io/spine/testing/time/Past.java
+++ b/testlib/src/main/java/io/spine/testing/time/Past.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2025, TeamDev. All rights reserved.
+ * Copyright 2026, TeamDev. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -63,7 +63,7 @@ public static Timestamp minutesAgo(int value) {
}
/**
- * Obtains timestamp in the past a number of seconds ago.
+ * Obtains a timestamp in the past a number of seconds ago.
*
* @param value
* a positive number of seconds
diff --git a/testlib/src/main/java/io/spine/testing/time/TimeTests.java b/testlib/src/main/java/io/spine/testing/time/TimeTests.java
index 9aab6a9e5..f0b7dd58a 100644
--- a/testlib/src/main/java/io/spine/testing/time/TimeTests.java
+++ b/testlib/src/main/java/io/spine/testing/time/TimeTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2025, TeamDev. All rights reserved.
+ * Copyright 2026, TeamDev. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -57,7 +57,7 @@ public static long currentTimeSeconds() {
}
/**
- * Waits till new day to come, if it's the last day second.
+ * Waits till a new day to come, if it's the last day second.
*
* This method is useful for tests that obtain current date/time values
* and need to avoid the day edge for correctness of the test values.
diff --git a/tests/build.gradle.kts b/tests/build.gradle.kts
index 5d5f12949..d0c5d2d7b 100644
--- a/tests/build.gradle.kts
+++ b/tests/build.gradle.kts
@@ -64,6 +64,7 @@ buildscript {
val rs = this@resolutionStrategy
jackson.forceArtifacts(project, cfg, rs)
io.spine.dependency.lib.Jackson.DataType.forceArtifacts(project, cfg, rs)
+ io.spine.dependency.lib.Jackson.DataFormat.forceArtifacts(project, cfg, rs)
io.spine.dependency.kotlinx.Coroutines.forceArtifacts(
project, this@all, this@resolutionStrategy
@@ -74,6 +75,7 @@ buildscript {
force(
io.spine.dependency.lib.Kotlin.bom,
io.spine.dependency.lib.Jackson.annotations,
+ io.spine.dependency.lib.Jackson.bom,
io.spine.dependency.lib.Grpc.bom,
io.spine.dependency.local.Base.annotations,
io.spine.dependency.local.Base.environment,
@@ -134,6 +136,7 @@ configurations {
force(
Kotlin.bom,
Jackson.annotations,
+ Jackson.bom,
Grpc.bom,
Reflect.lib,
Base.annotations,
diff --git a/tests/src/test/java/io/spine/time/validation/given/WhenTestEnv.java b/tests/src/test/java/io/spine/time/validation/given/WhenTestEnv.java
index 329e410e0..5fc92dfb5 100644
--- a/tests/src/test/java/io/spine/time/validation/given/WhenTestEnv.java
+++ b/tests/src/test/java/io/spine/time/validation/given/WhenTestEnv.java
@@ -49,7 +49,7 @@ private WhenTestEnv() {
private static final int SECONDS_IN_5_MINUTES = 5 * SECONDS_IN_MINUTE;
/**
- * Freezes time for current thread by setting the time provider to a
+ * Freezes time for the current thread by setting the time provider to a
* {@link ConstantTimeProvider}.
*
* @param time
diff --git a/tests/src/test/kotlin/io/spine/tools/time/validation/java/Fixtures.kt b/tests/src/test/kotlin/io/spine/tools/time/validation/java/Fixtures.kt
index c6b304dfb..c9ee2ed75 100644
--- a/tests/src/test/kotlin/io/spine/tools/time/validation/java/Fixtures.kt
+++ b/tests/src/test/kotlin/io/spine/tools/time/validation/java/Fixtures.kt
@@ -45,7 +45,7 @@ import java.time.ZoneOffset.UTC
* 1. The generated code uses `io.spine.base.Time.currentTime()` to get the current timestamp
* for comparison. In turn, this method relies on `io.spine.base.Time.SystemTimeProvider`
* by default, which has millisecond precision.
- * 2. Adding too small amount of time to make the stamp denote "future" might be unreliable.
+ * 2. Adding too small an amount of time to make the stamp denote "future" might be unreliable.
* As it could catch up `now` by the time `Time.currentTime()` is invoked.
*/
private const val HALF_OF_SECOND: Long = 500
diff --git a/time/src/main/java/io/spine/time/AbstractConverter.java b/time/src/main/java/io/spine/time/AbstractConverter.java
index 4968a07fe..d95d63e07 100644
--- a/time/src/main/java/io/spine/time/AbstractConverter.java
+++ b/time/src/main/java/io/spine/time/AbstractConverter.java
@@ -1,11 +1,11 @@
/*
- * Copyright 2022, TeamDev. All rights reserved.
+ * Copyright 2026, TeamDev. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * https://www.apache.org/licenses/LICENSE-2.0
*
* Redistribution and use in source and/or binary forms, with or without
* modification, must retain the above copyright notice and the following
@@ -49,7 +49,7 @@ protected AbstractConverter(String identity) {
}
/**
- * Returns converter identity.
+ * Returns the converter identity.
*/
@Override
public String toString() {
diff --git a/time/src/main/java/io/spine/time/DaysOfWeek.java b/time/src/main/java/io/spine/time/DaysOfWeek.java
index 0abe19725..5c76e1f1b 100644
--- a/time/src/main/java/io/spine/time/DaysOfWeek.java
+++ b/time/src/main/java/io/spine/time/DaysOfWeek.java
@@ -64,7 +64,7 @@ private static void checkDay(int day) {
}
/**
- * Converts the passed instance to Java Time value.
+ * Converts the passed instance to the Java Time value.
*
*
The passed value must be a defined day. {@link DayOfWeek#DOW_UNDEFINED}
* (the default enum value) does not correspond to any {@link java.time.DayOfWeek}
@@ -83,7 +83,7 @@ public static java.time.DayOfWeek toJavaTime(DayOfWeek day) {
/**
* Obtains string representation of the passed day of week.
*
- *
Returned string is an internal representation, and should not be used
+ *
The returned string is an internal representation, and should not be used
* in the user interface.
*
*
For displaying a day of week, please use
diff --git a/time/src/main/java/io/spine/time/DtPreconditions.java b/time/src/main/java/io/spine/time/DtPreconditions.java
index d484630fc..f14a3f928 100644
--- a/time/src/main/java/io/spine/time/DtPreconditions.java
+++ b/time/src/main/java/io/spine/time/DtPreconditions.java
@@ -40,7 +40,7 @@
*/
final class DtPreconditions {
- /** Prevent instantiation of this utility class. */
+ /** Prevents instantiation of this utility class. */
private DtPreconditions() {
}
diff --git a/time/src/main/java/io/spine/time/LocalDateTimes.java b/time/src/main/java/io/spine/time/LocalDateTimes.java
index a74dae7cc..4952e4200 100644
--- a/time/src/main/java/io/spine/time/LocalDateTimes.java
+++ b/time/src/main/java/io/spine/time/LocalDateTimes.java
@@ -1,11 +1,11 @@
/*
- * Copyright 2022, TeamDev. All rights reserved.
+ * Copyright 2026, TeamDev. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * https://www.apache.org/licenses/LICENSE-2.0
*
* Redistribution and use in source and/or binary forms, with or without
* modification, must retain the above copyright notice and the following
@@ -83,14 +83,14 @@ public static java.time.LocalDateTime toJavaTime(LocalDateTime value) {
}
/**
- * Obtains converter from Java Time.
+ * Obtains the converter from Java Time.
*/
public static SerializableConverter converter() {
return JtConverter.INSTANCE;
}
/**
- * Parses the date-time value from ISO-8601 format string.
+ * Parses the date-time value from an ISO-8601 format string.
*
* @see #toString(LocalDateTime)
*/
@@ -101,7 +101,7 @@ public static LocalDateTime parse(String str) {
}
/**
- * Converts a local date-time value into ISO-8601 format string.
+ * Converts a local date-time value into an ISO-8601 format string.
*
* @see #parse(String)
*/
diff --git a/time/src/main/java/io/spine/time/LocalDates.java b/time/src/main/java/io/spine/time/LocalDates.java
index faaf85ba8..b31c23078 100644
--- a/time/src/main/java/io/spine/time/LocalDates.java
+++ b/time/src/main/java/io/spine/time/LocalDates.java
@@ -48,7 +48,7 @@
*/
public final class LocalDates {
- /** Prevent instantiation of this utility class. */
+ /** Prevents instantiation of this utility class. */
private LocalDates() {
}
@@ -96,7 +96,7 @@ public static LocalDate of(int year, Month month, int day) {
}
/**
- * Parse from ISO-8601 date representation of the format {@code yyyy-MM-dd}.
+ * Parses from an ISO-8601 date representation of the format {@code yyyy-MM-dd}.
*
* @see #toString(LocalDate)
*/
@@ -111,7 +111,7 @@ private static Stringifier stringifier() {
}
/**
- * Converts a local date into ISO-8601 string with the format {@code yyyy-MM-dd}.
+ * Converts a local date into an ISO-8601 string with the format {@code yyyy-MM-dd}.
*
* @see #parse(String)
*/
@@ -122,7 +122,7 @@ public static String toString(LocalDate date) {
}
/**
- * Verified fields of the passed local date instance.
+ * Verifies fields of the passed local date instance.
*
* @param date
* the date to check
@@ -141,8 +141,9 @@ static void checkDate(LocalDate date) {
*
* - the year is within the {@linkplain java.time.Year#MIN_VALUE min}/
* {@linkplain java.time.Year#MAX_VALUE max} range,
- *
- the month is not in the range of {@code JANUARY} to {@code DECEMBER},
- *
- the day is less or equal zero or greater than can be in the month.
+ *
- the month is in the range of {@code JANUARY} to {@code DECEMBER},
+ *
- the day is greater than zero and does not exceed the number of days
+ * in the given month.
*
*
* @throws IllegalArgumentException
@@ -170,7 +171,7 @@ private static void checkDate(int year, Month month, int day) {
}
/**
- * Obtains Java Time converter instance.
+ * Obtains the Java Time converter instance.
*/
public static SerializableConverter converter() {
return JtConverter.INSTANCE;
diff --git a/time/src/main/java/io/spine/time/LocalTimes.java b/time/src/main/java/io/spine/time/LocalTimes.java
index eaba17dce..efeb75b55 100644
--- a/time/src/main/java/io/spine/time/LocalTimes.java
+++ b/time/src/main/java/io/spine/time/LocalTimes.java
@@ -1,11 +1,11 @@
/*
- * Copyright 2022, TeamDev. All rights reserved.
+ * Copyright 2026, TeamDev. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * https://www.apache.org/licenses/LICENSE-2.0
*
* Redistribution and use in source and/or binary forms, with or without
* modification, must retain the above copyright notice and the following
@@ -23,6 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+
package io.spine.time;
import io.spine.string.Stringifier;
@@ -39,7 +40,7 @@
*/
public final class LocalTimes {
- /** Prevent instantiation of this utility class. */
+ /** Prevents instantiation of this utility class. */
private LocalTimes() {
}
@@ -66,7 +67,7 @@ public static LocalTime of(java.time.LocalTime value) {
}
/**
- * Converts the passed value to corresponding Java Time instance.
+ * Converts the passed value to the corresponding Java Time instance.
*
* @deprecated please use {@link LocalTime#toJavaTime()}
*/
diff --git a/time/src/main/java/io/spine/time/Months.java b/time/src/main/java/io/spine/time/Months.java
index 25f8c62b1..f0053cc88 100644
--- a/time/src/main/java/io/spine/time/Months.java
+++ b/time/src/main/java/io/spine/time/Months.java
@@ -42,7 +42,7 @@
*/
public final class Months {
- /** Prevent instantiation of this utility class. */
+ /** Prevents instantiation of this utility class. */
private Months() {
}
@@ -108,7 +108,7 @@ public static SerializableConverter converter() {
/**
* Obtains string representation of the passed month.
*
- * Returned string is an internal representation, and should not be used in
+ *
The returned string is an internal representation, and should not be used in
* the user interface.
*
*
For displaying a month, please use
diff --git a/time/src/main/java/io/spine/time/Now.java b/time/src/main/java/io/spine/time/Now.java
index 8fdb31bbd..c3dc53daa 100644
--- a/time/src/main/java/io/spine/time/Now.java
+++ b/time/src/main/java/io/spine/time/Now.java
@@ -1,11 +1,11 @@
/*
- * Copyright 2022, TeamDev. All rights reserved.
+ * Copyright 2026, TeamDev. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * https://www.apache.org/licenses/LICENSE-2.0
*
* Redistribution and use in source and/or binary forms, with or without
* modification, must retain the above copyright notice and the following
@@ -173,7 +173,7 @@ public OffsetDateTime asOffsetDateTime() {
}
/**
- * Obtains the current time as an {@code ZonedDateTime}.
+ * Obtains the current time as a {@code ZonedDateTime}.
*/
public io.spine.time.ZonedDateTime asZonedDateTime() {
return ZonedDateTimes.of(now());
diff --git a/time/src/main/java/io/spine/time/OffsetDateTimes.java b/time/src/main/java/io/spine/time/OffsetDateTimes.java
index 75e6f5456..a0c2db659 100644
--- a/time/src/main/java/io/spine/time/OffsetDateTimes.java
+++ b/time/src/main/java/io/spine/time/OffsetDateTimes.java
@@ -58,7 +58,7 @@ public static OffsetDateTime of(LocalDate date, LocalTime time, ZoneOffset offse
}
/**
- * Creates new instance based on the passed Java Time value.
+ * Creates a new instance based on the passed Java Time value.
*/
public static OffsetDateTime of(java.time.OffsetDateTime value) {
checkNotNull(value);
@@ -91,7 +91,7 @@ public static java.time.OffsetDateTime toJavaTime(OffsetDateTime value) {
}
/**
- * Returns a ISO-8601 date/time string corresponding to the passed value.
+ * Returns an ISO-8601 date/time string corresponding to the passed value.
*
* @deprecated please use {@link java.time.OffsetDateTime#toString()} instead.
*/
@@ -103,7 +103,7 @@ public static String toString(OffsetDateTime value) {
}
/**
- * Parses from ISO-8601 date/time string to {@code OffsetDateTime}.
+ * Parses from an ISO-8601 date/time string to {@code OffsetDateTime}.
*
* @deprecated please use {@link java.time.OffsetDateTime#parse(CharSequence)} instead.
*/
@@ -116,7 +116,7 @@ public static OffsetDateTime parse(String value) {
}
/**
- * Obtains converter from Java Time and back.
+ * Obtains the converter from Java Time and back.
*/
public static SerializableConverter converter() {
return JtConverter.INSTANCE;
diff --git a/time/src/main/java/io/spine/time/OffsetTimes.java b/time/src/main/java/io/spine/time/OffsetTimes.java
index ac04bef1d..cab84f4eb 100644
--- a/time/src/main/java/io/spine/time/OffsetTimes.java
+++ b/time/src/main/java/io/spine/time/OffsetTimes.java
@@ -1,11 +1,11 @@
/*
- * Copyright 2022, TeamDev. All rights reserved.
+ * Copyright 2026, TeamDev. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * https://www.apache.org/licenses/LICENSE-2.0
*
* Redistribution and use in source and/or binary forms, with or without
* modification, must retain the above copyright notice and the following
@@ -23,6 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+
package io.spine.time;
import io.spine.time.string.TimeStringifiers;
@@ -41,7 +42,7 @@
@Deprecated
public final class OffsetTimes {
- /** Prevent instantiation of this utility class. */
+ /** Prevents instantiation of this utility class. */
private OffsetTimes() {
}
@@ -64,7 +65,7 @@ private static OffsetTime create(LocalTime time, ZoneOffset zoneOffset) {
}
/**
- * Creates a new instance by passed Java Time value.
+ * Creates a new instance by the passed Java Time value.
*/
public static OffsetTime of(java.time.OffsetTime value) {
checkNotNull(value);
@@ -73,7 +74,7 @@ public static OffsetTime of(java.time.OffsetTime value) {
}
/**
- * Coverts the passed value to Java Time instance.
+ * Converts the passed value to a Java Time instance.
*/
public static java.time.OffsetTime toJavaTime(OffsetTime value) {
checkNotNull(value);
@@ -83,7 +84,7 @@ public static java.time.OffsetTime toJavaTime(OffsetTime value) {
}
/**
- * Returns a ISO-8601 time string corresponding to the passed value.
+ * Returns an ISO-8601 time string corresponding to the passed value.
*
* @deprecated please use {@link java.time.OffsetTime#toString()} instead.
*/
@@ -95,7 +96,7 @@ public static String toString(OffsetTime value) {
}
/**
- * Parse from ISO-8601 string to {@code OffsetTime}.
+ * Parses from an ISO-8601 string to {@code OffsetTime}.
*
* @deprecated please use {@link java.time.OffsetTime#parse(CharSequence)} instead.
*/
@@ -108,7 +109,7 @@ public static OffsetTime parse(String str) {
}
/**
- * Obtains converter from Java Time.
+ * Obtains the converter from Java Time.
*/
public static SerializableConverter converter() {
return JtConverter.INSTANCE;
diff --git a/time/src/main/java/io/spine/time/Temporal.java b/time/src/main/java/io/spine/time/Temporal.java
index 34e83c619..6073584c1 100644
--- a/time/src/main/java/io/spine/time/Temporal.java
+++ b/time/src/main/java/io/spine/time/Temporal.java
@@ -1,11 +1,11 @@
/*
- * Copyright 2022, TeamDev. All rights reserved.
+ * Copyright 2026, TeamDev. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * https://www.apache.org/licenses/LICENSE-2.0
*
* Redistribution and use in source and/or binary forms, with or without
* modification, must retain the above copyright notice and the following
@@ -43,7 +43,7 @@
* The name of this interface is inspired by the {@link java.time.temporal.Temporal}.
*
*
Provides a {@linkplain #compareTo(Temporal) default implementation} for
- * comparison of two points in time. It is not supposed that concrete
+ * comparison of two points in time. It is not supposed that concrete
* {@code Temporal}s would override this comparison mechanism.
*
* @param
@@ -110,8 +110,8 @@ default Any toAny() {
* the value to compare to
* @return
* - an integer greater than 0 if point in time occurs later than the other;
- *
- an integer less than 0 if point in time occurs earlier than other;
- *
- and 0 of these points in time are identical.
+ *
- an integer less than 0 if point in time occurs earlier than the other;
+ *
- and 0 if these points in time are identical.
*
* @implNote Translates both temporal values into {@code Timestamp}s and compares them.
*/
@@ -145,7 +145,7 @@ default int compareTo(Timestamp other) {
}
/**
- * Checks if this point is time occurs earlier than the other one.
+ * Checks if this point in time occurs earlier than the other one.
*
* @deprecated please use {@link #isBefore(Temporal)}
*/
@@ -155,28 +155,28 @@ default boolean isEarlierThan(T other) {
}
/**
- * Checks if this point is time occurs earlier than the other one.
+ * Checks if this point in time occurs earlier than the other one.
*/
default boolean isBefore(T other) {
return compareTo(other) < 0;
}
/**
- * Checks if this point is time occurs earlier than the other one.
+ * Checks if this point in time occurs earlier than the other one.
*/
default boolean isBefore(Instant other) {
return compareTo(other) < 0;
}
/**
- * Checks if this point is time occurs earlier than the other one.
+ * Checks if this point in time occurs earlier than the other one.
*/
default boolean isBefore(Timestamp other) {
return compareTo(other) < 0;
}
/**
- * Checks if this point is time occurs earlier than the other one or they coincide.
+ * Checks if this point in time occurs earlier than the other one or they coincide.
*
* @deprecated please use {@link #isBeforeOrSameAs(Temporal)}.
*/
@@ -186,21 +186,21 @@ default boolean isEarlierOrSameAs(T other) {
}
/**
- * Checks if this point is time occurs earlier than the other one or they coincide.
+ * Checks if this point in time occurs earlier than the other one or they coincide.
*/
default boolean isBeforeOrSameAs(T other) {
return compareTo(other) <= 0;
}
/**
- * Checks if this point is time occurs earlier than the other one or they coincide.
+ * Checks if this point in time occurs earlier than the other one or they coincide.
*/
default boolean isBeforeOrSameAs(Instant other) {
return compareTo(other) <= 0;
}
/**
- * Checks if this point is time occurs earlier than the other one or they coincide.
+ * Checks if this point in time occurs earlier than the other one or they coincide.
*/
default boolean isBeforeOrSameAs(Timestamp other) {
return compareTo(other) <= 0;
@@ -228,7 +228,7 @@ default boolean isSameAs(Timestamp other) {
}
/**
- * Checks if this point is time occurs later than the other one.
+ * Checks if this point in time occurs later than the other one.
*
* @deprecated please use {@link #isAfter(Temporal)}.
*/
@@ -238,28 +238,28 @@ default boolean isLaterThan(T other) {
}
/**
- * Checks if this point is time occurs later than the other one.
+ * Checks if this point in time occurs later than the other one.
*/
default boolean isAfter(T other) {
return compareTo(other) > 0;
}
/**
- * Checks if this point is time occurs later than the other one.
+ * Checks if this point in time occurs later than the other one.
*/
default boolean isAfter(Instant other) {
return compareTo(other) > 0;
}
/**
- * Checks if this point is time occurs later than the other one.
+ * Checks if this point in time occurs later than the other one.
*/
default boolean isAfter(Timestamp other) {
return compareTo(other) > 0;
}
/**
- * Checks if this point is time occurs later than the other one or they coincide.
+ * Checks if this point in time occurs later than the other one or they coincide.
*
* @deprecated please use {@link #isAfterOrSameAs(Temporal)}.
*/
@@ -269,28 +269,28 @@ default boolean isLaterOrSameAs(T other) {
}
/**
- * Checks if this point is time occurs later than the other one or they coincide.
+ * Checks if this point in time occurs later than the other one or they coincide.
*/
default boolean isAfterOrSameAs(T other) {
return compareTo(other) >= 0;
}
/**
- * Checks if this point is time occurs later than the other one or they coincide.
+ * Checks if this point in time occurs later than the other one or they coincide.
*/
default boolean isAfterOrSameAs(Instant other) {
return compareTo(other) >= 0;
}
/**
- * Checks if this point is time occurs later than the other one or they coincide.
+ * Checks if this point in time occurs later than the other one or they coincide.
*/
default boolean isAfterOrSameAs(Timestamp other) {
return compareTo(other) >= 0;
}
/**
- * Checks if this point is time lies between the given.
+ * Checks if this point in time lies between the given.
*
* All three {@code Temporal}s must exactly the same runtime type. Otherwise,
* an {@code IllegalArgumentException} is thrown.
@@ -307,9 +307,8 @@ default boolean isBetween(T periodStart, T periodEnd) {
&& isBeforeOrSameAs(periodEnd);
}
-
/**
- * Checks if this point is time lies between the given.
+ * Checks if this point in time lies between the given.
*
* @param periodStart
* lower bound, exclusive
@@ -324,7 +323,7 @@ default boolean isBetween(Instant periodStart, Instant periodEnd) {
}
/**
- * Checks if this point is time lies between the given.
+ * Checks if this point in time lies between the given.
*
* @param periodStart
* lower bound, exclusive
@@ -343,7 +342,7 @@ default boolean isBetween(Timestamp periodStart, Timestamp periodEnd) {
*
*
Uses {@link Time#currentTime()} to determine the "current" time to compare to.
*
- * @return {@code true} if this point is time is later than the current time,
+ * @return {@code true} if this point in time is later than the current time,
* {@code false} otherwise
* @apiNote Note that a point in time is considered to be in the future only if its
* {@linkplain #toTimestamp() timestamp representation} is in the future.
@@ -359,7 +358,7 @@ default boolean isInFuture() {
*
*
Uses {@link Time#currentTime()} to determine the "current" time to compare to.
*
- * @return {@code true} if this point is time is earlier than the current time,
+ * @return {@code true} if this point in time is earlier than the current time,
* {@code false} otherwise
* @apiNote Note that a point in time is considered to be in the past only if its
* {@linkplain #toTimestamp() timestamp representation} is in the past. Thus, if a type
diff --git a/time/src/main/java/io/spine/time/TemporalMessage.java b/time/src/main/java/io/spine/time/TemporalMessage.java
index b00372149..597bca4d7 100644
--- a/time/src/main/java/io/spine/time/TemporalMessage.java
+++ b/time/src/main/java/io/spine/time/TemporalMessage.java
@@ -1,11 +1,11 @@
/*
- * Copyright 2022, TeamDev. All rights reserved.
+ * Copyright 2026, TeamDev. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * https://www.apache.org/licenses/LICENSE-2.0
*
* Redistribution and use in source and/or binary forms, with or without
* modification, must retain the above copyright notice and the following
@@ -45,7 +45,7 @@
*
mark the target message with the {@code (is)} option.
*
*
- * Interfaces derived from this one are meant to be implemented only by corresponding
+ *
Interfaces derived from this one are meant to be implemented only by the corresponding
* message type defined by the generic parameter {@code }. As such, they should not add any
* abstract methods because it would break the generated code.
*
diff --git a/time/src/main/java/io/spine/time/Temporals.java b/time/src/main/java/io/spine/time/Temporals.java
index e932ae0b5..eceaa434a 100644
--- a/time/src/main/java/io/spine/time/Temporals.java
+++ b/time/src/main/java/io/spine/time/Temporals.java
@@ -65,9 +65,8 @@ public static Temporal> from(Message value) {
checkNotNull(value);
if (value instanceof Temporal) {
return (Temporal>) value;
- } else if (value instanceof Timestamp) {
- var timestampValue = (Timestamp) value;
- return TimestampTemporal.from(timestampValue);
+ } else if (value instanceof Timestamp timestamp) {
+ return TimestampTemporal.from(timestamp);
} else {
throw newIllegalArgumentException(
"The type `%s` cannot represent a point in time.",
diff --git a/time/src/main/java/io/spine/time/TimeChanges.java b/time/src/main/java/io/spine/time/TimeChanges.java
index 9aa9077a5..a2dc65622 100644
--- a/time/src/main/java/io/spine/time/TimeChanges.java
+++ b/time/src/main/java/io/spine/time/TimeChanges.java
@@ -1,11 +1,11 @@
/*
- * Copyright 2022, TeamDev. All rights reserved.
+ * Copyright 2026, TeamDev. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * https://www.apache.org/licenses/LICENSE-2.0
*
* Redistribution and use in source and/or binary forms, with or without
* modification, must retain the above copyright notice and the following
@@ -39,7 +39,7 @@ private TimeChanges() {
}
/**
- * Creates {@link LocalDateChange} object for the passed previous and new field values of
+ * Creates a {@link LocalDateChange} object for the passed previous and new field values of
* local date.
*
* Passed values cannot be equal.
@@ -55,7 +55,7 @@ public static LocalDateChange of(LocalDate previousValue, LocalDate newValue) {
}
/**
- * Creates {@link LocalTimeChange} object for the passed previous and new field values of
+ * Creates a {@link LocalTimeChange} object for the passed previous and new field values of
* local time.
*
*
Passed values cannot be equal.
@@ -71,7 +71,7 @@ public static LocalTimeChange of(LocalTime previousValue, LocalTime newValue) {
}
/**
- * Creates {@link OffsetTimeChange} object for the passed previous and new field values of
+ * Creates an {@link OffsetTimeChange} object for the passed previous and new field values of
* offset time.
*
*
Passed values cannot be equal.
@@ -90,8 +90,8 @@ public static OffsetTimeChange of(OffsetTime previousValue, OffsetTime newValue)
}
/**
- * Creates {@link OffsetDateTimeChange} object for the passed previous and new field values of
- * offset time.
+ * Creates an {@link OffsetDateTimeChange} object for the passed previous and new field values
+ * of offset date-time.
*
*
Passed values cannot be equal.
*
diff --git a/time/src/main/java/io/spine/time/TimestampTemporal.java b/time/src/main/java/io/spine/time/TimestampTemporal.java
index 86351f112..a0e29c611 100644
--- a/time/src/main/java/io/spine/time/TimestampTemporal.java
+++ b/time/src/main/java/io/spine/time/TimestampTemporal.java
@@ -1,11 +1,11 @@
/*
- * Copyright 2022, TeamDev. All rights reserved.
+ * Copyright 2026, TeamDev. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * https://www.apache.org/licenses/LICENSE-2.0
*
* Redistribution and use in source and/or binary forms, with or without
* modification, must retain the above copyright notice and the following
@@ -53,7 +53,7 @@ private TimestampTemporal(Timestamp value) {
* Creates a new instance with the given {@code Timestamp}.
*
*
The given value must be valid in terms of {@code Timestamps.checkValid(..)}. Otherwise,
- * as {@code IllegalStateException} is thrown.
+ * an {@code IllegalStateException} is thrown.
*/
public static TimestampTemporal from(Timestamp value) {
checkNotNull(value);
diff --git a/time/src/main/java/io/spine/time/YearMonths.java b/time/src/main/java/io/spine/time/YearMonths.java
index 5ec2bfb4d..76dd3cd76 100644
--- a/time/src/main/java/io/spine/time/YearMonths.java
+++ b/time/src/main/java/io/spine/time/YearMonths.java
@@ -45,7 +45,7 @@ private YearMonths() {
}
/**
- * Creates an instance with the the passed year and month.
+ * Creates an instance with the passed year and month.
*/
public static YearMonth of(int year, int month) {
return create(year, month);
@@ -105,7 +105,7 @@ public static YearMonth parse(String str) {
}
/**
- * Converts the passed value into a ISO-8601 year-month string, such as {@code "2018-06"}.
+ * Converts the passed value into an ISO-8601 year-month string, such as {@code "2018-06"}.
*
* @see #parse(String)
*/
diff --git a/time/src/main/java/io/spine/time/ZoneOffsets.java b/time/src/main/java/io/spine/time/ZoneOffsets.java
index ee90beeb9..40ae15ba0 100644
--- a/time/src/main/java/io/spine/time/ZoneOffsets.java
+++ b/time/src/main/java/io/spine/time/ZoneOffsets.java
@@ -56,7 +56,7 @@ public final class ZoneOffsets {
.setAmountSeconds(0)
.build();
- /** Prevent instantiation of this utility class. */
+ /** Prevents instantiation of this utility class. */
private ZoneOffsets() {
}
@@ -68,7 +68,7 @@ public static ZoneOffset utc() {
}
/**
- * Obtains a {@code ZoneOffset} instance using default {@code TimeZone} of the Java
+ * Obtains a {@code ZoneOffset} instance using the default {@code TimeZone} of the Java
* virtual machine.
*
* @see TimeZone#getDefault()
@@ -111,7 +111,7 @@ public static ZoneOffset ofHours(int hours) {
/**
* Obtains the ZoneOffset for the passed number of seconds.
*
- *
If zero is passed {@link #utc()} instance is returned.
+ *
If zero is passed, {@link #utc()} instance is returned.
*
* @param seconds
* a positive, zero
@@ -124,7 +124,7 @@ public static ZoneOffset ofSeconds(int seconds) {
/**
* Obtains the ZoneOffset instance using an offset in hours and minutes.
*
- *
If a negative zone offset is created both passed values must be negative.
+ *
If a negative zone offset is created, both passed values must be negative.
*/
public static ZoneOffset ofHoursMinutes(int hours, int minutes) {
Parameter.HOURS.checkReduced(hours);
@@ -181,7 +181,7 @@ private static ZoneOffset create(int offsetInSeconds, @Nullable String zoneId) {
}
/**
- * Obtains converter from Java Time and back.
+ * Obtains the converter from Java Time and back.
*/
public static SerializableConverter converter() {
return JtConverter.INSTANCE;
@@ -217,7 +217,7 @@ void check(int value) {
}
/**
- * Always throws exception since minute offset parameters do not support
+ * Always throws an exception since minute offset parameters do not support
* reduced check.
*/
@Override
diff --git a/time/src/main/java/io/spine/time/ZonedDateTimes.java b/time/src/main/java/io/spine/time/ZonedDateTimes.java
index 1619d5ca5..23b8d2949 100644
--- a/time/src/main/java/io/spine/time/ZonedDateTimes.java
+++ b/time/src/main/java/io/spine/time/ZonedDateTimes.java
@@ -87,7 +87,7 @@ public static java.time.ZonedDateTime toJavaTime(ZonedDateTime value) {
}
/**
- * Converts the passed value to ISO-8601 zoned date/time string.
+ * Converts the passed value to an ISO-8601 zoned date/time string.
*/
public static String toString(ZonedDateTime value) {
checkNotNull(value);
@@ -106,7 +106,7 @@ public static ZonedDateTime parse(String str) {
}
/**
- * Obtains converter from Java Time and back.
+ * Obtains the converter from Java Time and back.
*/
public static SerializableConverter converter() {
return JtConverter.INSTANCE;
diff --git a/time/src/main/java/io/spine/time/string/JtStringifier.java b/time/src/main/java/io/spine/time/string/JtStringifier.java
index 0b496b264..ab0f7ce24 100644
--- a/time/src/main/java/io/spine/time/string/JtStringifier.java
+++ b/time/src/main/java/io/spine/time/string/JtStringifier.java
@@ -1,11 +1,11 @@
/*
- * Copyright 2022, TeamDev. All rights reserved.
+ * Copyright 2026, TeamDev. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * https://www.apache.org/licenses/LICENSE-2.0
*
* Redistribution and use in source and/or binary forms, with or without
* modification, must retain the above copyright notice and the following
@@ -37,12 +37,12 @@
import static java.util.Objects.requireNonNull;
/**
- * An abstract base for stringifier that use Java Time types for conversion to string and parsing.
+ * An abstract base for stringifiers that use Java Time types for conversion to string and parsing.
*
* @param
* the type to stringify
* @param
- * the Java Time type which corresponds to type {@code T}
+ * the Java Time type that corresponds to type {@code T}
*/
abstract class JtStringifier extends SerializableStringifier {
diff --git a/time/src/main/java/io/spine/time/string/TimeStringifiers.java b/time/src/main/java/io/spine/time/string/TimeStringifiers.java
index f52ddfa7f..bb064ed93 100644
--- a/time/src/main/java/io/spine/time/string/TimeStringifiers.java
+++ b/time/src/main/java/io/spine/time/string/TimeStringifiers.java
@@ -1,11 +1,11 @@
/*
- * Copyright 2022, TeamDev. All rights reserved.
+ * Copyright 2026, TeamDev. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * https://www.apache.org/licenses/LICENSE-2.0
*
* Redistribution and use in source and/or binary forms, with or without
* modification, must retain the above copyright notice and the following
@@ -59,12 +59,12 @@ public final class TimeStringifiers {
);
}
- /** Prevent instantiation of this utility class. */
+ /** Prevents instantiation of this utility class. */
private TimeStringifiers() {
}
/**
- * Obtains default stringifier for {@code DayOfWeek}s.
+ * Obtains the default stringifier for {@code DayOfWeek}s.
*
* This stringifier is automatically registered in the
* {@link StringifierRegistry StringifierRegistry}.
@@ -76,7 +76,8 @@ public static Stringifier forDayOfWeek() {
/**
* Obtains a stringifier for IDs based on {@code Timestamp}s.
*
- * The stringifier replaces colons in time part of a string representation of a timestamp.
+ *
The stringifier replaces colons in the time part of a string representation
+ * of a timestamp.
*
*
For example, the following string:
*
@@ -94,7 +95,7 @@ public static Stringifier forTimestampWebSafe() {
}
/**
- * Obtains default stringifier for local dates.
+ * Obtains the default stringifier for local dates.
*
* The stringifier uses {@code yyyy-MM-dd} format for dates.
*
@@ -109,7 +110,7 @@ public static Stringifier forLocalDate() {
}
/**
- * Obtains default stringifier for local date-time values in ISO-8601 formats.
+ * Obtains the default stringifier for local date-time values in ISO-8601 formats.
*
* This stringifier is automatically registered in the
* {@link StringifierRegistry StringifierRegistry}.
@@ -123,7 +124,7 @@ public static Stringifier forLocalDateTime() {
return LocalDateTimeStringifier.instance();
}
/**
- * Obtains default stringifier for {@code LocalTime} values.
+ * Obtains the default stringifier for {@code LocalTime} values.
*
* This stringifier is automatically registered in the
* {@link StringifierRegistry StringifierRegistry}.
@@ -167,7 +168,7 @@ public static Stringifier forOffsetDateTime() {
}
/**
- * Obtains default stringifier for {@code OffsetTime} values.
+ * Obtains the default stringifier for {@code OffsetTime} values.
*
* This stringifier is automatically registered in the
* {@link StringifierRegistry StringifierRegistry}.
@@ -183,9 +184,8 @@ public static Stringifier forOffsetTime() {
return OffsetTimeStringifier.instance();
}
-
/**
- * Obtains default stringifier for {@code YearMonth} values.
+ * Obtains the default stringifier for {@code YearMonth} values.
*
* This stringifier is automatically registered in the
* {@link StringifierRegistry StringifierRegistry}.
@@ -198,7 +198,7 @@ public static Stringifier forYearMonth() {
}
/**
- * Obtains default stringifier for {@code ZoneId}s.
+ * Obtains the default stringifier for {@code ZoneId}s.
*
* This stringifier is automatically registered in the
* {@link StringifierRegistry StringifierRegistry}.
@@ -211,7 +211,7 @@ public static Stringifier forZoneId() {
}
/**
- * Obtains default stringifier for {@code ZonedDateTime}.
+ * Obtains the default stringifier for {@code ZonedDateTime}.
*
* This stringifier is automatically registered in the
* {@link StringifierRegistry StringifierRegistry}.
@@ -226,7 +226,7 @@ public static Stringifier forZonedDateTime() {
}
/**
- * Obtains default stringifier for {@code ZoneOffset}s.
+ * Obtains the default stringifier for {@code ZoneOffset}s.
*
* This stringifier is automatically registered in the
* {@link StringifierRegistry StringifierRegistry}.
diff --git a/time/src/main/java/io/spine/time/string/WebSafeTimestampStringifier.java b/time/src/main/java/io/spine/time/string/WebSafeTimestampStringifier.java
index bb0387b1a..309fd70d5 100644
--- a/time/src/main/java/io/spine/time/string/WebSafeTimestampStringifier.java
+++ b/time/src/main/java/io/spine/time/string/WebSafeTimestampStringifier.java
@@ -1,11 +1,11 @@
/*
- * Copyright 2022, TeamDev. All rights reserved.
+ * Copyright 2026, TeamDev. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * https://www.apache.org/licenses/LICENSE-2.0
*
* Redistribution and use in source and/or binary forms, with or without
* modification, must retain the above copyright notice and the following
@@ -40,7 +40,7 @@
/**
* The stringifier for web-safe representation of timestamps.
*
- *
The stringifier replaces colons in the time part of a a RFC 3339 date string
+ *
The stringifier replaces colons in the time part of an RFC 3339 date string
* with dashes when converting a timestamp to a string. It also restores the colons
* back during the backward conversion.
*/
diff --git a/time/src/main/kotlin/io/spine/time/DurationExts.kt b/time/src/main/kotlin/io/spine/time/DurationExts.kt
index ad2982299..1671bf1d4 100644
--- a/time/src/main/kotlin/io/spine/time/DurationExts.kt
+++ b/time/src/main/kotlin/io/spine/time/DurationExts.kt
@@ -49,7 +49,7 @@ import io.spine.protobuf.Durations2.isZero
/**
* Compares this duration with the passed one.
*
- * @return the value `0` if `x == y`}`; a value less than `0`}` if `x < y`;
+ * @return the value `0` if `x == y`; a value less than `0` if `x < y`;
* and a value greater than `0` if `x > y`.
*/
public operator fun Duration.compareTo(other: Duration): Int = compare(this, other)
@@ -76,19 +76,19 @@ public fun Duration.isNegative(): Boolean = isNegative(this)
/**
* Tells whether this duration is positive or not.
*
- * @returns `true` if the passed value is greater than zero, `false` otherwise.
+ * @return `true` if this duration is greater than zero, `false` otherwise.
*/
public fun Duration.isPositive(): Boolean = Durations.isPositive(this)
/**
* Tells whether this duration is not negative.
*
- * @returns `true` of the passed value is greater or equal zero, `false` otherwise.
+ * @return `true` if this duration is greater than or equal to zero, `false` otherwise.
*/
public fun Duration.isPositiveOrZero(): Boolean = isPositiveOrZero(this)
/**
- * Returns `true` if the passed value is zero, `false` otherwise.
+ * Returns `true` if this duration is zero, `false` otherwise.
*
* @see Durations.ZERO
*/
@@ -116,7 +116,7 @@ public fun Duration.print(): String = toString(this)
public fun Duration.toDays(): Long = toDays(this)
/**
- * Convert this duration to the number of hours.
+ * Converts this duration to the number of hours.
*
* @return the number of hours rounded towards 0 to the nearest hour.
*/
@@ -138,7 +138,7 @@ public fun Duration.toMinutes(): Long = toMinutes(this)
public fun Duration.toSeconds(): Long = toSeconds(this)
/**
- * Convert this duration to the number of milliseconds.
+ * Converts this duration to the number of milliseconds.
*
* @return the number of milliseconds rounded towards 0 to the nearest millisecond.
* E.g., if the duration represents -1 nanosecond, it will be rounded to 0.
diff --git a/time/src/main/kotlin/io/spine/time/TimestampExts.kt b/time/src/main/kotlin/io/spine/time/TimestampExts.kt
index 55d00fd25..684612d84 100644
--- a/time/src/main/kotlin/io/spine/time/TimestampExts.kt
+++ b/time/src/main/kotlin/io/spine/time/TimestampExts.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2022, TeamDev. All rights reserved.
+ * Copyright 2026, TeamDev. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * https://www.apache.org/licenses/LICENSE-2.0
*
* Redistribution and use in source and/or binary forms, with or without
* modification, must retain the above copyright notice and the following
@@ -62,7 +62,7 @@ public fun Timestamp.isBefore(other: Timestamp): Boolean = this < other
public fun Timestamp.isAfter(other: Timestamp): Boolean = this > other
/**
- * Checks if this point is time lies between the given.
+ * Checks if this point in time lies between the given.
*
* @param periodStart
* lower bound, exclusive
diff --git a/time/src/main/kotlin/io/spine/time/validation/LocalDateValidator.kt b/time/src/main/kotlin/io/spine/time/validation/LocalDateValidator.kt
index ae3e6a5dc..3000c3f6a 100644
--- a/time/src/main/kotlin/io/spine/time/validation/LocalDateValidator.kt
+++ b/time/src/main/kotlin/io/spine/time/validation/LocalDateValidator.kt
@@ -62,7 +62,7 @@ public class LocalDateValidator : MessageValidator {
}
if (year < Year.MIN_VALUE || year > Year.MAX_VALUE) {
- // This is a safety net for the `YearMonth.of()` call which fails
+ // This is a safety net for the `YearMonth.of()` call that fails
// when the year is out of range defined by Java Time.
// We return an empty list because we have an option-based constraint
// on the `year` field for these values, and validation will fail in the generated code.
diff --git a/time/src/main/proto/spine/time/time.proto b/time/src/main/proto/spine/time/time.proto
index 17c7bd157..4d2d6e034 100644
--- a/time/src/main/proto/spine/time/time.proto
+++ b/time/src/main/proto/spine/time/time.proto
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2026, TeamDev. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * https://www.apache.org/licenses/LICENSE-2.0
*
* Redistribution and use in source and/or binary forms, with or without
* modification, must retain the above copyright notice and the following
@@ -107,7 +107,7 @@ message LocalDate {
// One of 12 Gregorian calendar months specified by `Month`.
Month month = 2 [(required) = true];
- // A day which must be from 1 to 31 and valid for the year and month.
+ // A day that must be from 1 to 31 and valid for the year and month.
//
// In generated code for Kotlin/Java this is checked by
// `io.spine.time.validation.LocalDateValidator`.
@@ -184,7 +184,7 @@ message OffsetTime {
// A date-time with an offset from UTC.
message OffsetDateTime {
- // Usage history shown that this type cause much confusion.
+ // Usage history has shown that this type causes much confusion.
// Please use [ZonedDateTime] instead.
option deprecated = true;
diff --git a/time/src/main/proto/spine/time/time_change.proto b/time/src/main/proto/spine/time/time_change.proto
index f041d5b12..93822be31 100644
--- a/time/src/main/proto/spine/time/time_change.proto
+++ b/time/src/main/proto/spine/time/time_change.proto
@@ -1,11 +1,11 @@
/*
- * Copyright 2022, TeamDev. All rights reserved.
+ * Copyright 2026, TeamDev. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * https://www.apache.org/licenses/LICENSE-2.0
*
* Redistribution and use in source and/or binary forms, with or without
* modification, must retain the above copyright notice and the following
@@ -54,7 +54,7 @@ import "spine/time/time.proto";
// Definition of a change of `LocalDate` fields.
message LocalDateChange {
- // The value of the field that are changing.
+ // The value of the field that is changing.
LocalDate previous_value = 1;
// The new value of the field.
@@ -64,7 +64,7 @@ message LocalDateChange {
// Definition of a change of `LocalTime` fields.
message LocalTimeChange {
- // The value of the field that are changing.
+ // The value of the field that is changing.
LocalTime previous_value = 1;
// The new value of the field.
@@ -74,10 +74,10 @@ message LocalTimeChange {
// Definition of a change of `OffsetTime` fields.
message OffsetTimeChange {
- // Please use [ZonedTime] with custom a change type instead.
+ // Please use [ZonedTime] with a custom change type instead.
option deprecated = true;
- // The value of the field that are changing.
+ // The value of the field that is changing.
OffsetTime previous_value = 1;
// The new value of the field.
@@ -90,7 +90,7 @@ message OffsetDateTimeChange {
// Please use [ZonedDateTime] with a custom change type instead.
option deprecated = true;
- // The value of the field that are changing.
+ // The value of the field that is changing.
OffsetDateTime previous_value = 1;
// The new value of the field.
diff --git a/time/src/main/proto/spine/time_options.proto b/time/src/main/proto/spine/time_options.proto
index bc73fe15f..e069e871b 100644
--- a/time/src/main/proto/spine/time_options.proto
+++ b/time/src/main/proto/spine/time_options.proto
@@ -1,5 +1,5 @@
/*
- * Copyright 2025, TeamDev. All rights reserved.
+ * Copyright 2026, TeamDev. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -29,7 +29,7 @@ syntax = "proto3";
// API Note on Packaging
// ---------------------
// We do not define the package for this file to allow shorter options for user-defined types.
-// This allows to write:
+// This allows writing:
//
// [(when).in = FUTURE];
//
@@ -92,7 +92,7 @@ message TimeOption {
string error_msg = 3;
}
-// This enumeration defines restriction for date/time values.
+// This enumeration defines a restriction for date/time values.
enum Time {
// The default value (if the time option is not set).
diff --git a/time/src/test/java/io/spine/time/AbstractDateTimeUtilityTest.java b/time/src/test/java/io/spine/time/AbstractDateTimeUtilityTest.java
index f48858aeb..4e8b8bc32 100644
--- a/time/src/test/java/io/spine/time/AbstractDateTimeUtilityTest.java
+++ b/time/src/test/java/io/spine/time/AbstractDateTimeUtilityTest.java
@@ -1,11 +1,11 @@
/*
- * Copyright 2022, TeamDev. All rights reserved.
+ * Copyright 2026, TeamDev. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * https://www.apache.org/licenses/LICENSE-2.0
*
* Redistribution and use in source and/or binary forms, with or without
* modification, must retain the above copyright notice and the following
@@ -41,8 +41,8 @@
/**
* Abstract base for tests of date-time utility classes.
*
- * @param the type with which the utility class work
- * @param the Java Type which corresponds to the type {@code }
+ * @param the type with which the utility class works
+ * @param the Java Type that corresponds to the type {@code }
*/
abstract class AbstractDateTimeUtilityTest {
@@ -53,14 +53,14 @@ abstract class AbstractDateTimeUtilityTest {
private final Function parser;
/**
- * Creates new test suite.
+ * Creates a new test suite.
*
* @param utilityClass
* the utility class to test
* @param current
* the supplier value of the data type at the current time or location
* (e.g. for {@code ZoneOffset} or {@code ZoneId}).
- * It could be method reference of the utility class, or another supplier
+ * It could be a method reference of the utility class, or another supplier
* for such values if they are available elsewhere.
* @param strOut
* a reference to a string output method
diff --git a/time/src/test/java/io/spine/time/AbstractOffsetTimeTest.java b/time/src/test/java/io/spine/time/AbstractOffsetTimeTest.java
index d16f71215..9f36eda62 100644
--- a/time/src/test/java/io/spine/time/AbstractOffsetTimeTest.java
+++ b/time/src/test/java/io/spine/time/AbstractOffsetTimeTest.java
@@ -1,11 +1,11 @@
/*
- * Copyright 2022, TeamDev. All rights reserved.
+ * Copyright 2026, TeamDev. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * https://www.apache.org/licenses/LICENSE-2.0
*
* Redistribution and use in source and/or binary forms, with or without
* modification, must retain the above copyright notice and the following
@@ -41,9 +41,9 @@
* Abstract base for test of time with offset.
*
* @param
- * the type with which the utility class work
+ * the type with which the utility class works
* @param
- * the Java Type which corresponds to the type {@code }
+ * the Java Type that corresponds to the type {@code }
*/
@SuppressWarnings("deprecation")
public abstract class AbstractOffsetTimeTest extends AbstractDateTimeUtilityTest {
diff --git a/time/src/test/java/io/spine/time/given/InstantTemporal.java b/time/src/test/java/io/spine/time/given/InstantTemporal.java
index a40b9c2da..f4fd15f1e 100644
--- a/time/src/test/java/io/spine/time/given/InstantTemporal.java
+++ b/time/src/test/java/io/spine/time/given/InstantTemporal.java
@@ -1,11 +1,11 @@
/*
- * Copyright 2022, TeamDev. All rights reserved.
+ * Copyright 2026, TeamDev. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * https://www.apache.org/licenses/LICENSE-2.0
*
* Redistribution and use in source and/or binary forms, with or without
* modification, must retain the above copyright notice and the following
@@ -35,7 +35,7 @@
import static com.google.common.base.Preconditions.checkNotNull;
/**
- * A {@link Temporal} based on a {@link Instant}.
+ * A {@link Temporal} based on an {@link Instant}.
*/
public final class InstantTemporal implements Temporal {
diff --git a/time/src/test/kotlin/io/spine/time/DefaultValueConversionSpec.kt b/time/src/test/kotlin/io/spine/time/DefaultValueConversionSpec.kt
index 18fa42e1c..3a50ee407 100644
--- a/time/src/test/kotlin/io/spine/time/DefaultValueConversionSpec.kt
+++ b/time/src/test/kotlin/io/spine/time/DefaultValueConversionSpec.kt
@@ -124,11 +124,13 @@ internal class DefaultValueConversionSpec {
}
@Test
+ @Suppress("DEPRECATION") // `ZoneOffsets` is superseded by `ZoneIds`.
fun `ZoneOffset to UTC`() {
ZoneOffsets.toJavaTime(ZoneOffset.getDefaultInstance()) shouldBe JtZoneOffset.UTC
}
@Test
+ @Suppress("DEPRECATION") // `OffsetTimes` is superseded by `LocalTime` + `ZoneId`.
fun `OffsetTime to midnight at UTC`() {
OffsetTimes.toJavaTime(OffsetTime.getDefaultInstance()) shouldBe
JtOffsetTime.of(JtLocalTime.MIDNIGHT, JtZoneOffset.UTC)
diff --git a/time/src/test/kotlin/io/spine/time/validation/LocalDateValidatorSpec.kt b/time/src/test/kotlin/io/spine/time/validation/LocalDateValidatorSpec.kt
index 9f82a71bf..f80ae521c 100644
--- a/time/src/test/kotlin/io/spine/time/validation/LocalDateValidatorSpec.kt
+++ b/time/src/test/kotlin/io/spine/time/validation/LocalDateValidatorSpec.kt
@@ -113,14 +113,14 @@ internal class LocalDateValidatorSpec {
}
/**
- * The test verifies that if a month is not defined the `LocalDate` instance
+ * The test verifies that if a month is not defined, the `LocalDate` instance
* is considered valid.
*
* There is nothing we can do in such a situation because `Month` is an enum.
* We do not restrict enum field values because it does not have much sense
* from the domain language point of view.
*
- * We still want `MONTH_UNDEFINED` item to support the "unset" notion for a month
+ * We still want the `MONTH_UNDEFINED` item to support the "unset" notion for a month
* as we have such a thing for other enums in the code.
*/
@Test
diff --git a/validation/src/main/kotlin/io/spine/tools/time/validation/java/WhenGenerator.kt b/validation/src/main/kotlin/io/spine/tools/time/validation/java/WhenGenerator.kt
index 22f880ad6..2b8bae5b2 100644
--- a/validation/src/main/kotlin/io/spine/tools/time/validation/java/WhenGenerator.kt
+++ b/validation/src/main/kotlin/io/spine/tools/time/validation/java/WhenGenerator.kt
@@ -130,7 +130,7 @@ private class GenerateWhen(
* Yields an expression to check if the provided [fieldValue] matches
* the time [restriction][WhenField.getBound].
*
- * The reported violations are appended to [violations] list, if any.
+ * The reported violations are appended to the [violations] list, if any.
*
* Depending on the field type, the method uses either Protobuf's
* [Timestamps.compare()][com.google.protobuf.util.Timestamps.compare]
diff --git a/validation/src/main/kotlin/io/spine/tools/time/validation/java/WhenOption.kt b/validation/src/main/kotlin/io/spine/tools/time/validation/java/WhenOption.kt
index a1201550e..e0238e9f1 100644
--- a/validation/src/main/kotlin/io/spine/tools/time/validation/java/WhenOption.kt
+++ b/validation/src/main/kotlin/io/spine/tools/time/validation/java/WhenOption.kt
@@ -32,7 +32,6 @@ import io.spine.core.External
import io.spine.core.Subscribe
import io.spine.core.Where
import io.spine.protobuf.unpack
-import io.spine.server.entity.alter
import io.spine.server.event.NoReaction
import io.spine.server.event.React
import io.spine.server.event.asA
@@ -101,7 +100,7 @@ public class WhenOption : ValidationOption {
* Controls whether a field should be validated with the `(when)` option.
*
* Whenever a field marked with the `(when)` options is discovered, emits
- * [WhenFieldDiscovered] event if the following conditions are met:
+ * the [WhenFieldDiscovered] event if the following conditions are met:
*
* 1) The field type is supported by the option.
* 2) The error message does not contain unsupported placeholders.
diff --git a/version.gradle.kts b/version.gradle.kts
index a60fba175..a6d86c349 100644
--- a/version.gradle.kts
+++ b/version.gradle.kts
@@ -27,4 +27,4 @@
/**
* The version of this library for publishing.
*/
-extra.set("versionToPublish", "2.0.0-SNAPSHOT.244")
+extra.set("versionToPublish", "2.0.0-SNAPSHOT.250")