Skip to content

Develop 0.2.0#2

Merged
eggy03 merged 19 commits into
masterfrom
develop-0.2.0
Apr 6, 2026
Merged

Develop 0.2.0#2
eggy03 merged 19 commits into
masterfrom
develop-0.2.0

Conversation

@eggy03
Copy link
Copy Markdown
Owner

@eggy03 eggy03 commented Apr 5, 2026

Description

This update introduces several breaking changes and is not backwards compatible with the previous versions.

Type of Change

Non-Breaking Changes

  • Replaced the underlying mapper from GSON to Jackson
  • Replaced DMIType.getCommand(int) with DMIType.getCommandFor(DMIType) in DMIType.java.
  • Updated all service classes to use the new DMIType.getCommandFor() method.

Breaking Changes

  • Removed all traces of Lombok and replaced them with Immutables equivalents for deep immutability of entity
    classes.
    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:

import io.github.eggy03.dmidecode.entity.processor.DMIProcessor;

void main() {
    // building a new entity using builder
    DMIProcessor processor = DMIProcessor.Builder.build();


    DMIProcessor processorTwo = processor.toBuilder().build();

    // accessing fields
    processor.getCurrentSpeed();
}

With Immutables, the new syntax is:

import io.github.eggy03.dmidecode.entity.processor.DMIProcessor;

@SuppressWarnings("all")
void main() {

    // building a new entity using builder
    DMIProcessor processor = new DMIProcessor.Builder().build();

    // updating a built entity
    DMIProcessor processorTwo = processor.withProperties();

    // accessing fields
    processor.currentSpeed();
}
  • 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.0 names

  • CommonDMIMapper#mapToList returns an unmodifiable list using Collections.unmodifiableList

Test Changes

  • Updated corresponding entity tests to use the Immutables builder pattern
  • Updated MockEntityClass in CommonDMIMapperTest to use Jackson's @JsonProperty as a replacement for GSON's
    @SerializedValue.
  • Removed all traces of Lombok from the tests.

Dependency Updates

  • Added Jackson and Immutables BOMs and dependencies
  • Removed GSON and Lombok
  • Updated source generation plugins to support packing Immutables generated code in sources.jar
  • Updated maven-compiler-plugin from 3.14.1 to 3.15.0
  • Updated maven-surefire-plugin from 3.5.4 to 3.5.5
  • Updated central-publishing-maven-plugin from 0.9.0 to 0.10.0
  • Updated assertj-core from 3.27.6 to 3.27.7

Documentation

  • Replaced JetBrains @NotNull and @Nullable and Lombok's @NonNull annotations with Jspecify equivalents.
    For @Unmodifiable, an equivalent custom @Unmodifiable annotation has been introduced.

  • Introduced two new annotations @FragileMethod and @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 @author tag from Javadocs

  • Updated developer mail in pom.xml

  • Corrected project.license.url branch from main to master in pom.xml

  • Added an implementation status table in README.md

Related Issues

N/A

eggy03 added 19 commits March 30, 2026 09:28
- 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>
@eggy03 eggy03 merged commit 3d112da into master Apr 6, 2026
1 check passed
@eggy03 eggy03 deleted the develop-0.2.0 branch April 6, 2026 03:55
@eggy03 eggy03 self-assigned this Apr 6, 2026
@eggy03 eggy03 added documentation Improvements or additions to documentation enhancement New feature or request labels Apr 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant