Skip to content

Conversation

@Amaneusz
Copy link
Contributor

No description provided.

Copy link
Contributor

@Marcin-Here Marcin-Here left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥇 good job! few minor comments.


#### Populating old delta

| `@ns:com:here:mom:delta` properties supported in Naksha V2 (pre MOM 10) | equivalents in `meta.moderationInfo` (MOM 10+) |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Naksha V3*

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-> Naksha

- we return feature in the same shape as it was given to Naksha in the writing phase

The class responsible for these operations
is [Mom10Transformation](../java/com/here/naksha/mom10/transform/Mom10Transformation.java).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think "src/jvmMain/java/com/here/naksha/mom10/Mom10Transformation.java" this would be working path for Mom10Transformation

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

}

public static void dropPreMom10Namespaces(@Nullable NakshaFeature feature) {
NakshaProperties properties = feature.getProperties();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If feature is Nullable, shouldn't we guard for that before calling .getProperties()?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We definitely should! Fixed :)


public class Mom10Verification {

private static final Pattern SHORT_SEM_VER = Pattern.compile("^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\..+$");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💍 🧙 🧝‍♂️

}

private static @Nullable Integer getMajorFrom(@NotNull String modelVersion) {
Matcher matcher = SHORT_SEM_VER.matcher(modelVersion);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In tests we have case as ""8.91" so if this is possible version, then let's say "10.0" is also possible and if so then our regex "\..+$" would return false on it. Is this scenario possible?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is possible and we treat "10.0" as invalid value, "10.0.0" is ok though

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There was a mistake in tests though, fixed

}

private static Stream<Named<VerificationCase>> shouldVerifyIfFeatureIsInMom10() {
return Stream.of(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if above comment about "10.0" scenario is possible, let's add tests for it. If no, ignore this comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

covered in fix :)

Signed-off-by: Jakub Amanowicz <[email protected]>
@Amaneusz Amaneusz merged commit caeafc7 into v3 Nov 21, 2025
3 checks passed
@Amaneusz Amaneusz deleted the v3_CASL-1466_v3_mom_10 branch November 21, 2025 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants