Skip to content

fix(ui): initialize unconfigured wireless interface to resolve NPE, fix channel selection on hardware tab, fix validation message on empty password#11

Merged
mattdibi merged 5 commits intodevelopfrom
fix-wifi-ui
Sep 17, 2025
Merged

fix(ui): initialize unconfigured wireless interface to resolve NPE, fix channel selection on hardware tab, fix validation message on empty password#11
mattdibi merged 5 commits intodevelopfrom
fix-wifi-ui

Conversation

@marcellorinaldo
Copy link
Copy Markdown
Member

This PR introduces several fixes to the wireless section of the UI.

Initialize unconfigured wireless interfaces: this prevents a NPE when trying to use the activeConfig object, that might be null if the interface did not appear with a configuration saved on snapshot.

Correct channel selection in hardware tab: hardware tab channel selection from this.channelList was done by providing the channel value instead of the actual index. For example, channel 40 will select the 40th element of this.channelList which usually does not correspond to channel 40. The worst case, if the value exceeded the this.channelList length, we got a ArrayOutOfBoundsException.

Correct label of empty passwords: validation of empty passwords was done in this order:

  1. stringLength(255, MSGS.pwdMaxLength())
  2. noWhitespaceCharacters(MSGS.pwdWhitespaceCharacters())
  3. nonEmpty(MSGS.pwdEmpty())

String length validator was using this predicate for evaluation: value -> value != null && value.length() >= minSize && value.length() <= maxSize;.

On empty input, the string length validator was triggered before the empty validator.

…figuration, set to DISABLED

Signed-off-by: Marcello Rinaldo Martina <martina.marcello.rinaldo@outlook.com>
…cause ArrayOutOfBoundsException

Signed-off-by: Marcello Rinaldo Martina <martina.marcello.rinaldo@outlook.com>
Signed-off-by: Marcello Rinaldo Martina <martina.marcello.rinaldo@outlook.com>
@marcellorinaldo
Copy link
Copy Markdown
Member Author

This needs to be backported to Kura 5.6.0 maintenance branch

salvatore-coppola pushed a commit to eclipse-kura/kura that referenced this pull request Sep 2, 2025
Signed-off-by: Marcello Rinaldo Martina <martina.marcello.rinaldo@outlook.com>
@salvatore-coppola salvatore-coppola self-requested a review September 2, 2025 13:24
MMaiero pushed a commit to eclipse-kura/kura that referenced this pull request Sep 3, 2025
Signed-off-by: Marcello Rinaldo Martina <martina.marcello.rinaldo@outlook.com>
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Sep 9, 2025

MMaiero pushed a commit to eclipse-kura/kura that referenced this pull request Sep 15, 2025
…ix channel selection on hardware tab, fix validation message on empty password [backport release-5.6.0] (#5956)

fix(ui): backport of eclipse-kura/kura-management-ui#11

Signed-off-by: Marcello Rinaldo Martina <martina.marcello.rinaldo@outlook.com>
@salvatore-coppola
Copy link
Copy Markdown
Member

@mattdibi can you approve ? I'm co-author

@mattdibi mattdibi merged commit e2ad41c into develop Sep 17, 2025
4 checks passed
@mattdibi mattdibi deleted the fix-wifi-ui branch September 17, 2025 09:32
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.

3 participants