Skip to content

Java/IoT3Mobility: fix Java compatibility and DENM issues - #590

Merged
mathieu1fb merged 6 commits into
Orange-OpenSource:masterfrom
mathieu1fb:urgent-fixes
Sep 8, 2026
Merged

mathieu1fb merged 6 commits into
Orange-OpenSource:masterfrom
mathieu1fb:urgent-fixes

Conversation

@mathieu1fb

Copy link
Copy Markdown
Collaborator

What's new

A few fixes have been implemented:

  • Java 8 compatibility issues have been resolved in the message Helper and Validator classes
  • DENM v2+ situation, location and alacarte containers JSON fields are now correctly formatted
  • DENM "private" subscription topic is now correctly formatted

Close #563
Close #564
Close #589


What to do

Review the code changes.

Signed-off-by: Mathieu LEFEBVRE <mathieu1.lefebvre@orange.com>
Android users of the SDK have reported an incompatibility of the current helpers implementation with Android 31 (Java 8).

Fix: out.toString(StandardCharsets.UTF_8) (Java 10) → new String(out.toByteArray(), StandardCharsets.UTF_8)

Signed-off-by: Mathieu LEFEBVRE <mathieu1.lefebvre@orange.com>
Fix: value.isBlank() (Java 11) → value.trim().isEmpty()

Signed-off-by: Mathieu LEFEBVRE <mathieu1.lefebvre@orange.com>
Fix: .toList() (Java 16) → .collect(Collectors.toList())

Signed-off-by: Mathieu LEFEBVRE <mathieu1.lefebvre@orange.com>
The "private" or "unicast" DENM topic was not following the specified <topic_root>/outQueue/<sdk_uuid>/denm/+ structure.

Signed-off-by: Mathieu LEFEBVRE <mathieu1.lefebvre@orange.com>
Signed-off-by: Mathieu LEFEBVRE <mathieu1.lefebvre@orange.com>
@mathieu1fb mathieu1fb self-assigned this Sep 4, 2026
@mathieu1fb mathieu1fb added the Java label Sep 4, 2026
@mathieu1fb mathieu1fb added this to Kanban Sep 4, 2026
@github-project-automation github-project-automation Bot moved this to Backlog in Kanban Sep 4, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hi. Do not understand why this change. Dinootoo says:
Si vous utilisez Java 11 ou plus récent, isBlank() est généralement plus fiable et plus simple pour vérifier si une chaîne est "vide ou uniquement blanche".
Si vous travaillez avec une version antérieure, vous devrez utiliser trim().isEmpty().

Did I miss something related to the version.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Or maybe you want to ensure that after trim the lenght of the String t otest is 0?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Actually we want compatibility with older Java versions for compatibility with some Android versions that are still very common, hence the use of this less optimized trim().isEmpty() instead of isBlank().

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ok, let's approve.

@fredOG-2A1 fredOG-2A1 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Just an interrogation with the replacement of isBlank by trim().isEmpty.

@mathieu1fb
mathieu1fb merged commit 659434d into Orange-OpenSource:master Sep 8, 2026
121 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in Kanban Sep 8, 2026
@mathieu1fb
mathieu1fb deleted the urgent-fixes branch September 8, 2026 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

2 participants