From b1f427eb000ad20ed287252198a7df1c30e333f9 Mon Sep 17 00:00:00 2001 From: alexander-yevsyukov Date: Tue, 21 Jul 2026 19:48:22 +0100 Subject: [PATCH 1/4] Bump version -> `2.0.0-SNAPSHOT.426` --- version.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.gradle.kts b/version.gradle.kts index bbd4e53b8f..9414779c3e 100644 --- a/version.gradle.kts +++ b/version.gradle.kts @@ -24,4 +24,4 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -extra.set("versionToPublish", "2.0.0-SNAPSHOT.425") +extra.set("versionToPublish", "2.0.0-SNAPSHOT.426") From bffbd61ea115d39c85c9e95e8c83c4e7d858aadb Mon Sep 17 00:00:00 2001 From: alexander-yevsyukov Date: Tue, 21 Jul 2026 21:23:02 +0100 Subject: [PATCH 2/4] Update dependency reports --- docs/dependencies/dependencies.md | 16 ++++++++-------- docs/dependencies/pom.xml | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/dependencies/dependencies.md b/docs/dependencies/dependencies.md index e0a0e533b7..67cc1d7812 100644 --- a/docs/dependencies/dependencies.md +++ b/docs/dependencies/dependencies.md @@ -1,6 +1,6 @@ -# Dependencies of `io.spine:spine-annotations:2.0.0-SNAPSHOT.425` +# Dependencies of `io.spine:spine-annotations:2.0.0-SNAPSHOT.426` ## Runtime 1. **Group** : org.jetbrains. **Name** : annotations. **Version** : 26.1.0. @@ -771,14 +771,14 @@ The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Thu Jul 16 17:16:43 WEST 2026** using +This report was generated on **Tue Jul 21 19:53:09 WEST 2026** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). -# Dependencies of `io.spine:spine-base:2.0.0-SNAPSHOT.425` +# Dependencies of `io.spine:spine-base:2.0.0-SNAPSHOT.426` ## Runtime 1. **Group** : com.google.code.findbugs. **Name** : jsr305. **Version** : 3.0.2. @@ -1646,14 +1646,14 @@ This report was generated on **Thu Jul 16 17:16:43 WEST 2026** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Thu Jul 16 17:16:43 WEST 2026** using +This report was generated on **Tue Jul 21 19:53:09 WEST 2026** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). -# Dependencies of `io.spine:spine-environment:2.0.0-SNAPSHOT.425` +# Dependencies of `io.spine:spine-environment:2.0.0-SNAPSHOT.426` ## Runtime 1. **Group** : com.google.code.findbugs. **Name** : jsr305. **Version** : 3.0.2. @@ -2483,14 +2483,14 @@ This report was generated on **Thu Jul 16 17:16:43 WEST 2026** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Thu Jul 16 17:16:43 WEST 2026** using +This report was generated on **Tue Jul 21 19:53:09 WEST 2026** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). -# Dependencies of `io.spine:spine-format:2.0.0-SNAPSHOT.425` +# Dependencies of `io.spine:spine-format:2.0.0-SNAPSHOT.426` ## Runtime 1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.22.1. @@ -3400,6 +3400,6 @@ This report was generated on **Thu Jul 16 17:16:43 WEST 2026** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Thu Jul 16 17:16:43 WEST 2026** using +This report was generated on **Tue Jul 21 19:53:09 WEST 2026** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). \ No newline at end of file diff --git a/docs/dependencies/pom.xml b/docs/dependencies/pom.xml index 6e558fff13..3c48b264b1 100644 --- a/docs/dependencies/pom.xml +++ b/docs/dependencies/pom.xml @@ -10,7 +10,7 @@ all modules and does not describe the project structure per-subproject. --> io.spine base-libraries -2.0.0-SNAPSHOT.425 +2.0.0-SNAPSHOT.426 2015 From 37df31d61dd79ab18b715658063f9870b445ce96 Mon Sep 17 00:00:00 2001 From: alexander-yevsyukov Date: Tue, 21 Jul 2026 21:23:02 +0100 Subject: [PATCH 3/4] docs: proofread comments and documentation Apply the shared english-style catalog across base-libraries: fix grammar, spelling, punctuation, articles, restrictive which/that, verb forms in API summaries, and verb complementation (allow/enable + gerund) in KDoc, Javadoc, Protobuf, and Kotlin/Java comments, plus Markdown docs. Prose-only: no code, identifiers, string literals, or doc-link targets were changed. 103 files. Co-Authored-By: Claude Opus 4.8 --- .agents/memory/reference/cache-warm-window.md | 2 +- .agents/tasks/add-suppliers2-iterators2.md | 2 +- .agents/tasks/archive/raise-base-coverage.md | 2 +- .../io/spine/annotation/GeneratedMixin.kt | 6 +- base/build.gradle.kts | 4 +- base/src/main/java/io/spine/base/Errors.java | 6 +- base/src/main/java/io/spine/base/Field.java | 4 +- base/src/main/java/io/spine/base/IdType.java | 2 +- .../main/java/io/spine/base/Identifier.java | 6 +- .../io/spine/base/RejectionThrowable.java | 2 +- base/src/main/java/io/spine/base/Time.java | 10 +-- .../java/io/spine/code/java/ClassName.java | 10 +-- .../java/io/spine/code/java/PackageName.java | 6 +- .../io/spine/code/proto/ColumnOption.java | 4 +- .../spine/code/proto/EntityStateOption.java | 2 +- .../io/spine/code/proto/FieldDeclaration.java | 8 +- .../java/io/spine/code/proto/FieldName.java | 6 +- .../java/io/spine/code/proto/FileSet.java | 10 +-- .../io/spine/code/proto/LocationPath.java | 2 +- .../java/io/spine/code/proto/PackageName.java | 2 +- .../java/io/spine/code/proto/ScalarType.java | 6 +- .../java/io/spine/code/proto/SourceFile.java | 2 +- .../main/java/io/spine/io/ResourceObject.java | 4 +- .../io/spine/option/BaseOptionsProvider.java | 6 +- .../java/io/spine/protobuf/AnyPacker.java | 6 +- .../java/io/spine/protobuf/Durations2.java | 8 +- .../io/spine/protobuf/PrimitiveConverter.java | 6 +- .../java/io/spine/protobuf/TypeConverter.java | 8 +- .../io/spine/protobuf/WrappingConverter.java | 6 +- .../java/io/spine/protobuf/package-info.java | 6 +- .../io/spine/query/CartesianProducts.java | 8 +- .../java/io/spine/query/CustomCriterion.java | 2 +- .../java/io/spine/query/Distribution.java | 9 +-- .../java/io/spine/query/EntityCriterion.java | 2 +- .../io/spine/query/EntityQueryBuilder.java | 4 +- .../main/java/io/spine/query/Expression.java | 8 +- .../main/java/io/spine/query/IdParameter.java | 2 +- base/src/main/java/io/spine/query/Query.java | 6 +- .../java/io/spine/query/QueryBuilder.java | 2 +- .../java/io/spine/query/QueryCriterion.java | 4 +- .../java/io/spine/query/RecordColumns.java | 6 +- .../io/spine/query/RecordQueryBuilder.java | 2 +- base/src/main/java/io/spine/query/SortBy.java | 2 +- .../src/main/java/io/spine/query/Subject.java | 8 +- .../java/io/spine/query/package-info.java | 16 ++-- .../java/io/spine/string/Stringifier.java | 10 +-- .../src/main/java/io/spine/type/EnumType.java | 6 +- .../main/java/io/spine/type/KnownTypes.java | 4 +- .../main/java/io/spine/type/MessageType.java | 10 +-- base/src/main/java/io/spine/type/Type.java | 4 +- .../src/main/java/io/spine/type/TypeName.java | 4 +- base/src/main/java/io/spine/type/TypeUrl.java | 6 +- .../spine/type/UnexpectedTypeException.java | 6 +- .../java/io/spine/value/StringTypeValue.java | 6 +- .../main/kotlin/io/spine/base/EntityState.kt | 2 +- .../kotlin/io/spine/base/FieldPathExts.kt | 4 +- .../kotlin/io/spine/base/ThrowableExts.kt | 6 +- .../code/proto/DescriptorSetReferenceFile.kt | 2 +- .../code/proto/FieldDescriptorProtoExts.kt | 2 +- .../io/spine/compare/ProtoComparators.kt | 4 +- base/src/main/kotlin/io/spine/io/Delete.kt | 4 +- base/src/main/kotlin/io/spine/io/Ensure.kt | 2 +- .../io/spine/protobuf/DescriptorExts.kt | 6 +- .../kotlin/io/spine/protobuf/MessageExts.kt | 4 +- .../io/spine/protobuf/ProtoConverter.kt | 4 +- .../io/spine/security/InvocationGuard.kt | 6 +- .../io/spine/string/CharSequenceExts.kt | 6 +- .../src/main/kotlin/io/spine/string/Indent.kt | 2 +- .../main/kotlin/io/spine/string/Stringify.kt | 6 +- .../main/kotlin/io/spine/string/Strings.kt | 8 +- .../kotlin/io/spine/type/ProtoTextExts.kt | 4 +- .../main/proto/spine/base/field_path.proto | 5 +- base/src/main/proto/spine/options.proto | 77 ++++++++++--------- .../java/io/spine/base/IdentifierTest.java | 2 +- .../io/spine/base/RejectionThrowableTest.java | 7 +- .../base/given/ConstantTimeProvider.java | 6 +- .../io/spine/base/given/GivenDurations.java | 6 +- .../spine/code/proto/given/package-info.java | 6 +- .../java/io/spine/protobuf/AnyPackerTest.java | 8 +- .../java/io/spine/protobuf/GoogleTypesTest.kt | 6 +- .../io/spine/protobuf/TypeConverterTest.java | 6 +- .../io/spine/query/QueryPredicateTest.java | 6 +- .../given/RecordQueryBuilderTestEnv.java | 6 +- .../string/TimestampStringifierTest.java | 6 +- .../test/kotlin/io/spine/LoggingSmokeTest.kt | 8 +- .../io/spine/code/java/ClassNameSpec.kt | 2 +- .../kotlin/io/spine/string/StringsSpec.kt | 6 +- .../test/code/proto/column_option_test.proto | 6 +- .../spine/test/code/proto/test_commands.proto | 7 +- .../test/code/proto/test_entity_states.proto | 7 +- .../spine/test/code/proto/test_events.proto | 7 +- .../test/code/proto/test_rejections.proto | 7 +- .../test/code/proto/test_uuid_messages.proto | 7 +- .../test/protobuf/descriptor_exts_spec.proto | 5 +- .../test/proto/spine/test/type/types.proto | 13 ++-- .../environment/CustomEnvironmentType.java | 6 +- .../io/spine/environment/Environment.java | 16 ++-- .../io/spine/environment/EnvironmentType.java | 6 +- .../main/java/io/spine/environment/Tests.java | 6 +- .../environment/given/AppEngineStandard.java | 6 +- .../src/main/kotlin/io/spine/format/Parse.kt | 8 +- .../io/spine/format/write/JacksonWriter.kt | 4 +- .../test/kotlin/io/spine/format/FormatTest.kt | 2 +- 103 files changed, 324 insertions(+), 315 deletions(-) diff --git a/.agents/memory/reference/cache-warm-window.md b/.agents/memory/reference/cache-warm-window.md index 796dd4d303..b57ca218cb 100644 --- a/.agents/memory/reference/cache-warm-window.md +++ b/.agents/memory/reference/cache-warm-window.md @@ -18,7 +18,7 @@ same cache slot — provided they fall within the TTL. Developers must have `ENABLE_PROMPT_CACHING_1H=1` set, otherwise the window is too short for cross-session hits to occur reliably. This setting will work ONLY for Claude Code which runs the CLI binary. -It will not work for JetBrains Air or any other IDE plugin which does not +It will not work for JetBrains Air or any other IDE plugin that does not run the Claude Code CLI binary. **Cache is per Anthropic workspace.** All developers authenticated via the diff --git a/.agents/tasks/add-suppliers2-iterators2.md b/.agents/tasks/add-suppliers2-iterators2.md index f820480fc7..3573ca3465 100644 --- a/.agents/tasks/add-suppliers2-iterators2.md +++ b/.agents/tasks/add-suppliers2-iterators2.md @@ -23,7 +23,7 @@ can later drop its copies. - `io.spine.util` already hosts the Guava-companion naming pattern (`Preconditions2`, `Predicates2`) and is `@NullMarked` via `package-info.java`. - The classes keep `@Internal` (as in the source PR): they are framework - plumbing; widening to public API later is non-breaking, the reverse is not. + plumbing; widening to public API later is non-breaking; the reverse is not. - New tests follow `kotlin-jvm-tester` conventions: Kotlin, `Spec` suffix, `internal`, `UtilityClassTest` base (private ctor + final + `NullPointerTester` on public statics), Kotest assertions. diff --git a/.agents/tasks/archive/raise-base-coverage.md b/.agents/tasks/archive/raise-base-coverage.md index cfc6176fa0..f7c17f8af3 100644 --- a/.agents/tasks/archive/raise-base-coverage.md +++ b/.agents/tasks/archive/raise-base-coverage.md @@ -39,7 +39,7 @@ gaps closed without weakening Codecov settings. - [x] Analyze whether `io.spine.code.fs` is used in SpineEventEngine projects. - [x] Mark `io.spine.code.fs` types that are not used by any project as deprecated. - [x] Deprecate `io.spine.code.fs` types that are not used. -- [x] Analyse whether `RejectionType` is used in Spine SDK projects and deprecate if not. +- [x] Analyze whether `RejectionType` is used in Spine SDK projects and deprecate if not. - [x] Finalize test cases for the remaining non-deprecated API and wait for approval to write tests. - [x] Add approved Kotlin `*Spec` tests using stubs, not mocks. diff --git a/annotations/src/main/kotlin/io/spine/annotation/GeneratedMixin.kt b/annotations/src/main/kotlin/io/spine/annotation/GeneratedMixin.kt index 7df4ec651a..bc2dd286f0 100644 --- a/annotations/src/main/kotlin/io/spine/annotation/GeneratedMixin.kt +++ b/annotations/src/main/kotlin/io/spine/annotation/GeneratedMixin.kt @@ -37,14 +37,14 @@ import kotlin.annotation.AnnotationTarget.CLASS * ## Motivation * * This annotation allows documenting the intent of the interface. - * It also allows to instruct IDEs to consider annotated interfaces as implemented before + * It also allows instructing IDEs to consider annotated interfaces as implemented before * the code generation phase, or if the interfaces are used only from projects that depend * on the one declaring these interfaces. * - * For example, Spine Base project introduces the `io.spine.base.CommandMessage` interface. + * For example, the Spine Base project introduces the `io.spine.base.CommandMessage` interface. * There are no command messages generated in the Base project because it does not provide any * backend API. The interface is used by multiple subprojects of the Spine SDK that depend - * on Base, but it is not used withing the project. + * on Base, but it is not used within the project. * Annotating the interface with `GeneratedMixin` addresses the issue. * * ## Creating a mixin interface diff --git a/base/build.gradle.kts b/base/build.gradle.kts index 6be73a1bd4..6014961fea 100644 --- a/base/build.gradle.kts +++ b/base/build.gradle.kts @@ -117,7 +117,7 @@ protobuf { } /** - * Remove the code generated for Google Protobuf library types. + * Removes the code generated for Google Protobuf library types. * * The code for the `com.google` package was generated because we wanted * to have descriptors for all the types, including those from Google Protobuf library. @@ -150,7 +150,7 @@ private val Project.generatedDir /** * Obtains the `generated` directory for the source set of the task. * - * If [language] is specified returns the subdirectory for this language. + * If [language] is specified, returns the subdirectory for this language. */ private fun GenerateProtoTask.generatedDir(language: String = ""): File { val path = "${project.generatedDir}/${sourceSet.name}/$language" diff --git a/base/src/main/java/io/spine/base/Errors.java b/base/src/main/java/io/spine/base/Errors.java index 69662629dc..f147eae410 100644 --- a/base/src/main/java/io/spine/base/Errors.java +++ b/base/src/main/java/io/spine/base/Errors.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 @@ private Errors() { } /** - * Creates new instance of {@link Error} by the passed {@code Throwable}. + * Creates a new instance of {@link Error} by the passed {@code Throwable}. */ public static Error fromThrowable(Throwable throwable) { var result = toErrorBuilder(throwable); diff --git a/base/src/main/java/io/spine/base/Field.java b/base/src/main/java/io/spine/base/Field.java index 8ce0cae5ba..31ab5855fe 100644 --- a/base/src/main/java/io/spine/base/Field.java +++ b/base/src/main/java/io/spine/base/Field.java @@ -402,7 +402,7 @@ static FieldPath doParse(String fieldPath) { } /** - * If the passed value is {@code EnumValueDescriptor} converts it to the corresponding + * If the passed value is {@code EnumValueDescriptor}, converts it to the corresponding * Java enum value. Otherwise, returns the passed value. * *

{@link Message#getField(FieldDescriptor)} returns {@code EnumValueDescriptor} if @@ -448,7 +448,7 @@ private static Object convertIfEnum(Object currentValue) { return field; } - /** Ensures that the passed filed name does not contain the path separator. */ + /** Ensures that the passed field name does not contain the path separator. */ private static void checkName(String fieldName) { checkNotEmptyOrBlank(fieldName); checkArgument( diff --git a/base/src/main/java/io/spine/base/IdType.java b/base/src/main/java/io/spine/base/IdType.java index aa7127f7c1..492e720fc3 100644 --- a/base/src/main/java/io/spine/base/IdType.java +++ b/base/src/main/java/io/spine/base/IdType.java @@ -284,7 +284,7 @@ static IdType of(I id) { } /** - * Returns {@code true} if the passed instances of {@link Object} matches this + * Returns {@code true} if the passed instance of {@link Object} matches this * type of identifiers; {@code false} otherwise. */ abstract boolean matchValue(I id); diff --git a/base/src/main/java/io/spine/base/Identifier.java b/base/src/main/java/io/spine/base/Identifier.java index b3fd619829..29236aa394 100644 --- a/base/src/main/java/io/spine/base/Identifier.java +++ b/base/src/main/java/io/spine/base/Identifier.java @@ -289,7 +289,7 @@ private static IllegalArgumentException unsupportedClass(Class idClass) { until Java 18. So we link to the class Javadoc where the header comes first. */ public static void checkSupported(Class idClass) { checkNotNull(idClass); - // Even through `getType()` can never return null, we use its return value here + // Even though `getType()` can never return null, we use its return value here // instead of annotating the method so that the returned value can be ignored // just because of this one usage. var type = toType(idClass); @@ -343,7 +343,7 @@ public static boolean isSupportedIdType(FieldDescriptor field) { * Wraps the passed ID value into an instance of {@link Any}. * *

The passed value must be of one of the supported types listed below. - * The type of the value wrapped in to the returned instance is defined by the type + * The type of the value wrapped into the returned instance is defined by the type * of the passed value: *

    *
  • For classes implementing {@link Message} — the value of the message itself @@ -371,7 +371,7 @@ public static Any pack(I id) { /** * Extracts an ID value from the passed {@code Any} instance. * - *

    Returned type depends on the type of the message wrapped into {@code Any}: + *

    The returned type depends on the type of the message wrapped into {@code Any}: *

      *
    • {@code String} for unwrapped {@link StringValue} *
    • {@code Integer} for unwrapped {@link Int32Value} diff --git a/base/src/main/java/io/spine/base/RejectionThrowable.java b/base/src/main/java/io/spine/base/RejectionThrowable.java index 41fd225d27..af842b7a25 100644 --- a/base/src/main/java/io/spine/base/RejectionThrowable.java +++ b/base/src/main/java/io/spine/base/RejectionThrowable.java @@ -101,7 +101,7 @@ public synchronized RejectionThrowable initProducer(Any producerId) { } /** - * Obtains ID of the entity that has thrown the message. + * Obtains the ID of the entity that has thrown the message. */ public synchronized Optional producerId() { return Optional.ofNullable(producerId); diff --git a/base/src/main/java/io/spine/base/Time.java b/base/src/main/java/io/spine/base/Time.java index 12b77894a0..b07aaed67a 100644 --- a/base/src/main/java/io/spine/base/Time.java +++ b/base/src/main/java/io/spine/base/Time.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 @@ -89,7 +89,7 @@ public static synchronized ZoneId currentTimeZone() { } /** - * Sets provider of the current time. + * Sets the provider of the current time. * *

      The most common scenario for using this method is test cases of code that deals * with current time. @@ -184,7 +184,7 @@ public Timestamp currentTime() { /** * Provides an incremental value of nanoseconds for the local JVM. * - *

      In most cases, the JVM and underlying OS provides the millisecond-level precision at best. + *

      In most cases, the JVM and underlying OS provide the millisecond-level precision at best. * Therefore, the messages produced in such a virtual machine are often stamped * with the same time value. However, most of the message-ordering routines require * the distinct time values for proper work. @@ -201,7 +201,7 @@ public Timestamp currentTime() { * It is designed to keep the millisecond value provided by a typical-JVM system clock intact. * *

      The nanosecond value is reset for each new passed {@code seconds} and {@code nanos} - * values. That allows to receive {@code 1 000} distinct time values per millisecond. + * values. That allows receiving {@code 1 000} distinct time values per millisecond. * *

      In case the upper bound of the nanos is reached, meaning that there were more than * {@code 1 000} calls to this class within a millisecond, the nanosecond value is reset diff --git a/base/src/main/java/io/spine/code/java/ClassName.java b/base/src/main/java/io/spine/code/java/ClassName.java index c456312f76..41a29d858c 100644 --- a/base/src/main/java/io/spine/code/java/ClassName.java +++ b/base/src/main/java/io/spine/code/java/ClassName.java @@ -96,7 +96,7 @@ public static ClassName of(@FullyQualifiedName String className) { } /** - * Creates a class name from the specified package the and simple name. + * Creates a class name from the specified package and simple name. * * @param packageName * the name of the class package @@ -240,7 +240,7 @@ public String canonicalName() { * The actual returned value is obtained from {@link Class#getName()}. In most cases, * the {@code Class.getName()} and the JDK-spec binary name coincide. * - * @return the name with the {@link #OUTER_CLASS_DELIMITER}s between nested classed if any + * @return the name with the {@link #OUTER_CLASS_DELIMITER}s between nested classes if any * @implSpec This method returns the same value as does the {@code value()} method. Use * this method for more clarity in the client code. */ @@ -306,7 +306,7 @@ public String withoutPackage() { } /** - * Obtain the part of the name after the last {@link #DOT_SEPARATOR .} (dot) symbol. + * Obtains the part of the name after the last {@link #DOT_SEPARATOR .} (dot) symbol. * * @param fullName * a full class name @@ -334,10 +334,10 @@ private int packageEndIndex() { } /** - * Obtains the simple name of the top level class. + * Obtains the simple name of the top-level class. * *

      If this class is top level, returns the simple name of this class. - * If this class is nested, returns the name of the declaring top level class. + * If this class is nested, returns the name of the declaring top-level class. */ public SimpleClassName topLevelClass() { var qualifiedClassName = afterDot(value()); diff --git a/base/src/main/java/io/spine/code/java/PackageName.java b/base/src/main/java/io/spine/code/java/PackageName.java index 69d8383acf..be9e6df18b 100644 --- a/base/src/main/java/io/spine/code/java/PackageName.java +++ b/base/src/main/java/io/spine/code/java/PackageName.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 @@ -50,7 +50,7 @@ private PackageName(String value) { } /** - * Creates instance for the passed package name. + * Creates an instance for the passed package name. * * @param value * the package name, which cannot be empty or blank diff --git a/base/src/main/java/io/spine/code/proto/ColumnOption.java b/base/src/main/java/io/spine/code/proto/ColumnOption.java index fb879c29d6..9216f3d9fa 100644 --- a/base/src/main/java/io/spine/code/proto/ColumnOption.java +++ b/base/src/main/java/io/spine/code/proto/ColumnOption.java @@ -69,8 +69,8 @@ public static boolean hasColumns(MessageType messageType) { /** * Returns all fields of a message type that are declared as columns. * - *

      If the message type is not eligible for having columns, returns empty list regardless of - * how fields are declared. + *

      If the message type is not eligible for having columns, returns an empty list regardless + * of how fields are declared. */ public static ImmutableList columnsOf(MessageType messageType) { if (!declaresEntity(messageType)) { diff --git a/base/src/main/java/io/spine/code/proto/EntityStateOption.java b/base/src/main/java/io/spine/code/proto/EntityStateOption.java index 8f025717b3..4494da4303 100644 --- a/base/src/main/java/io/spine/code/proto/EntityStateOption.java +++ b/base/src/main/java/io/spine/code/proto/EntityStateOption.java @@ -37,7 +37,7 @@ * An option for a message representing a state of the entity that defines its kind and visibility * to queries. * - *

      There are four kids of options, namely, Aggregate, Projection, Process Manager, and Entity. + *

      There are four kinds of options, namely, Aggregate, Projection, Process Manager, and Entity. */ @Immutable public final class EntityStateOption extends MessageOption { diff --git a/base/src/main/java/io/spine/code/proto/FieldDeclaration.java b/base/src/main/java/io/spine/code/proto/FieldDeclaration.java index 6337dc2612..0ce3d7a6cf 100644 --- a/base/src/main/java/io/spine/code/proto/FieldDeclaration.java +++ b/base/src/main/java/io/spine/code/proto/FieldDeclaration.java @@ -100,7 +100,7 @@ public int number() { } /** - * Obtains descriptor of the field. + * Obtains the descriptor of the field. */ public FieldDescriptor descriptor() { return field; @@ -140,7 +140,7 @@ private boolean sameMessageType(Message msg) { } /** - * Obtains fully-qualified canonical name of the Java class that corresponds to the declared + * Obtains the fully-qualified canonical name of the Java class that corresponds to the declared * type of the field. * *

      If the field is {@code repeated}, obtains the name of the elements. @@ -271,7 +271,7 @@ public boolean isCollection() { } /** - * Determines whether the field marked as {@code repeated}. + * Determines whether the field is marked as {@code repeated}. * *

      A map field is not considered repeated. * @@ -311,7 +311,7 @@ public MessageType messageType() { } /** - * Obtains a class name of the field type or a name a wrapper class, if the field is scalar. + * Obtains a class name of the field type or a name of a wrapper class, if the field is scalar. */ @Internal public ClassName className() { diff --git a/base/src/main/java/io/spine/code/proto/FieldName.java b/base/src/main/java/io/spine/code/proto/FieldName.java index 3178014826..b6e67131bb 100644 --- a/base/src/main/java/io/spine/code/proto/FieldName.java +++ b/base/src/main/java/io/spine/code/proto/FieldName.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 @@ -77,7 +77,7 @@ public static FieldName of(FieldDescriptorProto field) { } /** - * Obtains immutable list of words used in the name of the field. + * Obtains an immutable list of words used in the name of the field. * *

      A word is a part of the name, the first letter of which should be capitalized * when converting {@linkplain #toCamelCase() to CamelCase}. diff --git a/base/src/main/java/io/spine/code/proto/FileSet.java b/base/src/main/java/io/spine/code/proto/FileSet.java index f22256b0a3..c106a42531 100644 --- a/base/src/main/java/io/spine/code/proto/FileSet.java +++ b/base/src/main/java/io/spine/code/proto/FileSet.java @@ -245,14 +245,14 @@ public FileSet filter(Predicate predicate) { } /** - * Obtains immutable view of the files in this set. + * Obtains an immutable view of the files in this set. */ public ImmutableSet files() { return ImmutableSet.copyOf(files.values()); } /** - * Obtains array with the files of this set. + * Obtains an array with the files of this set. */ FileDescriptor[] toArray() { return files.values() @@ -279,7 +279,7 @@ public boolean containsAll(Collection fileNames) { } /** - * Obtains the set of the files that match passed names. + * Obtains the set of the files that match the passed names. */ public FileSet find(Collection fileNames) { Map found = newHashMapWithExpectedSize(fileNames.size()); @@ -302,7 +302,7 @@ public Optional tryFind(FileName fileName) { } /** - * Adds file to the set. + * Adds a file to the set. */ @CanIgnoreReturnValue public boolean add(FileDescriptor file) { @@ -329,7 +329,7 @@ public boolean isEmpty() { } /** - * Returns a string with alphabetically sorted list of files of this set. + * Returns a string with an alphabetically sorted list of files of this set. */ @Override public String toString() { diff --git a/base/src/main/java/io/spine/code/proto/LocationPath.java b/base/src/main/java/io/spine/code/proto/LocationPath.java index bde27ae7b1..b4c35ec6da 100644 --- a/base/src/main/java/io/spine/code/proto/LocationPath.java +++ b/base/src/main/java/io/spine/code/proto/LocationPath.java @@ -68,7 +68,7 @@ private LocationPath(Iterable items, boolean check) { this.path = ImmutableList.copyOf(check ? checkPath(items) : items); } - /** Creates an copy of the passed path. */ + /** Creates a copy of the passed path. */ LocationPath(LocationPath start) { this(start.path, false); } diff --git a/base/src/main/java/io/spine/code/proto/PackageName.java b/base/src/main/java/io/spine/code/proto/PackageName.java index cd96c75529..c07fd36402 100644 --- a/base/src/main/java/io/spine/code/proto/PackageName.java +++ b/base/src/main/java/io/spine/code/proto/PackageName.java @@ -79,7 +79,7 @@ public static PackageName googleProtobuf() { } /** - * Obtains Protobuf package delimiter. + * Obtains the Protobuf package delimiter. */ public static String delimiter() { return DELIMITER; diff --git a/base/src/main/java/io/spine/code/proto/ScalarType.java b/base/src/main/java/io/spine/code/proto/ScalarType.java index 137b7703ce..0bba3bb823 100644 --- a/base/src/main/java/io/spine/code/proto/ScalarType.java +++ b/base/src/main/java/io/spine/code/proto/ScalarType.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 @@ -81,7 +81,7 @@ public static String javaTypeName(Type protoScalar) { } /** - * Returns the the corresponding Java type for the Protobuf scalar type. + * Returns the corresponding Java type for the Protobuf scalar type. * * @param protoScalar * the Protobuf scalar type diff --git a/base/src/main/java/io/spine/code/proto/SourceFile.java b/base/src/main/java/io/spine/code/proto/SourceFile.java index 198383264d..0a63419ee7 100644 --- a/base/src/main/java/io/spine/code/proto/SourceFile.java +++ b/base/src/main/java/io/spine/code/proto/SourceFile.java @@ -67,7 +67,7 @@ private static Path toPath(FileDescriptor file) { } /** - * Obtains descriptor of the file. + * Obtains the descriptor of the file. */ public FileDescriptor descriptor() { return descriptor; diff --git a/base/src/main/java/io/spine/io/ResourceObject.java b/base/src/main/java/io/spine/io/ResourceObject.java index 730dc13dff..9c82181875 100644 --- a/base/src/main/java/io/spine/io/ResourceObject.java +++ b/base/src/main/java/io/spine/io/ResourceObject.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. @@ -40,7 +40,7 @@ * Abstract base for objects stored in program resources. * *

      Such a resource is represented by a string path relative to the {@code "resources"} directory - * of a project, and is loaded by a specified {@link ClassLoader} on runtime. + * of a project, and is loaded by a specified {@link ClassLoader} at runtime. */ abstract class ResourceObject { diff --git a/base/src/main/java/io/spine/option/BaseOptionsProvider.java b/base/src/main/java/io/spine/option/BaseOptionsProvider.java index 43f83d5360..070af4d069 100644 --- a/base/src/main/java/io/spine/option/BaseOptionsProvider.java +++ b/base/src/main/java/io/spine/option/BaseOptionsProvider.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 @@ -30,7 +30,7 @@ import com.google.protobuf.ExtensionRegistry; /** - * Register options generated for the {@code spine/options.proto} file. + * Registers options generated for the {@code spine/options.proto} file. */ @AutoService(OptionsProvider.class) public final class BaseOptionsProvider implements OptionsProvider { diff --git a/base/src/main/java/io/spine/protobuf/AnyPacker.java b/base/src/main/java/io/spine/protobuf/AnyPacker.java index a08dd19e58..ebbc56ca8f 100644 --- a/base/src/main/java/io/spine/protobuf/AnyPacker.java +++ b/base/src/main/java/io/spine/protobuf/AnyPacker.java @@ -41,14 +41,14 @@ /** * Utilities for packing messages into {@link Any} and unpacking them. * - *

      When packing, the {@code AnyPacker} takes care of obtaining correct type URL prefix + *

      When packing, the {@code AnyPacker} takes care of obtaining the correct type URL prefix * for the passed messages. * *

      When unpacking, the {@code AnyPacker} obtains a Java class matching the type URL * from the given instance of {@link Any}. * * @implNote This class does not use the {@link Any#unpack(Class)} method for unpacking - * because for the performance reasons. + * because of the performance reasons. * *

      The implementation of {@link Any#unpack(Class)} invokes the {@link Any#is(Class) is(Class)} * method that obtains a default instance of a message by calling a method @@ -71,7 +71,7 @@ private AnyPacker() { /** * Wraps {@link Message} object inside of {@link Any} instance. * - *

      If an instance of {@code Any} passed, this instance is returned. + *

      If an instance of {@code Any} is passed, this instance is returned. * * @param message the message to pack * @return the wrapping instance of {@link Any} or the message itself, if it is {@code Any} diff --git a/base/src/main/java/io/spine/protobuf/Durations2.java b/base/src/main/java/io/spine/protobuf/Durations2.java index 7df4ae3a0c..03ece2fb12 100644 --- a/base/src/main/java/io/spine/protobuf/Durations2.java +++ b/base/src/main/java/io/spine/protobuf/Durations2.java @@ -60,7 +60,7 @@ @SuppressWarnings("UtilityClass") public final class Durations2 { - /** Prevent instantiation of this utility class. */ + /** Prevents instantiation of this utility class. */ private Durations2() { } @@ -160,7 +160,7 @@ public static Duration hoursAndMinutes(long hours, long minutes) { } /** - * Returns {@code true} of the passed value is greater or equal zero, + * Returns {@code true} if the passed value is greater or equal zero, * {@code false} otherwise. */ public static boolean isPositiveOrZero(Duration value) { @@ -204,7 +204,7 @@ public static Duration of(java.time.Duration value) { } /** - * Converts the passed value to Java Time value. + * Converts the passed value to a Java Time value. */ public static java.time.Duration toJavaTime(Duration value) { checkNotNull(value); @@ -232,7 +232,7 @@ public static Duration parse(String str) { } /** - * Obtains the instance of Java Time converter. + * Obtains the instance of the Java Time converter. */ public static Converter converter() { return JtConverter.INSTANCE; diff --git a/base/src/main/java/io/spine/protobuf/PrimitiveConverter.java b/base/src/main/java/io/spine/protobuf/PrimitiveConverter.java index 95a64a207e..e35317706f 100644 --- a/base/src/main/java/io/spine/protobuf/PrimitiveConverter.java +++ b/base/src/main/java/io/spine/protobuf/PrimitiveConverter.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 @@ -48,7 +48,7 @@ * @param * the type of the message * @param - * the type to converter to and from the message + * the type to convert to and from the message * @implNote The arguments are checked during the conversion and an * {@link IllegalArgumentException} is thrown in case of mismatch. The type name used in * the error message is a simple {@link Class#getName() Class.getName()} call result. diff --git a/base/src/main/java/io/spine/protobuf/TypeConverter.java b/base/src/main/java/io/spine/protobuf/TypeConverter.java index 5f90421396..99b08b2914 100644 --- a/base/src/main/java/io/spine/protobuf/TypeConverter.java +++ b/base/src/main/java/io/spine/protobuf/TypeConverter.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 @@ import static java.util.Objects.requireNonNull; /** - * A utility for converting {@linkplain Message Protobuf Messages} (in form of {@link Any}) + * A utility for converting {@linkplain Message Protobuf Messages} (in the form of {@link Any}) * to arbitrary {@linkplain Object Java Objects} and, where applicable, back to {@link Any}. * *

      Conversion of Singular Types

      @@ -51,7 +51,7 @@ *
    • Java primitives — the passed {@link Any} is unpacked into one of the types * {@code Int32Value, Int64Value, UInt32Value, UInt64Value, FloatValue, DoubleValue, * BoolValue, StringValue, BytesValue} and then transformed into the corresponding Java - * type, either a primitive value, or {@code String} of {@link ByteString}. For more info, + * type, either a primitive value, or {@code String} or {@link ByteString}. For more info, * see * the official document. *
    • {@linkplain Enum Java Enum} types — the passed {@link Any} is unpacked into the {@link diff --git a/base/src/main/java/io/spine/protobuf/WrappingConverter.java b/base/src/main/java/io/spine/protobuf/WrappingConverter.java index a030298125..e770c7284a 100644 --- a/base/src/main/java/io/spine/protobuf/WrappingConverter.java +++ b/base/src/main/java/io/spine/protobuf/WrappingConverter.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 @@ -34,7 +34,7 @@ /** * A converter handling the primitive types transformations. * - *

      Since the Protobuf and Java primitives differ, there may be more then one + *

      Since the Protobuf and Java primitives differ, there may be more than one * {@code WrappingConverter} for a Java primitive type. In this case, if the resulting Protobuf * value type is not specified explicitly, the closest type is selected as a target for * the conversion. The closeness of two types is determined by the lexicographic closeness. diff --git a/base/src/main/java/io/spine/protobuf/package-info.java b/base/src/main/java/io/spine/protobuf/package-info.java index a338ae378e..d03b5e7250 100644 --- a/base/src/main/java/io/spine/protobuf/package-info.java +++ b/base/src/main/java/io/spine/protobuf/package-info.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 @@ -25,7 +25,7 @@ */ /** - * This package provides utility classes for working with Google Protobuf implementation in Java. + * This package provides utility classes for working with the Google Protobuf implementation in Java. */ @CheckReturnValue @NullMarked diff --git a/base/src/main/java/io/spine/query/CartesianProducts.java b/base/src/main/java/io/spine/query/CartesianProducts.java index 086a49d105..a05cc8a376 100644 --- a/base/src/main/java/io/spine/query/CartesianProducts.java +++ b/base/src/main/java/io/spine/query/CartesianProducts.java @@ -48,7 +48,7 @@ private CartesianProducts() { } /** - * Multiplies the each of the passed simple parameters onto each of parts + * Multiplies each of the passed simple parameters onto each of the parts * of the passed {@code OrExpression}, handling the multiplication * as {@code A && (B || C || D ...) <=> (A && B) || (A && C) || (A && D) || ...)} * @@ -72,7 +72,7 @@ void cartesianSimpleParams(List> simpleParams, } /** - * Multiplies the each of the passed child expressions onto each of parts + * Multiplies each of the passed child expressions onto each of the parts * of the passed {@code OrExpression}, handling the multiplication * as {@code A && (B || C || D ...) <=> (A && B) || (A && C) || (A && D) || ...)} * @@ -96,7 +96,7 @@ void cartesianChildren(List> children, } /** - * Multiplies the each of the passed custom parameters onto each of parts + * Multiplies each of the passed custom parameters onto each of the parts * of the passed {@code OrExpression}, handling the multiplication * as {@code A && (B || C || D ...) <=> (A && B) || (A && C) || (A && D) || ...)} * @@ -313,7 +313,7 @@ private static void childOverChildren(Expression child, * Appends a child expression to the passed {@code AndBuilder}. * *

      If the passed child expression is a conjunctive one, its contents are copied - * to the contents of the passed builder. And in other case, it is appended as a child + * to the contents of the passed builder. And in the other case, it is appended as a child * of the passed builder. * * @param diff --git a/base/src/main/java/io/spine/query/CustomCriterion.java b/base/src/main/java/io/spine/query/CustomCriterion.java index 7970227449..c8b707ceb8 100644 --- a/base/src/main/java/io/spine/query/CustomCriterion.java +++ b/base/src/main/java/io/spine/query/CustomCriterion.java @@ -32,7 +32,7 @@ import static io.spine.query.ComparisonOperator.EQUALS; /** - * Allows to specify the values for the {@link CustomSubjectParameter}s. + * Allows specifying the values for the {@link CustomSubjectParameter}s. * *

      The custom parameters are set as desired values for the {@link CustomColumn}s. * diff --git a/base/src/main/java/io/spine/query/Distribution.java b/base/src/main/java/io/spine/query/Distribution.java index 5335ba60c1..0a077a8d01 100644 --- a/base/src/main/java/io/spine/query/Distribution.java +++ b/base/src/main/java/io/spine/query/Distribution.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 @@ -67,7 +67,7 @@ private Distribution() { } /** - * Applies the distribution law to given {@code AndExpression} being in conjunction + * Applies the distribution law to the given {@code AndExpression} being in conjunction * with an {@code OrExpression}. */ private static OrExpression distributeCnj(AndExpression and, OrExpression or) { @@ -78,7 +78,6 @@ private static OrExpression distributeCnj(AndExpression and, OrExpress return result.build(); } - /** * Distributes the parts of the passed {@code AND} expression over the list * of the disjunctive child {@code Expression}s — as if they are evaluated in conjunction @@ -178,7 +177,7 @@ private static void distributeSimpleParams(AndExpression and, * } * *

      The outcome is a cartesian product of parts of each expression. All resulting pairs - * are expressions such as {@code (paramA && childB)}, joined by conjunction. The resulting + * are expressions such as {@code (paramA && childB)}, joined by conjunction. The resulting * {@code OrExpression} contains all these newly created conjunctive pairs as children: * *

      Outcome: diff --git a/base/src/main/java/io/spine/query/EntityCriterion.java b/base/src/main/java/io/spine/query/EntityCriterion.java index 670876b4f6..4ee7d8fa9b 100644 --- a/base/src/main/java/io/spine/query/EntityCriterion.java +++ b/base/src/main/java/io/spine/query/EntityCriterion.java @@ -31,7 +31,7 @@ /** * An expression that sets the value to compare for the {@link EntityColumn} in scope of - * a {@link EntityQueryBuilder} when building an {@link EntityQuery}. + * an {@link EntityQueryBuilder} when building an {@link EntityQuery}. * * @param * the type of entity state diff --git a/base/src/main/java/io/spine/query/EntityQueryBuilder.java b/base/src/main/java/io/spine/query/EntityQueryBuilder.java index b3676f3976..294c7c1937 100644 --- a/base/src/main/java/io/spine/query/EntityQueryBuilder.java +++ b/base/src/main/java/io/spine/query/EntityQueryBuilder.java @@ -57,7 +57,7 @@ public abstract class EntityQueryBuilder, B, Q> { /** - * Creates an new instance of the {@code EntityQueryBuilder}. + * Creates a new instance of the {@code EntityQueryBuilder}. * * @param idType * the type of entity identifiers @@ -106,7 +106,7 @@ public final B withMask(SubscribableField... fields) { * Builds a query on top of this entity query builder and transforms it according * to the logic of the passed transformer. * - *

      This method is a syntax sugar for a convenient method chaining for those who wishes to use + *

      This method is a syntax sugar for a convenient method chaining for those who wish to use * the produced query in their own transformation flow. * * @param transformer diff --git a/base/src/main/java/io/spine/query/Expression.java b/base/src/main/java/io/spine/query/Expression.java index 180bfe7d0d..cf7a90f30a 100644 --- a/base/src/main/java/io/spine/query/Expression.java +++ b/base/src/main/java/io/spine/query/Expression.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 @@ * It makes it difficult to use them in operations like applying the distributive law * of boolean algebra. * - *

      Therefore, this type and its descendants serve as a "staging" data structures for performing + *

      Therefore, this type and its descendants serve as "staging" data structures for performing * manipulations with the expression parts. * * @param @@ -127,7 +127,7 @@ && customParams().isEmpty() } /** - * Creates a new builder of the same {@code Expression} type as current one. + * Creates a new builder of the same {@code Expression} type as the current one. */ abstract Builder createBuilder(); diff --git a/base/src/main/java/io/spine/query/IdParameter.java b/base/src/main/java/io/spine/query/IdParameter.java index b8afc37b34..f3ab4615a9 100644 --- a/base/src/main/java/io/spine/query/IdParameter.java +++ b/base/src/main/java/io/spine/query/IdParameter.java @@ -82,7 +82,7 @@ public int hashCode() { } /** - * Creates an new instance of this parameter without restricting it to any identifier values. + * Creates a new instance of this parameter without restricting it to any identifier values. * * @param * the type of the values, to satisfy the contract of a calling party diff --git a/base/src/main/java/io/spine/query/Query.java b/base/src/main/java/io/spine/query/Query.java index 683f667844..20e0fa8006 100644 --- a/base/src/main/java/io/spine/query/Query.java +++ b/base/src/main/java/io/spine/query/Query.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 @@ -32,7 +32,7 @@ import org.jspecify.annotations.Nullable; /** - * An query to fetch the records defined as Protobuf messages. + * A query to fetch the records defined as Protobuf messages. * * @param * the type of record identifiers diff --git a/base/src/main/java/io/spine/query/QueryBuilder.java b/base/src/main/java/io/spine/query/QueryBuilder.java index 7a5d511a5f..b9895582a5 100644 --- a/base/src/main/java/io/spine/query/QueryBuilder.java +++ b/base/src/main/java/io/spine/query/QueryBuilder.java @@ -37,7 +37,7 @@ import java.util.Optional; /** - * A builder for instance of {@link Query}. + * A builder for an instance of {@link Query}. * * @param * the type of identifiers of the records that are queried diff --git a/base/src/main/java/io/spine/query/QueryCriterion.java b/base/src/main/java/io/spine/query/QueryCriterion.java index 120c70d12e..90316edf91 100644 --- a/base/src/main/java/io/spine/query/QueryCriterion.java +++ b/base/src/main/java/io/spine/query/QueryCriterion.java @@ -46,7 +46,7 @@ * @param * the type of the column to which this restriction is put * @param - * the type of the query builder, in scope of which this restiction is set + * the type of the query builder, in scope of which this restriction is set */ abstract class QueryCriterion - *

    • It allows to refer to columns via a {@code static import}, as it's nice to shorten + *
    • It allows referring to columns via a {@code static import}, as it's nice to shorten * the expression in which a column declaration is used. * *
    • We want to preserve the type of the column value (which is determined by the second @@ -88,8 +88,8 @@ *

      Note that {@code myProjectName} is checked to be of {@code ProjectName} type, at the time * of code compilation. * - *

      Also, the snake_case notation used in the declaration of {@code project_name} field. - * As many field names contain at least two words, such an approach allows to easily distinguish + *

      Also, note the snake_case notation used in the declaration of the {@code project_name} field. + * As many field names contain at least two words, such an approach allows easily distinguishing * a field from a Java variable holding a value to which the field values are compared * ({@code myProjectName} in the example above). * diff --git a/base/src/main/java/io/spine/query/RecordQueryBuilder.java b/base/src/main/java/io/spine/query/RecordQueryBuilder.java index 810581b7cd..15db42a67e 100644 --- a/base/src/main/java/io/spine/query/RecordQueryBuilder.java +++ b/base/src/main/java/io/spine/query/RecordQueryBuilder.java @@ -74,7 +74,7 @@ public RecordQuery build() { * Builds a query on top of this record query builder and transforms it according * to the logic of the passed transformer. * - *

      This method is a syntax sugar for a convenient method chaining for those who wishes to use + *

      This method is a syntax sugar for a convenient method chaining for those who wish to use * the produced query in their own transformation flow. * * @param transformer diff --git a/base/src/main/java/io/spine/query/SortBy.java b/base/src/main/java/io/spine/query/SortBy.java index 9e6c4bfa1d..01946daaa6 100644 --- a/base/src/main/java/io/spine/query/SortBy.java +++ b/base/src/main/java/io/spine/query/SortBy.java @@ -46,7 +46,7 @@ public final class SortBy, R extends Message> { private final Direction direction; /** - * Creates an sorting directive for the given column in a given direction. + * Creates a sorting directive for the given column in a given direction. */ SortBy(C column, Direction direction) { this.column = column; diff --git a/base/src/main/java/io/spine/query/Subject.java b/base/src/main/java/io/spine/query/Subject.java index 7cbe2e2543..faeb64cb26 100644 --- a/base/src/main/java/io/spine/query/Subject.java +++ b/base/src/main/java/io/spine/query/Subject.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 @@ -90,14 +90,14 @@ public Class idType() { } /** - * Returns the criteria put on the identifiers of matched record. + * Returns the criteria put on the identifiers of the matched record. */ public IdParameter id() { return id; } /** - * Returns the predicates for the fields of matched record. + * Returns the predicates for the fields of the matched record. */ public QueryPredicate predicate() { return predicate; diff --git a/base/src/main/java/io/spine/query/package-info.java b/base/src/main/java/io/spine/query/package-info.java index 9aaca9ca9a..4129a2a65e 100644 --- a/base/src/main/java/io/spine/query/package-info.java +++ b/base/src/main/java/io/spine/query/package-info.java @@ -31,9 +31,9 @@ * *

      A significant part of the Protobuf messages emitted in the Spine-powered applications are * written and read from a persistent storage at some point in their lifecycle. At the same time, - * Spine apps follow the hexagonal architecture. Instead of writing a database-specific code, + * Spine apps follow the hexagonal architecture. Instead of writing database-specific code, * developers deal with an abstraction over a database port. Under these circumstances, - * a convenient language is required to describe the how the message data is saved and retrieved. + * a convenient language is required to describe how the message data is saved and retrieved. * *

      Proto messages may have complex structure that hardly maps to a flat structure of most * relational databases and even some NoSQL storages. Therefore, when a Protobuf message @@ -41,7 +41,7 @@ * serialization mechanism. The resulting record is stored along with its identifier. * It's worth mentioning that the Protobuf binary format makes the records compact in size and * resilient to any future changes made to the declaration of a stored {@code Message}. There - * are more information available on the Protobuf serialization performance + * is more information available on the Protobuf serialization performance * over * the web. * @@ -167,7 +167,7 @@ * .build(); * * - *

      Where {@code someManufacturer} must a value of {@code ManufacturerId} type. In addition + *

      Where {@code someManufacturer} must be a value of {@code ManufacturerId} type. In addition * to {@link io.spine.query.IdCriterion#is(java.lang.Object) is(value)}, the framework also provides * {@link io.spine.query.IdCriterion#in(java.lang.Object[]) in(...values)} and * {@link io.spine.query.IdCriterion#in(java.lang.Iterable) in(Iterable values)} @@ -220,7 +220,7 @@ *

      Entity Queries

      * *

      Among all the stored Protobuf messages, there is a special case. If a message is declared as - * an Entity state, it triggers an additional processing on a build-time. The framework + * an Entity state, it triggers additional processing at build-time. The framework * automatically extends the Java types generated for Entity states with more Entity-specific API. * *

      Let's consider a message: @@ -319,8 +319,8 @@ * *

      In addition to the columns declared in the Entity state, the query API allows declaring * the custom columns. They are intended to handle the cases in which some computed on-the-fly data - * should be stored along with the record. It may the time of entity creation, the role of the - * user created the record, whether the entity is deleted or archived etc. That is, something + * should be stored along with the record. It may be the time of entity creation, the role of the + * user who created the record, whether the entity is deleted or archived, etc. That is, something * that isn't included into the definition of the original {@code Message} type of the record. * *

      @@ -413,7 +413,7 @@
        * 

      If a Proto message declares an Entity state with no columns, the framework still requires * at least one field declared. As described above, it is treated as an Entity identifier. * Therefore, both {@code QueryBuilder} and {@code Query} are generated for this case, allowing - * to query the Entity state records by their identifiers. + * querying the Entity state records by their identifiers. * *

      Further reading

      * diff --git a/base/src/main/java/io/spine/string/Stringifier.java b/base/src/main/java/io/spine/string/Stringifier.java index c98a0747cd..74d7473e05 100644 --- a/base/src/main/java/io/spine/string/Stringifier.java +++ b/base/src/main/java/io/spine/string/Stringifier.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 @@ -29,7 +29,7 @@ import com.google.common.base.Converter; /** - * Serves as converter from {@code I} to {@code String} with an associated + * Serves as a converter from {@code I} to {@code String} with an associated * reverse function from {@code String} to {@code I}. * *

      It is used for converting back and forth between the different @@ -42,12 +42,12 @@ public abstract class Stringifier extends Converter { /** - * Convert the thing to a string. + * Converts the thing to a string. */ protected abstract String toString(T obj); /** - * Convert the string back to a thing. + * Converts the string back to a thing. */ protected abstract T fromString(String s); diff --git a/base/src/main/java/io/spine/type/EnumType.java b/base/src/main/java/io/spine/type/EnumType.java index 9fc5c7f716..7e339f3b8b 100644 --- a/base/src/main/java/io/spine/type/EnumType.java +++ b/base/src/main/java/io/spine/type/EnumType.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 @@ -76,7 +76,7 @@ public static EnumType create(EnumDescriptor descriptor) { } @SuppressWarnings("MethodWithMultipleLoops") - // Need to go through top level enums and those nested messages. + // Need to go through top-level enums and those nested messages. public static TypeSet allFrom(FileDescriptor file) { checkNotNull(file); var result = TypeSet.newBuilder(); diff --git a/base/src/main/java/io/spine/type/KnownTypes.java b/base/src/main/java/io/spine/type/KnownTypes.java index 213acbe793..a518704e57 100644 --- a/base/src/main/java/io/spine/type/KnownTypes.java +++ b/base/src/main/java/io/spine/type/KnownTypes.java @@ -1,5 +1,5 @@ /* - * Copyright 2024, 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. @@ -239,7 +239,7 @@ public Set allFromPackage(String packageName) { } /** - * Shows if the given {@link TypeUrl} is known the system. + * Shows if the given {@link TypeUrl} is known to the system. * * @param typeUrl * the {@code TypeUrl} to look up diff --git a/base/src/main/java/io/spine/type/MessageType.java b/base/src/main/java/io/spine/type/MessageType.java index 8f5f655a31..327db6dcf0 100644 --- a/base/src/main/java/io/spine/type/MessageType.java +++ b/base/src/main/java/io/spine/type/MessageType.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 @@ -340,11 +340,11 @@ public Optional leadingComments() { } /** - * Obtains a leading comments by the {@link LocationPath}. + * Obtains the leading comments for the {@link LocationPath}. * *

      This method logs a warning message if the file declaring this message type does not have * {@linkplain FileDescriptorProto#hasSourceCodeInfo() source code info} - * produced ty Protobuf compiler. The warning message provides instructions for configuring + * produced by Protobuf compiler. The warning message provides instructions for configuring * the Protobuf Gradle plugin for enabling source code info. * * @param locationPath @@ -366,7 +366,7 @@ public Optional leadingComments(LocationPath locationPath) { } /** - * Obtain file descriptor via {@link KnownTypes} because it loads descriptor set file, + * Obtains a file descriptor via {@link KnownTypes} because it loads a descriptor set file, * which may contain source code information. * *

      Descriptors available in the generated code -- obtained via diff --git a/base/src/main/java/io/spine/type/Type.java b/base/src/main/java/io/spine/type/Type.java index 336149a0d3..02a1f4a50a 100644 --- a/base/src/main/java/io/spine/type/Type.java +++ b/base/src/main/java/io/spine/type/Type.java @@ -134,7 +134,7 @@ public Class javaClass() { public abstract ClassName javaClassName(); /** - * Obtains package for the corresponding Java type. + * Obtains the package for the corresponding Java type. */ public PackageName javaPackage() { var file = descriptor.getFile().toProto(); @@ -143,7 +143,7 @@ public PackageName javaPackage() { } /** - * Obtains simple class name for corresponding Java type. + * Obtains the simple class name for the corresponding Java type. */ public final SimpleClassName simpleJavaClassName() { return javaClassName().toSimple(); diff --git a/base/src/main/java/io/spine/type/TypeName.java b/base/src/main/java/io/spine/type/TypeName.java index 1a621d68ba..b2f10820f6 100644 --- a/base/src/main/java/io/spine/type/TypeName.java +++ b/base/src/main/java/io/spine/type/TypeName.java @@ -1,5 +1,5 @@ /* - * Copyright 2024, 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. @@ -78,7 +78,7 @@ public static TypeName of(String typeName) { } /** - * Obtain a type name from the given type URL. + * Obtains a type name from the given type URL. */ public static TypeName from(TypeUrl typeUrl) { checkNotNull(typeUrl); diff --git a/base/src/main/java/io/spine/type/TypeUrl.java b/base/src/main/java/io/spine/type/TypeUrl.java index 6e5538b07c..e2e224adf7 100644 --- a/base/src/main/java/io/spine/type/TypeUrl.java +++ b/base/src/main/java/io/spine/type/TypeUrl.java @@ -82,7 +82,7 @@ private TypeUrl(String prefix, String typeName) { } /** - * Create new {@code TypeUrl}. + * Creates a new {@code TypeUrl}. */ private static TypeUrl create(String prefix, String typeName) { return new TypeUrl(prefix, typeName); @@ -218,7 +218,7 @@ public static TypeUrl of(Class cls) { *

      If the type is a standard proto type, the {@linkplain Prefix#GOOGLE_APIS standard prefix} * is returned. * - *

      For custom times, returns the value specified in the {@linkplain + *

      For custom types, returns the value specified in the {@linkplain * OptionsProto#typeUrlPrefix file option}. */ private static String prefixFor(GenericDescriptor descriptor) { @@ -280,7 +280,7 @@ public TypeName typeName() { } /** - * Obtains string representation of the URL. + * Obtains the string representation of the URL. */ public String value() { var result = composeTypeUrl(prefix, typeName.value()); diff --git a/base/src/main/java/io/spine/type/UnexpectedTypeException.java b/base/src/main/java/io/spine/type/UnexpectedTypeException.java index 5b445d3e14..0fa6e0c39f 100644 --- a/base/src/main/java/io/spine/type/UnexpectedTypeException.java +++ b/base/src/main/java/io/spine/type/UnexpectedTypeException.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 @@ -51,7 +51,7 @@ public UnexpectedTypeException(Throwable cause) { } /** - * Creates an instance {@code UnexpectedTypeException} with the expected and actual type URLs. + * Creates an instance of {@code UnexpectedTypeException} with the expected and actual type URLs. */ public UnexpectedTypeException(TypeUrl expected, TypeUrl actual) { super(formatMsg(expected, actual)); diff --git a/base/src/main/java/io/spine/value/StringTypeValue.java b/base/src/main/java/io/spine/value/StringTypeValue.java index f8335ebd9d..63345a5984 100644 --- a/base/src/main/java/io/spine/value/StringTypeValue.java +++ b/base/src/main/java/io/spine/value/StringTypeValue.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 @@ -44,7 +44,7 @@ protected StringTypeValue(String value) { } /** - * Returns {@code true} the length of the {@link #value() value} is zero, + * Returns {@code true} if the length of the {@link #value() value} is zero, * {@code false} otherwise. */ public boolean isEmpty() { diff --git a/base/src/main/kotlin/io/spine/base/EntityState.kt b/base/src/main/kotlin/io/spine/base/EntityState.kt index 81645253d9..26dab1e45f 100644 --- a/base/src/main/kotlin/io/spine/base/EntityState.kt +++ b/base/src/main/kotlin/io/spine/base/EntityState.kt @@ -35,7 +35,7 @@ import com.google.errorprone.annotations.Immutable * * The `kind` of the entity state defines the actual interface of the entity state * that could be this interface or one that extends it. - * If the `kind` is [ENTITY][io.spine.option.EntityOption.Kind.ENTITY] the generated + * If the `kind` is [ENTITY][io.spine.option.EntityOption.Kind.ENTITY], the generated * message will implement this interface. Otherwise, it would be one of the subinterfaces. * For example, if the `kind` is [PROJECTION][io.spine.option.EntityOption.Kind.PROJECTION], * the generated message will implement [ProjectionState]. diff --git a/base/src/main/kotlin/io/spine/base/FieldPathExts.kt b/base/src/main/kotlin/io/spine/base/FieldPathExts.kt index 33c4fe6002..e780b475c4 100644 --- a/base/src/main/kotlin/io/spine/base/FieldPathExts.kt +++ b/base/src/main/kotlin/io/spine/base/FieldPathExts.kt @@ -1,5 +1,5 @@ /* - * Copyright 2024, 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. @@ -102,7 +102,7 @@ public val FieldPath.root: String /** * Obtains the path immediately nested into this one. * - * @throws IllegalStateException if this path is not tested. + * @throws IllegalStateException if this path is not nested. */ public fun FieldPath.stepInto(): FieldPath = fieldPath { check(isNested) { diff --git a/base/src/main/kotlin/io/spine/base/ThrowableExts.kt b/base/src/main/kotlin/io/spine/base/ThrowableExts.kt index 9ab649e52c..117ae0e104 100644 --- a/base/src/main/kotlin/io/spine/base/ThrowableExts.kt +++ b/base/src/main/kotlin/io/spine/base/ThrowableExts.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 @@ -31,7 +31,7 @@ package io.spine.base import com.google.common.base.Throwables.getRootCause /** - * Tells if this throwable was cased by a [RejectionThrowable]. + * Tells if this throwable was caused by a [RejectionThrowable]. */ public fun T.causedByRejection(): Boolean = getRootCause(this) is RejectionThrowable diff --git a/base/src/main/kotlin/io/spine/code/proto/DescriptorSetReferenceFile.kt b/base/src/main/kotlin/io/spine/code/proto/DescriptorSetReferenceFile.kt index a945fddeba..ad6b80b71e 100644 --- a/base/src/main/kotlin/io/spine/code/proto/DescriptorSetReferenceFile.kt +++ b/base/src/main/kotlin/io/spine/code/proto/DescriptorSetReferenceFile.kt @@ -73,7 +73,7 @@ public object DescriptorSetReferenceFile { } /** - * Create a reference file pointing to the given descriptor set file. + * Creates a reference file pointing to the given descriptor set file. * * If the reference file already exists, it will be overwritten. * diff --git a/base/src/main/kotlin/io/spine/code/proto/FieldDescriptorProtoExts.kt b/base/src/main/kotlin/io/spine/code/proto/FieldDescriptorProtoExts.kt index fb528ee628..9b565a5689 100644 --- a/base/src/main/kotlin/io/spine/code/proto/FieldDescriptorProtoExts.kt +++ b/base/src/main/kotlin/io/spine/code/proto/FieldDescriptorProtoExts.kt @@ -58,7 +58,7 @@ public fun FieldDescriptorProto.isMap(): Boolean = * * For example, a proto field with the name 'word_dictionary' has 'wordDictionary' JSON name. * Every map field has a corresponding entry type. - * For 'word_dictionary' it would be 'WordDictionaryEntry' + * For 'word_dictionary' it would be 'WordDictionaryEntry'. * * @return the name of the map field. */ diff --git a/base/src/main/kotlin/io/spine/compare/ProtoComparators.kt b/base/src/main/kotlin/io/spine/compare/ProtoComparators.kt index 6a44ebf82c..209c8def95 100644 --- a/base/src/main/kotlin/io/spine/compare/ProtoComparators.kt +++ b/base/src/main/kotlin/io/spine/compare/ProtoComparators.kt @@ -1,5 +1,5 @@ /* - * Copyright 2024, 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. @@ -33,7 +33,7 @@ import com.google.protobuf.util.Durations import com.google.protobuf.util.Timestamps /** - * Registers comparators provided by `protobuf-java-util` library + * Registers comparators provided by the `protobuf-java-util` library * for `Timestamp` and `Duration` types. */ @AutoService(ComparatorProvider::class) diff --git a/base/src/main/kotlin/io/spine/io/Delete.kt b/base/src/main/kotlin/io/spine/io/Delete.kt index c630cb00c7..b0b06461f6 100644 --- a/base/src/main/kotlin/io/spine/io/Delete.kt +++ b/base/src/main/kotlin/io/spine/io/Delete.kt @@ -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. @@ -38,7 +38,7 @@ import java.nio.file.Path * * This method creates a new `Thread` for deleting the passed directory. * That's why calling it should not be taken lightly. If your application creates - * several directories that need to be removed when JVM is terminated, consider + * several directories that need to be removed when the JVM is terminated, consider * gathering them under a common root passed to this method. * * @see Runtime.addShutdownHook diff --git a/base/src/main/kotlin/io/spine/io/Ensure.kt b/base/src/main/kotlin/io/spine/io/Ensure.kt index 3ea28cebd4..d0898eeb0a 100644 --- a/base/src/main/kotlin/io/spine/io/Ensure.kt +++ b/base/src/main/kotlin/io/spine/io/Ensure.kt @@ -47,7 +47,7 @@ import kotlin.io.path.isDirectory * If the given file does not exist, it is created along with its parent directories, * if required. * - * If the passed [File] points to the existing directory, an + * If the passed [File] points to an existing directory, an * [IllegalArgumentException] is thrown. * * In case of any I/O issues, the respective exceptions are rethrown as diff --git a/base/src/main/kotlin/io/spine/protobuf/DescriptorExts.kt b/base/src/main/kotlin/io/spine/protobuf/DescriptorExts.kt index 22ce137c64..b2695ea14c 100644 --- a/base/src/main/kotlin/io/spine/protobuf/DescriptorExts.kt +++ b/base/src/main/kotlin/io/spine/protobuf/DescriptorExts.kt @@ -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 @@ -47,7 +47,7 @@ public fun Descriptor.field(number: Int): FieldDescriptor? = findFieldByNumber(n * The method filters synthetic descriptors created for map fields. * A descriptor of a map field entry is named after the name of the field * with the `"Entry"` suffix. - * We use this convention for filtering [Descriptor.nestedTypes] returned by Protobuf API. + * We use this convention for filtering [Descriptor.nestedTypes] returned by the Protobuf API. * * @see * Protobuf documentation diff --git a/base/src/main/kotlin/io/spine/protobuf/MessageExts.kt b/base/src/main/kotlin/io/spine/protobuf/MessageExts.kt index d831b3c6c0..8e2ac0af58 100644 --- a/base/src/main/kotlin/io/spine/protobuf/MessageExts.kt +++ b/base/src/main/kotlin/io/spine/protobuf/MessageExts.kt @@ -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. @@ -76,7 +76,7 @@ private object DefaultInstanceValue : ClassValue() { https://discuss.kotlinlang.org/t/does-kotlin-have-multi-catch/486/39 We expect `UncheckedExecutionException` or `NoSuchMethodException` if the passed class is just `Class` or another non-generated `Message` class - which does not have a static method `getDefaultInstance()`. + that does not have a static method `getDefaultInstance()`. */ public fun builderFor(cls: Class): Message.Builder { return try { diff --git a/base/src/main/kotlin/io/spine/protobuf/ProtoConverter.kt b/base/src/main/kotlin/io/spine/protobuf/ProtoConverter.kt index 1b85b867b2..35aedeb25e 100644 --- a/base/src/main/kotlin/io/spine/protobuf/ProtoConverter.kt +++ b/base/src/main/kotlin/io/spine/protobuf/ProtoConverter.kt @@ -48,12 +48,12 @@ internal abstract class ProtoConverter : Converter() override fun doBackward(t: T): M = toMessage(t) /** - * Converts supplied `input` message into a typed object. + * Converts the supplied `input` message into a typed object. */ protected abstract fun toObject(input: M): T /** - * Converts supplied `input` object into a Protobuf message. + * Converts the supplied `input` object into a Protobuf message. */ protected abstract fun toMessage(input: T): M diff --git a/base/src/main/kotlin/io/spine/security/InvocationGuard.kt b/base/src/main/kotlin/io/spine/security/InvocationGuard.kt index 2025a340c8..1f526eca2d 100644 --- a/base/src/main/kotlin/io/spine/security/InvocationGuard.kt +++ b/base/src/main/kotlin/io/spine/security/InvocationGuard.kt @@ -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. @@ -36,7 +36,7 @@ import org.checkerframework.checker.signature.qual.FullyQualifiedName public object InvocationGuard { /** - * Throws [SecurityException] of the calling class is not that passed. + * Throws [SecurityException] if the calling class is not that passed. */ @JvmStatic public fun allowOnly(allowedCallerClass: @FullyQualifiedName String) { @@ -47,7 +47,7 @@ public object InvocationGuard { } /** - * Throws [SecurityException] of the calling class is not among the named. + * Throws [SecurityException] if the calling class is not among the named. */ @JvmStatic public fun allowOnly( diff --git a/base/src/main/kotlin/io/spine/string/CharSequenceExts.kt b/base/src/main/kotlin/io/spine/string/CharSequenceExts.kt index 1a3901a88b..93d259cc07 100644 --- a/base/src/main/kotlin/io/spine/string/CharSequenceExts.kt +++ b/base/src/main/kotlin/io/spine/string/CharSequenceExts.kt @@ -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 @@ -96,7 +96,7 @@ public fun CharSequence.revealLineSeparators(): String { } /** - * Replaces line separators in this sequence taking the replacement test as the result + * Replaces line separators in this sequence taking the replacement text as the result * of the given function on a [Separator]. * * If there are no separators in this sequence, returns [this]. Otherwise, the sequence is diff --git a/base/src/main/kotlin/io/spine/string/Indent.kt b/base/src/main/kotlin/io/spine/string/Indent.kt index fdda6a04a2..7b329ffa51 100644 --- a/base/src/main/kotlin/io/spine/string/Indent.kt +++ b/base/src/main/kotlin/io/spine/string/Indent.kt @@ -77,7 +77,7 @@ public data class Indent( * The default size of indentation used in the Proto Text output. * * Two spaces are used for indentation in `TextFormat.TextGenerator.indent()`, - * which is private in Protobuf library. + * which is private in the Protobuf library. * * @see Protobuf * Text Format Language Specification diff --git a/base/src/main/kotlin/io/spine/string/Stringify.kt b/base/src/main/kotlin/io/spine/string/Stringify.kt index aa6bde343f..6db5f5c4e5 100644 --- a/base/src/main/kotlin/io/spine/string/Stringify.kt +++ b/base/src/main/kotlin/io/spine/string/Stringify.kt @@ -84,7 +84,7 @@ public inline fun mapStringifier( /** * Utility object for working with `Stringifier`s. * - * **API Note**: This object is Kotlin port of the `Stringifiers` class from Java. + * **API Note**: This object is a Kotlin port of the `Stringifiers` class from Java. * It is kept as an object, rather than a group of top-level functions, to preserve backward * compatibility with the existing Java code. It is expected that it will be gradually * migrated to top-level functions with an appropriate deprecation cycle. @@ -121,7 +121,7 @@ public object Stringifiers { * This method must be used if the passed object is a generic type. * * @param obj - * to object to convert. + * the object to convert. * @param typeOfT * the type of the passed object. * @param T @@ -232,7 +232,7 @@ public object Stringifiers { public fun forDuration(): Stringifier = DurationStringifier.getInstance() /** - * Obtains a stringifier that coverts a Timestamp into to RFC 3339 date string format. + * Obtains a stringifier that converts a Timestamp into RFC 3339 date string format. * * @see com.google.protobuf.util.Timestamps.toString * @see com.google.protobuf.util.Timestamps.parse diff --git a/base/src/main/kotlin/io/spine/string/Strings.kt b/base/src/main/kotlin/io/spine/string/Strings.kt index 88cd5b36eb..75011c0b5a 100644 --- a/base/src/main/kotlin/io/spine/string/Strings.kt +++ b/base/src/main/kotlin/io/spine/string/Strings.kt @@ -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. @@ -46,7 +46,7 @@ public fun Iterable.camelCase(): String = filter { it.isNotBlank() }.joinToString(separator = "") { it.titleCase() } /** - * A diagnostic extension allowing to print an `Iterable` into a string enclosing + * A diagnostic extension allowing printing an `Iterable` into a string enclosing * the elements with backticks and separating them with commas. */ public fun Iterable.joinBackticked(): String = @@ -119,7 +119,7 @@ public fun String.trimWhitespace(): String { * This may cause issues when writing generated texts under Windows. * * If you could not find a replacement for system-dependent line separation in - * `io.spine.string` package, please use this function after a Kotlin string utility call. + * the `io.spine.string` package, please use this function after a Kotlin string utility call. * * @see String.pi * @see String.tm @@ -181,7 +181,7 @@ public fun String.toBase64Encoded(): String { } /** - * Decodes Base64-encoded value into a string with UTF-8 charset. + * Decodes a Base64-encoded value into a string with UTF-8 charset. * * @see Base64 */ diff --git a/base/src/main/kotlin/io/spine/type/ProtoTextExts.kt b/base/src/main/kotlin/io/spine/type/ProtoTextExts.kt index 0f3e6cf55a..f61b021642 100644 --- a/base/src/main/kotlin/io/spine/type/ProtoTextExts.kt +++ b/base/src/main/kotlin/io/spine/type/ProtoTextExts.kt @@ -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. @@ -84,7 +84,7 @@ public fun MessageOrBuilder.printToString(): String = * * The output starts with the fully qualified name of the message type, followed * by a curly brace. Then follows the [text about the fields][printToString] indented - * with to spaces. The output closes by a curly brace on the new line. + * with two spaces. The output closes by a curly brace on the new line. * * The output is produced using [TypeRegistry] populated with [KnownTypes]. * diff --git a/base/src/main/proto/spine/base/field_path.proto b/base/src/main/proto/spine/base/field_path.proto index 6ee1bc7cfc..1dbde95a15 100644 --- a/base/src/main/proto/spine/base/field_path.proto +++ b/base/src/main/proto/spine/base/field_path.proto @@ -1,5 +1,5 @@ /* - * Copyright 2024, 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. @@ -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. */ + syntax = "proto3"; package spine.base; @@ -49,7 +50,7 @@ option java_multiple_files = true; // string name = 1; // } // -// The field path for `name` field of the `User` message enclosed into the `CustomerAccount` +// The field path for the `name` field of the `User` message enclosed into the `CustomerAccount` // is ["user", "name"]. // message FieldPath { diff --git a/base/src/main/proto/spine/options.proto b/base/src/main/proto/spine/options.proto index 7700740784..254fe0f167 100644 --- a/base/src/main/proto/spine/options.proto +++ b/base/src/main/proto/spine/options.proto @@ -1,5 +1,5 @@ /* - * Copyright 2024, 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. @@ -23,12 +23,13 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + 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: // // option (internal) = true; // @@ -39,11 +40,11 @@ syntax = "proto3"; // Custom Type Prefix Option // ------------------------- -// The custom `type_url_prefix` option allows to define specify custom type URL prefix for messages +// The custom `type_url_prefix` option allows specifying a custom type URL prefix for messages // defined in a proto file. This option is declared in this file. Other proto files must import // `options.proto` to be able to specify custom type URL prefix. // -// It is recommended that the import statement is provided before the line with `type_url_prefix` +// It is recommended that the import statement is provided before the line with the `type_url_prefix` // option to make it obvious that custom option is defined in the imported file. // // For example: @@ -212,7 +213,7 @@ extend google.protobuf.FieldOptions { // } // ``` // - // 3. For map fields: each value in the map must meet the constraints of message type. + // 3. For map fields: each value in the map must meet the constraints of its message type. // Note: Protobuf does not allow messages to be used as map keys. // // Example: @@ -308,7 +309,7 @@ extend google.protobuf.FieldOptions { // // Once set, the `id` field cannot be changed. // - // Use `(if_set_again).error_msg` option to specify a custom error message that will be used for + // Use the `(if_set_again).error_msg` option to specify a custom error message that will be used for // composing the error upon attempting to re-assign the field value. Refer to the documentation // for the corresponding option for an example of its usage. // @@ -368,10 +369,10 @@ extend google.protobuf.FieldOptions { // IfHasDuplicatesOption if_has_duplicates = 73828; - // The option to indicate that a numeric field is required to have a value which belongs + // The option to indicate that a numeric field is required to have a value that belongs // to the specified bounded range. // - // For unbounded ranges, please use `(min)` and `(max) options. + // For unbounded ranges, please use `(min)` and `(max)` options. // RangeOption range = 73829; @@ -380,7 +381,7 @@ extend google.protobuf.FieldOptions { // API Annotations //----------------- - // Indicates a field which is internal to Spine, not part of the public API, and should not be + // Indicates a field that is internal to Spine, not part of the public API, and should not be // used by users of the framework. // // If you plan to implement an extension of the framework, which is going to be @@ -413,7 +414,7 @@ extend google.protobuf.FieldOptions { // bool beta = 73853; - // Marks an entity state field as column. + // Marks an entity state field as a column. // // The column fields are stored separately from the entity record and can be specified as // filtering criteria during entity querying. @@ -425,13 +426,13 @@ extend google.protobuf.FieldOptions { // int32 year_of_registration = 8 [(column) = true]; // } // - // The `year_of_registration` field value can then be used as query parameter when reading + // The `year_of_registration` field value can then be used as a query parameter when reading // entities of `UserProfile` type from the server side. // // The value of a column field can be updated in two ways: // // 1. In the receptors of the entity, just like any other part of entity state. - // 2. Using the language-specific tools like `EntityWithColumns` interface in Java. + // 2. Using the language-specific tools like the `EntityWithColumns` interface in Java. // // All column fields are considered optional by the framework. // @@ -496,9 +497,9 @@ extend google.protobuf.MessageOptions { // // WARNING: This option is deprecated and is scheduled for removal in Spine v2.0.0. // - // Allows to re-define validation constraints for a message when its usage as a field of + // Allows re-defining validation constraints for a message when its usage as a field of // another type requires alternative constraints. This includes definition of constraints for - // a message which does not have them defined within the type. + // a message that does not have them defined within the type. // // A target field of an external constraint should be specified using a fully-qualified // field name (e.g. `mypackage.MessageName.field_name`). @@ -552,7 +553,7 @@ extend google.protobuf.MessageOptions { // string new_value = 2 [(required) = true]; // } // - // NOTE: A target field for an external validation constraint must be have the option `(validate)` + // NOTE: A target field for an external validation constraint must have the option `(validate)` // set to `true`. See the definition of the `RenameTask.change` field in the example // above. If there is no such option defined, or it is set to `false`, the external // constraint will not be applied. @@ -590,17 +591,17 @@ extend google.protobuf.MessageOptions { // 2. The type is internal to a bounded context, artifact of which exposes the type to // the outside world (presumably for historical reasons). // - // The type with such an option can be used only inside the bounded context which declares it. + // The type with such an option can be used only inside the bounded context that declares it. // // The type must not be used neither for inbound (i.e. being sent to the bounded context - // which declares this type) nor for outbound communication (i.e. being sent by this + // that declares this type) nor for outbound communication (i.e. being sent by this // bounded context outside). // // An attempt to violate these usage restrictions will result in a runtime error. // bool internal_type = 73911; - // Indicates a file which contains elements of Service Provider Interface (SPI). + // Indicates a file that contains elements of Service Provider Interface (SPI). bool SPI_type = 73912; // Indicates a public API that can change at any time, and has no guarantee of @@ -611,7 +612,7 @@ extend google.protobuf.MessageOptions { // in a future release. bool beta_type = 73914; - // Specifies a characteristic inherent in the the given message type. + // Specifies a characteristic inherent in the given message type. // // Example: using `(is)` message option. // @@ -624,7 +625,7 @@ extend google.protobuf.MessageOptions { // In the example above, `CreateProject` message is a `ProjectCommand`. // // To specify a characteristic for every message in a `.proto` file, - // please use `(every_is)` file option. + // please use the `(every_is)` file option. // // If both `(is)` and `(every_is)` options are applicable for a type, both are applied. // @@ -662,7 +663,7 @@ extend google.protobuf.FileOptions { // string type_url_prefix = 73941; - // Indicates a file which contains types usage of which is restricted. + // Indicates a file that contains types usage of which is restricted. // // For more information on such restrictions please see the documentation of // the type option called `internal_type`. @@ -673,13 +674,13 @@ extend google.protobuf.FileOptions { // bool internal_all = 73942; - // Indicates a file which contains elements of Service Provider Interface (SPI). + // Indicates a file that contains elements of Service Provider Interface (SPI). // // This option applies to messages, enums, and services. // bool SPI_all = 73943; - // Indicates a file declaring public data type API which that can change at any time, + // Indicates a file declaring public data type API that can change at any time, // has no guarantee of API stability and backward-compatibility. // // If a file contains a declaration of a `service`, this option will NOT be applied to it. @@ -717,7 +718,7 @@ extend google.protobuf.FileOptions { // In the example above, `CreateProject`, `CreateProject.WithAssignee`, and `DeleteProject` // messages are `ProjectCommand`-s. // - // To specify a characteristic for a single message, please use `(is)` message option. + // To specify a characteristic for a single message, please use the `(is)` message option. // If both `(is)` and `(every_is)` options are applicable for a type, both are applied. // // When targeting Java, specify the name of a Java interface to be implemented by these @@ -945,7 +946,7 @@ message MaxOption { // string value = 1; - // Specifies if the field should be strictly less than the specified maximum + // Specifies if the field should be strictly less than the specified maximum. // // The default value is false, i.e. the bound is inclusive. // @@ -997,7 +998,7 @@ message PatternOption { // https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/regex/Pattern.html // // Note: in Java, regex patterns are not wrapped in explicit delimiters like in Perl or PHP. - // Instead, the pattern is provided as a string literal. Therefore, `/` symbol does not need + // Instead, the pattern is provided as a string literal. Therefore, the `/` symbol does not need // to be escaped. // // The provided string literal is passed directly to the regex engine. So, it must be exactly @@ -1044,9 +1045,9 @@ message PatternOption { // bool dot_all = 1; - // Allows to ignore the case of the matched symbols. + // Allows ignoring the case of the matched symbols. // - // For example, this modifier is specified, string `ABC` would be a complete match for + // For example, if this modifier is specified, string `ABC` would be a complete match for // the regex `[a-z]+`. // // On some platforms may be represented by the `i` flag. @@ -1060,7 +1061,7 @@ message PatternOption { // bool multiline = 3; - // Enables matching the whole UTF-8 sequences, + // Enables matching the whole UTF-8 sequences. // // On some platforms may be represented by the `u` flag. // @@ -1072,8 +1073,8 @@ message PatternOption { // By default, a string only matches a pattern if it is a full match, i.e. there are no // unaccounted for leading and/or trailing characters. // - // This modifier is usually not represented programming languages, as the control over - // weather to match an entire string or only its part is provided to the user by other + // This modifier is usually not represented in programming languages, as the control over + // whether to match an entire string or only its part is provided to the user by other // language means. For example, in Java, this would be the difference between methods // `matches()` and `find()` of the `java.util.regex.Matcher` class. // @@ -1087,7 +1088,7 @@ message PatternOption { // message IfInvalidOption { - // Do not specify error message for `(validate)`, it is no longer used by + // Do not specify an error message for `(validate)`; it is no longer used by // the validation library. option deprecated = true; @@ -1256,7 +1257,7 @@ message EveryIsOption { // When a simple name is set, it is assumed that the interface belongs to // the package of the generated message classes. // - // If the value of the `generate` field is set to `false` the referenced interface must exist. + // If the value of the `generate` field is set to `false`, the referenced interface must exist. // Otherwise, a compilation error will occur. // // If the value of the `generate` field is set to `true`, the framework will @@ -1268,10 +1269,10 @@ message EveryIsOption { string java_type = 2; } -// Defines additional type for a message type in which this option is declared. +// Defines an additional type for a message type in which this option is declared. // // The nature of the type depends on the target programming language. -// For example, the `java_type` property defines a name of the Java interface which +// For example, the `java_type` property defines a name of the Java interface that // the generated message class will implement. // message IsOption { @@ -1398,9 +1399,9 @@ message IfHasDuplicatesOption { string error_msg = 1; } -// Indicate that the numeric field must belong to the specified bounded range. +// Indicates that the numeric field must belong to the specified bounded range. // -// For unbounded ranges, please use `(min)` and `(max) options. +// For unbounded ranges, please use `(min)` and `(max)` options. // // The option supports all singular and repeated numeric fields. // @@ -1535,7 +1536,7 @@ message ChoiceOption { // Declares the field groups, at least one of which must have all of its fields set. // // Unlike the `(required)` field constraint, which requires the presence of -// a specific field, this option allows to specify alternative field groups. +// a specific field, this option allows specifying alternative field groups. // message RequireOption { diff --git a/base/src/test/java/io/spine/base/IdentifierTest.java b/base/src/test/java/io/spine/base/IdentifierTest.java index a02fdda1d8..31daf30e23 100644 --- a/base/src/test/java/io/spine/base/IdentifierTest.java +++ b/base/src/test/java/io/spine/base/IdentifierTest.java @@ -785,7 +785,7 @@ void nullId() { @Nested @DisplayName("recognize field descriptor") - @SuppressWarnings("BadImport") // OK to static-import `Identifier.Type` for brefity. + @SuppressWarnings("BadImport") // OK to static-import `Identifier.Type` for brevity. class FieldDescr { @Test diff --git a/base/src/test/java/io/spine/base/RejectionThrowableTest.java b/base/src/test/java/io/spine/base/RejectionThrowableTest.java index 8e5ada3870..d2ab2fa538 100644 --- a/base/src/test/java/io/spine/base/RejectionThrowableTest.java +++ b/base/src/test/java/io/spine/base/RejectionThrowableTest.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.base; import com.google.protobuf.AbstractMessage; @@ -124,7 +125,7 @@ private TestRejectionThrowable(RejectionMessage rejection) { *

      The message should never evaluated or queried for any fields. The implementation is * completely non-operational. * - *

      In a real world scenario, the message would be generated by the Protobuf Compiler with + *

      In a real-world scenario, the message would be generated by the Protobuf Compiler with * the Spine Protobuf Compiler plugin. However, in this module we're unable to use the plugin, * so this fake implementation is declared. */ diff --git a/base/src/test/java/io/spine/base/given/ConstantTimeProvider.java b/base/src/test/java/io/spine/base/given/ConstantTimeProvider.java index 701cc6de54..811b5ec0e2 100644 --- a/base/src/test/java/io/spine/base/given/ConstantTimeProvider.java +++ b/base/src/test/java/io/spine/base/given/ConstantTimeProvider.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 @@ -30,7 +30,7 @@ import io.spine.base.Time; /** - * The provider of the current time with value that does not change. + * The provider of the current time with a value that does not change. */ public class ConstantTimeProvider implements Time.Provider { diff --git a/base/src/test/java/io/spine/base/given/GivenDurations.java b/base/src/test/java/io/spine/base/given/GivenDurations.java index 3bff664ce7..69a21aa8db 100644 --- a/base/src/test/java/io/spine/base/given/GivenDurations.java +++ b/base/src/test/java/io/spine/base/given/GivenDurations.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 @@ -42,7 +42,7 @@ private static Duration newDuration(int seconds) { .build(); } - /** Prevent instantiation of this test environment. */ + /** Prevents instantiation of this test environment. */ private GivenDurations() { } } diff --git a/base/src/test/java/io/spine/code/proto/given/package-info.java b/base/src/test/java/io/spine/code/proto/given/package-info.java index 2fd2c39fc0..0cb774e35a 100644 --- a/base/src/test/java/io/spine/code/proto/given/package-info.java +++ b/base/src/test/java/io/spine/code/proto/given/package-info.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 @@ -25,7 +25,7 @@ */ /** - * The test environment classes for Protobuf code related tools. + * The test environment classes for Protobuf code-related tools. */ @CheckReturnValue @NullMarked diff --git a/base/src/test/java/io/spine/protobuf/AnyPackerTest.java b/base/src/test/java/io/spine/protobuf/AnyPackerTest.java index 69974cc83d..6ea390b8c2 100644 --- a/base/src/test/java/io/spine/protobuf/AnyPackerTest.java +++ b/base/src/test/java/io/spine/protobuf/AnyPackerTest.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,10 +59,10 @@ @DisplayName("AnyPacker utility class should") class AnyPackerTest extends UtilityClassTest { - /** A message with type URL standard to Google Protobuf. */ + /** A message with a type URL standard to Google Protobuf. */ private final StringValue googleMsg = StringValue.of(newUuid()); - /** A message with different type URL. */ + /** A message with a different type URL. */ private final MessageToPack spineMsg = MessageToPack.newBuilder() .setValue(newUuidValue()) .build(); diff --git a/base/src/test/java/io/spine/protobuf/GoogleTypesTest.kt b/base/src/test/java/io/spine/protobuf/GoogleTypesTest.kt index e51a347da9..7b3483d9be 100644 --- a/base/src/test/java/io/spine/protobuf/GoogleTypesTest.kt +++ b/base/src/test/java/io/spine/protobuf/GoogleTypesTest.kt @@ -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 @@ -40,7 +40,7 @@ internal class GoogleTypesTest { Starting from v3.22.0 Google Protobuf for Java (`protobuf-java-3.22.0.jar`) no longer contains the `plugin.proto`. The file is still present in the Protobuf source code tree - under `protobuf/src/google/protobuf/compiler/` directory, but it does not seem to be + under the `protobuf/src/google/protobuf/compiler/` directory, but it does not seem to be present in artifacts produced for Java. The references to `plugin.proto` are present in build files for C++. So, it could be an diff --git a/base/src/test/java/io/spine/protobuf/TypeConverterTest.java b/base/src/test/java/io/spine/protobuf/TypeConverterTest.java index 4512eb4964..4b4f2949e0 100644 --- a/base/src/test/java/io/spine/protobuf/TypeConverterTest.java +++ b/base/src/test/java/io/spine/protobuf/TypeConverterTest.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 @@ -234,7 +234,7 @@ private void checkConverts(EnumValue enumValue, Enum expected) { @Nested @DisplayName("throw an `IAE` when") - @SuppressWarnings("CheckReturnValue") // The method is called to throw exception. + @SuppressWarnings("CheckReturnValue") // The method is called to throw an exception. class ThrowIAEOnEnumConversion { @Test diff --git a/base/src/test/java/io/spine/query/QueryPredicateTest.java b/base/src/test/java/io/spine/query/QueryPredicateTest.java index 3bdc78eabe..2a9f606ccb 100644 --- a/base/src/test/java/io/spine/query/QueryPredicateTest.java +++ b/base/src/test/java/io/spine/query/QueryPredicateTest.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 @@ -125,7 +125,7 @@ void returnDnfPredicateAsIs() { } /** - * Tests the transformation of an deeply nested predicate into a predicate in DNF. + * Tests the transformation of a deeply nested predicate into a predicate in DNF. * *

      Source: * {@code diff --git a/base/src/test/java/io/spine/query/given/RecordQueryBuilderTestEnv.java b/base/src/test/java/io/spine/query/given/RecordQueryBuilderTestEnv.java index eb77d10816..7f1ca9e3e3 100644 --- a/base/src/test/java/io/spine/query/given/RecordQueryBuilderTestEnv.java +++ b/base/src/test/java/io/spine/query/given/RecordQueryBuilderTestEnv.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 @@ -113,7 +113,7 @@ public static void assertNoSortingMaskLimit(RecordQuery> list, RecordColumn column, diff --git a/base/src/test/java/io/spine/string/TimestampStringifierTest.java b/base/src/test/java/io/spine/string/TimestampStringifierTest.java index 083be750f9..297b3b10ff 100644 --- a/base/src/test/java/io/spine/string/TimestampStringifierTest.java +++ b/base/src/test/java/io/spine/string/TimestampStringifierTest.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 Timestamp createObject() { @Test @DisplayName("throw `IllegalArgumentException` when parsing unsupported format") void parsingError() { - // This uses TextFormat printing, for the output which won't be parsable. + // This uses TextFormat printing, for the output that won't be parsable. var time = currentTime().toString(); assertIllegalArgument(() -> fromString(time, Timestamp.class)); } diff --git a/base/src/test/kotlin/io/spine/LoggingSmokeTest.kt b/base/src/test/kotlin/io/spine/LoggingSmokeTest.kt index 937312a018..dde6aefb0c 100644 --- a/base/src/test/kotlin/io/spine/LoggingSmokeTest.kt +++ b/base/src/test/kotlin/io/spine/LoggingSmokeTest.kt @@ -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 @@ -29,8 +29,8 @@ package io.spine import io.spine.logging.AbstractLoggingSmokeTest /** - * Checks that `spine-logging` library works correctly within `base` module. + * Checks that the `spine-logging` library works correctly within the `base` module. * - * The abstract base is provided by `Spine.Logging.smokeTest` dependency. + * The abstract base is provided by the `Spine.Logging.smokeTest` dependency. */ internal class LoggingSmokeTest : AbstractLoggingSmokeTest() diff --git a/base/src/test/kotlin/io/spine/code/java/ClassNameSpec.kt b/base/src/test/kotlin/io/spine/code/java/ClassNameSpec.kt index f04cd63f5b..7bd15ac092 100644 --- a/base/src/test/kotlin/io/spine/code/java/ClassNameSpec.kt +++ b/base/src/test/kotlin/io/spine/code/java/ClassNameSpec.kt @@ -136,7 +136,7 @@ internal class ClassNameSpec { } /** - * Stab classes for testing [ClassName] methods. + * Stub classes for testing [ClassName] methods. */ class Outer { class Inner { diff --git a/base/src/test/kotlin/io/spine/string/StringsSpec.kt b/base/src/test/kotlin/io/spine/string/StringsSpec.kt index d829c90c98..c9b5087424 100644 --- a/base/src/test/kotlin/io/spine/string/StringsSpec.kt +++ b/base/src/test/kotlin/io/spine/string/StringsSpec.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 @@ -67,7 +67,7 @@ class StringsSpec { line one line two """ - // Check that we have space char at the end after `trimIndent()`. + // Check that we have a space char at the end after `trimIndent()`. value.trimIndent().lines()[0].last() shouldBe ' ' val trimmed = value.trimWhitespace() diff --git a/base/src/test/proto/spine/test/code/proto/column_option_test.proto b/base/src/test/proto/spine/test/code/proto/column_option_test.proto index 5dfa3153a2..73df78d8fd 100644 --- a/base/src/test/proto/spine/test/code/proto/column_option_test.proto +++ b/base/src/test/proto/spine/test/code/proto/column_option_test.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 @@ -59,7 +59,7 @@ message CoProject { } } -// An entity type which declares no columns. +// An entity type that declares no columns. message CoTask { option(entity).kind = PROJECTION; CoTaskId id = 1; diff --git a/base/src/test/proto/spine/test/code/proto/test_commands.proto b/base/src/test/proto/spine/test/code/proto/test_commands.proto index e8603a1669..a00c2e280b 100644 --- a/base/src/test/proto/spine/test/code/proto/test_commands.proto +++ b/base/src/test/proto/spine/test/code/proto/test_commands.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 @@ -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. */ + syntax = "proto3"; package spine.test.code.proto.commands; @@ -35,7 +36,7 @@ option java_package = "io.spine.test.code.proto.command"; option java_multiple_files = true; option java_outer_classname = "MttCommandsProto"; -// This file defines test environment for `MessageTypeTest.java`. +// This file defines the test environment for `MessageTypeTest.java`. // A sample command to verify detecting that a message is a command from `MessageType`. message MttStartProject { diff --git a/base/src/test/proto/spine/test/code/proto/test_entity_states.proto b/base/src/test/proto/spine/test/code/proto/test_entity_states.proto index c13cba72cd..b3157c5294 100644 --- a/base/src/test/proto/spine/test/code/proto/test_entity_states.proto +++ b/base/src/test/proto/spine/test/code/proto/test_entity_states.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 @@ -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. */ + syntax = "proto3"; package spine.test.code.proto.uuid; @@ -35,7 +36,7 @@ option java_package = "io.spine.test.code.proto.uuid"; option java_multiple_files = true; option java_outer_classname = "MttEntityStatesProto"; -// This file defines test environment for `MessageTypeTest.java`. +// This file defines the test environment for `MessageTypeTest.java`. // A sample entity state to verify the `EntityState` detection from `MessageType`. message MttEntityState { diff --git a/base/src/test/proto/spine/test/code/proto/test_events.proto b/base/src/test/proto/spine/test/code/proto/test_events.proto index 1e17f7a2c9..e00aaa83b2 100644 --- a/base/src/test/proto/spine/test/code/proto/test_events.proto +++ b/base/src/test/proto/spine/test/code/proto/test_events.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 @@ -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. */ + syntax = "proto3"; package spine.test.code.proto.events; @@ -35,7 +36,7 @@ option java_package = "io.spine.test.code.proto.event"; option java_multiple_files = true; option java_outer_classname = "MttEventsProto"; -// This file defines test environment for `MessageTypeTest.java`. +// This file defines the test environment for `MessageTypeTest.java`. // A sample event to verify detecting that a message is an event from `MessageType`. message MttProjectStarted { diff --git a/base/src/test/proto/spine/test/code/proto/test_rejections.proto b/base/src/test/proto/spine/test/code/proto/test_rejections.proto index 007569401c..240610ce3d 100644 --- a/base/src/test/proto/spine/test/code/proto/test_rejections.proto +++ b/base/src/test/proto/spine/test/code/proto/test_rejections.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 @@ -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. */ + syntax = "proto3"; package spine.test.code.proto.rejections; @@ -34,7 +35,7 @@ option (SPI_all) = true; option java_package = "io.spine.test.code.proto.rejections"; // Keep all the rejections under the same outer class called `Rejections`. -// This file defines test environment for `MessageTypeTest.java`. +// This file defines the test environment for `MessageTypeTest.java`. // A sample rejection to verify detecting that a message is a rejection from `MessageType`. message MttSampleRejection { diff --git a/base/src/test/proto/spine/test/code/proto/test_uuid_messages.proto b/base/src/test/proto/spine/test/code/proto/test_uuid_messages.proto index 37efdef7a1..40b787a758 100644 --- a/base/src/test/proto/spine/test/code/proto/test_uuid_messages.proto +++ b/base/src/test/proto/spine/test/code/proto/test_uuid_messages.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 @@ -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. */ + syntax = "proto3"; package spine.test.code.proto.uuid; @@ -35,7 +36,7 @@ option java_package = "io.spine.test.code.proto.uuid"; option java_multiple_files = true; option java_outer_classname = "MttUuidMessagesProto"; -// This file defines test environment for `MessageTypeTest.java`. +// This file defines the test environment for `MessageTypeTest.java`. // A sample UUID message to verify UuidValue detection from `MessageType`. message MttUuidMessage { diff --git a/base/src/test/proto/spine/test/protobuf/descriptor_exts_spec.proto b/base/src/test/proto/spine/test/protobuf/descriptor_exts_spec.proto index 46f2118074..25f11f21bd 100644 --- a/base/src/test/proto/spine/test/protobuf/descriptor_exts_spec.proto +++ b/base/src/test/proto/spine/test/protobuf/descriptor_exts_spec.proto @@ -1,5 +1,5 @@ /* - * Copyright 2024, 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. @@ -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. */ + syntax = "proto3"; package spine.test.protobuf; @@ -34,7 +35,7 @@ option java_package="io.spine.test.protobuf"; option java_multiple_files = true; option java_outer_classname = "DescriptorExtsSpecProto"; -// This is a message type which contains both nested types and a map field. +// This is a message type that contains both nested types and a map field. // // Protobuf generates synthetic descriptors for map entry types. // See https://protobuf.dev/programming-guides/proto3/#maps-features for details. diff --git a/base/src/test/proto/spine/test/type/types.proto b/base/src/test/proto/spine/test/type/types.proto index b59e22372d..4e2aa641e5 100644 --- a/base/src/test/proto/spine/test/type/types.proto +++ b/base/src/test/proto/spine/test/type/types.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 @@ -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. */ + syntax = "proto3"; package spine.test.type; @@ -51,7 +52,7 @@ message Url { // A URL in a structured form. // -// This is a test-only type, which is similar to one available from `base-types` artifact. +// This is a test-only type, which is similar to one available from the `base-types` artifact. // message Uri { @@ -87,7 +88,7 @@ message Uri { // Most often used schemas. Schema schema = 1; - // Some other protocol + // Some other protocol. string name = 2; } } @@ -115,7 +116,7 @@ message Uri { string password = 2; } - // Url query parameter type. Should look like key=value after converting to string + // Url query parameter type. Should look like key=value after converting to string. message QueryParameter { // Parameter name. @@ -128,7 +129,7 @@ message Uri { // A human language as defined by ISO 639-1. // -// A test-only sibling of the type with the same name availble from `base-types` artifact. +// A test-only sibling of the type with the same name available from `base-types` artifact. // enum Language { diff --git a/environment/src/main/java/io/spine/environment/CustomEnvironmentType.java b/environment/src/main/java/io/spine/environment/CustomEnvironmentType.java index 7da645c2f5..7fac9580c6 100644 --- a/environment/src/main/java/io/spine/environment/CustomEnvironmentType.java +++ b/environment/src/main/java/io/spine/environment/CustomEnvironmentType.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 @@ -29,7 +29,7 @@ /** * Abstract base for custom environment types. * - *

      {@code Environment} allows to {@link Environment#register(Class) register custom types}. + *

      {@code Environment} allows one to {@link Environment#register(Class) register custom types}. * In this case the environment detection functionality iterates over all known types, starting * with those registered by the framework user: * diff --git a/environment/src/main/java/io/spine/environment/Environment.java b/environment/src/main/java/io/spine/environment/Environment.java index 21c63d363b..dd817c05e6 100644 --- a/environment/src/main/java/io/spine/environment/Environment.java +++ b/environment/src/main/java/io/spine/environment/Environment.java @@ -48,7 +48,7 @@ *

      Detecting the type of the environment

      * *

      It is possible to {@linkplain #type() obtain the type} of the current - * environment, or to check whether current environment type {@linkplain #is(Class) matches + * environment, or to check whether the current environment type {@linkplain #is(Class) matches * another type}. *

        *
      @@ -81,7 +81,7 @@
        * 

      The framework users may define their custom settings depending on the current environment * type and then {@linkplain #register(Class) register} them for further detection. Custom types * are {@linkplain CustomEnvironmentType#enabled() evaluated} in the order reverse to registration. - * That is, last registered type would be checked first and so on. + * That is, the last-registered type would be checked first and so on. * Please see {@link CustomEnvironmentType} for details. * *

      When environment changes

      @@ -133,7 +133,7 @@ public final class Environment implements WithLogging { /** * The types the environment can be in. * - *

      Always contains {@link #STANDARD_TYPES} as last two elements. + *

      Always contains {@link #STANDARD_TYPES} as the last two elements. * * @see #register(EnvironmentType) */ @@ -168,7 +168,7 @@ private Environment(Environment copy) { } /** - * Remembers the specified environment type, allowing {@linkplain #is(Class) to + * Remembers the specified environment type, allowing one {@linkplain #is(Class) to * determine whether it's enabled} later. * *

      Note that the default types are still present. @@ -195,7 +195,7 @@ private Environment register(EnvironmentType type) { } /** - * Give custom environment types a chance to be detected as the current one + * Gives custom environment types a chance to be detected as the current one * in response to the changes of their surroundings. * *

      Unlike {@link #reset()} this method keeps custom types, but clears @@ -207,7 +207,7 @@ void autoDetect() { } /** - * Configures a callback to be called when corresponding environment type is + * Configures a callback to be called when the corresponding environment type is * {@linkplain EnvironmentType#enabled() detected}. * * @param cls @@ -234,7 +234,7 @@ void whenDetected(Class cls, @Nullable Consumer callback) { } /** - * Remembers the specified environment type, allowing {@linkplain #is(Class) to + * Remembers the specified environment type, allowing one {@linkplain #is(Class) to * determine whether it's enabled} later. * *

      The specified {@code type} must have a parameterless constructor. The @@ -271,7 +271,7 @@ public Environment createCopy() { * the method goes through them in the latest-registered to earliest-registered order. * Then, checks {@link Tests} and {@link DefaultMode}. * - *

      Please note that this method follows assigment compatibility: + *

      Please note that this method follows assignment compatibility: *

            *
            *     abstract class AppEngine extends EnvironmentType {
      diff --git a/environment/src/main/java/io/spine/environment/EnvironmentType.java b/environment/src/main/java/io/spine/environment/EnvironmentType.java
      index fd6cce91cf..961287c711 100644
      --- a/environment/src/main/java/io/spine/environment/EnvironmentType.java
      +++ b/environment/src/main/java/io/spine/environment/EnvironmentType.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
      @@ -48,7 +48,7 @@ public abstract class EnvironmentType> {
            * Returns {@code true} if the underlying system is currently in this environment type.
            *
            * 

      For example, if an application is deployed to a fleet of virtual machines, an environment - * variable may be set for every virtual machine. Application developer may use this type of + * variable may be set for every virtual machine. An application developer may use this type of * knowledge to determine the current environment. */ protected abstract boolean enabled(); diff --git a/environment/src/main/java/io/spine/environment/Tests.java b/environment/src/main/java/io/spine/environment/Tests.java index eaa24a7166..ba17bd7413 100644 --- a/environment/src/main/java/io/spine/environment/Tests.java +++ b/environment/src/main/java/io/spine/environment/Tests.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 @@ -32,7 +32,7 @@ /** * Testing environment. * - *

      Detected by checking stack trace for mentions of the known testing frameworks. + *

      Detected by checking the stack trace for mentions of the known testing frameworks. * *

      This option is mutually exclusive with {@link DefaultMode}, i.e. one of them is always enabled. */ diff --git a/environment/src/test/java/io/spine/environment/given/AppEngineStandard.java b/environment/src/test/java/io/spine/environment/given/AppEngineStandard.java index 2a4d2bdfce..882d5db969 100644 --- a/environment/src/test/java/io/spine/environment/given/AppEngineStandard.java +++ b/environment/src/test/java/io/spine/environment/given/AppEngineStandard.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 @@ public static void enable() { } /** - * Disables teh App Engine Standard environment. + * Disables the App Engine Standard environment. */ public static void clear() { System.clearProperty(ENV_KEY); diff --git a/format/src/main/kotlin/io/spine/format/Parse.kt b/format/src/main/kotlin/io/spine/format/Parse.kt index 7400942581..4c8f364766 100644 --- a/format/src/main/kotlin/io/spine/format/Parse.kt +++ b/format/src/main/kotlin/io/spine/format/Parse.kt @@ -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. @@ -40,7 +40,7 @@ import java.io.File * @param file The file to parse. * @throws IllegalStateException if the file is not of the supported [format][Format]. * @throws java.io.IOException or its subclass, if the parsing of the file fails. - * @throws ClassCastException if the stored values is not of the type [T]. + * @throws ClassCastException if the stored value is not of the type [T]. */ public inline fun parse(file: File): T = parse(file, T::class.java) @@ -57,7 +57,7 @@ public inline fun parse(file: File): T = * @param format The format of the file. * @throws IllegalStateException if the file is not of the supported [format][Format]. * @throws java.io.IOException or its subclass, if the parsing of the file fails. - * @throws ClassCastException if the stored values is not of the type [T]. + * @throws ClassCastException if the stored value is not of the type [T]. */ public inline fun parse(file: File, format: Format): T = parse(file, format, T::class.java) @@ -95,7 +95,7 @@ public fun parse(file: File, cls: Class): T { * @param cls The class of the instance stored in the file. * @throws IllegalStateException if the file is not of the supported [format][Format]. * @throws java.io.IOException or its subclass, if the parsing of the file fails. - * @throws ClassCastException if the stored values is not of the type [T]. + * @throws ClassCastException if the stored value is not of the type [T]. */ public fun parse( file: File, diff --git a/format/src/main/kotlin/io/spine/format/write/JacksonWriter.kt b/format/src/main/kotlin/io/spine/format/write/JacksonWriter.kt index 878be1fd1f..e349a68ee7 100644 --- a/format/src/main/kotlin/io/spine/format/write/JacksonWriter.kt +++ b/format/src/main/kotlin/io/spine/format/write/JacksonWriter.kt @@ -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. @@ -33,7 +33,7 @@ import io.spine.format.JacksonSupport import java.io.File /** - * The abstract base for writes based on the [Jackson](https://github.com/FasterXML) library. + * The abstract base for writers based on the [Jackson](https://github.com/FasterXML) library. * * If you plan to support a new data format, please see [JacksonSupport]. * diff --git a/format/src/test/kotlin/io/spine/format/FormatTest.kt b/format/src/test/kotlin/io/spine/format/FormatTest.kt index cb74f6cefc..1f5de6a1cf 100644 --- a/format/src/test/kotlin/io/spine/format/FormatTest.kt +++ b/format/src/test/kotlin/io/spine/format/FormatTest.kt @@ -39,7 +39,7 @@ import org.junit.jupiter.api.io.TempDir /** * The abstract base for format tests that create a [file] under - * automatically created [temporary directory][tempDir]. + * an automatically created [temporary directory][tempDir]. * * @property format The format to test. * @property instance The instance of the type [T] to be used when writing files From b8875e07cb7013c2cdbfd05bd9398e8a33a8c3c6 Mon Sep 17 00:00:00 2001 From: Alexander Yevsyukov Date: Wed, 22 Jul 2026 01:24:46 +0100 Subject: [PATCH 4/4] Fix doc grammar Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- base/src/main/java/io/spine/protobuf/AnyPacker.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/src/main/java/io/spine/protobuf/AnyPacker.java b/base/src/main/java/io/spine/protobuf/AnyPacker.java index ebbc56ca8f..b0f821f93b 100644 --- a/base/src/main/java/io/spine/protobuf/AnyPacker.java +++ b/base/src/main/java/io/spine/protobuf/AnyPacker.java @@ -48,7 +48,7 @@ * from the given instance of {@link Any}. * * @implNote This class does not use the {@link Any#unpack(Class)} method for unpacking - * because of the performance reasons. + * for performance reasons. * *

      The implementation of {@link Any#unpack(Class)} invokes the {@link Any#is(Class) is(Class)} * method that obtains a default instance of a message by calling a method