Skip to content

Fix/arxml null safety#888

Merged
ebroecker merged 2 commits into
ebroecker:developmentfrom
BohdanBuinich:fix/arxml-null-safety
Dec 10, 2025
Merged

Fix/arxml null safety#888
ebroecker merged 2 commits into
ebroecker:developmentfrom
BohdanBuinich:fix/arxml-null-safety

Conversation

@BohdanBuinich

Copy link
Copy Markdown
Contributor
  • Add null check for VLAN tag before parsing to prevent AttributeError
  • Get PDUS child element before searching for SOCKET-CONNECTION-IPDU-IDENTIFIER
    to ensure proper XML hierarchy traversal
    ARXML Structure
    SOCKET-CONNECTION-BUNDLE
        └─ SOCKET-CONNECTION (multiple)
         └─ PDUS
            └─ SOCKET-CONNECTION-IPDU-IDENTIFIER
                ├─ HEADER-ID
                └─ PDU-TRIGGERING-REF

Initialize type_encoding to None and explicitly set default value
when no base type encoding is found, preventing UnboundLocalError
in edge cases where the search loop finds no valid elements.
- Add null check for VLAN tag before parsing to prevent AttributeError
- Get PDUS child element before searching for SOCKET-CONNECTION-IPDU-IDENTIFIER
  to ensure proper XML hierarchy traversal
  ARXML Structure

    SOCKET-CONNECTION-BUNDLE
        └─ SOCKET-CONNECTION (multiple)
         └─ PDUS
            └─ SOCKET-CONNECTION-IPDU-IDENTIFIER
                ├─ HEADER-ID
                └─ PDU-TRIGGERING-REF
@coveralls

Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 20082084339

Details

  • 3 of 6 (50.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.009%) to 55.571%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/canmatrix/formats/arxml.py 3 6 50.0%
Totals Coverage Status
Change from base Build 19572723817: 0.009%
Covered Lines: 4738
Relevant Lines: 8526

💛 - Coveralls

@ebroecker ebroecker merged commit d76c169 into ebroecker:development Dec 10, 2025
15 of 16 checks passed
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