Develop 0.2.0#2
Merged
Merged
Conversation
- Add `@Unmodifiable` annotation to `mapToList` return type - Ensure `mapToList` returns an unmodifiable list using `Collections.unmodifiableList` - Add `@NotNull` annotation to `mapToEntity` and `mapToList` return types
- update project version to `0.2.0-SNAPSHOT` - add `immutables` and `jackson` BOMs and dependencies - refactor source generation plugins to support `immutables` and standard attachment - update `assertj-core` from `3.27.6` to `3.27.7`
- introduce `@ImmutableStyle` annotation for `Immutables` configuration, which groups together, a variety of annotations under one custom annotation. All entity classes apply this annotation. - replace all `Lombok` annotations for these entities with `Immutable `equivalents. Note that future commits will gradually remove all traces of `Lombok` from the codebase. - refactor concrete entities to abstract classes with their names prefixed with "Abstract" such that the generated concrete classes has their prefixes trimmed. - switch JSON serialization/deserialization annotations from Gson to Jackson. Note that future commits will remove all traces of `GSON` in favor of `Jackson` integration. - replace JetBrains `@Nullable` Annotations with Jspecify. Note that future commits replace all `JetBrains` annotations with equivalent `Jspecify` annotations. - remove custom `toString()` method and update `@since` version - update corresponding tests to use the `Immutables` builder pattern - update documentation to reflect the Immutable builder style examples - update `@since` remove `@author`
- replace the remaining JetBrains `@NotNull` and `@Nullable` annotations with Jspecify equivalents - replace JetBrains `@Unmodifiable` with a custom `@Unmodifiable` annotation
- Replace `DMIType.getCommand(int)` with `DMIType.getCommandFor(DMIType)` - Remove Lombok's `@Getter` annotation from `DMIType` since `getValue()` is no longer needed to be a part of the public API contract. - Update all service classes to use the new `DMIType.getCommandFor()` method
- Remove `Gson` dependency from `pom.xml`. - Replace `Gson` with `Jackson` in `CommonDMIMapper`. - Update `MockEntityClass` in `CommonDMIMapperTest` to use Jackson annotations and remove Lombok.
- add `@FragileMethod` to `CommonDMIMapper`'s default methods - add `@InvokesFragileMethod` to service methods that use `CommonDMIMapper`
- remove `lombok` dependency from `pom.xml`. - replace `@StandardException` with explicit constructors in `TerminalExecutionException.java`. - replace `@RequiredArgsConstructor` with an explicit constructor in `DMIType.java`. - replace `@UtilityClass` and `@Slf4j` with explicit implementations in `TerminalUtility.java`. - replace remaining lombok `@NonNull` annotations with Jspecify equivalent annotations.
- Restore the `toString()` override for all entity classes. This feature was previously removed during GSON dependency removal.
- `ImmutableStyle` has been renamed to `ImmutableEntityStyle` and updated references. - Added documentation to `ImmutableEntityStyle`.
- Update `maven-compiler-plugin` from `3.14.1` to `3.15.0` - Update `maven-surefire-plugin` from `3.5.4` to `3.5.5` - Update `central-publishing-maven-plugin` from `0.9.0` to `0.10.0` - Correct `project.license.url` branch from `main` to `master`
- standardize javadoc paragraph indentation - adjust whitespace around method signatures and conditional statements - add missing newlines in annotation and enum definitions - reorder javadoc tags Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
- prepare for the official `0.2.0` release Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This update introduces several breaking changes and is not backwards compatible with the previous versions.
Type of Change
Non-Breaking Changes
DMIType.getCommand(int)withDMIType.getCommandFor(DMIType)inDMIType.java.DMIType.getCommandFor()method.Breaking Changes
Lombokand replaced them withImmutablesequivalents for deep immutability of entityclasses.
As a result, the builder methods now have a slightly different syntax. The remaining changes involve writing more
boilerplate code to make up for removal of Lombok's annotations but are non-breaking in nature.
The complete list of changes can be found in the enclosed PR.
During Lombok, the syntax for an entity builder was as follows:
With Immutables, the new syntax is:
All entities have been converted to their abstract forms.
Immutables handles their concrete implementation during compile time.
This is technically not a breaking change since the generated implementations retain their
pre-0.2.0namesCommonDMIMapper#mapToListreturns an unmodifiable list usingCollections.unmodifiableListTest Changes
Immutablesbuilder patternMockEntityClassinCommonDMIMapperTestto use Jackson's@JsonPropertyas a replacement for GSON's@SerializedValue.Dependency Updates
sources.jarmaven-compiler-pluginfrom3.14.1to3.15.0maven-surefire-pluginfrom3.5.4to3.5.5central-publishing-maven-pluginfrom0.9.0to0.10.0assertj-corefrom3.27.6to3.27.7Documentation
Replaced JetBrains
@NotNulland@Nullableand Lombok's@NonNullannotations with Jspecify equivalents.For
@Unmodifiable, an equivalent custom@Unmodifiableannotation has been introduced.Introduced two new annotations
@FragileMethodand@InvokesFragileMethod.These two annotations when used, document that a method or a constructor's implementation is fragile in nature
and may break in the future.
Updated Javadocs to reflect the Immutable builder style examples
Removed
@authortag from JavadocsUpdated developer mail in
pom.xmlCorrected
project.license.urlbranch frommaintomasterinpom.xmlAdded an implementation status table in
README.mdRelated Issues
N/A