• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

aas-core-works / aas-core-codegen / 33978422058
85%

Build:
DEFAULT BRANCH: main
Ran 05 Sep 2026 04:41PM UTC
Jobs 3
Files 268
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

05 Sep 2026 04:36PM UTC coverage: 84.654% (-0.001%) from 84.655%
33978422058

push

github

web-flow
Simplify JSON and XML de/serialization in Java (#679)

We add generic ``parseArray``/``serializeArray`` helpers for JSON
list (de)serialization, replacing per-property inlined boilerplate
with shared calls.

We factor out a generic ``serializeElement`` helper for XML
serialization, mirroring C# (#676). It unifies the previously
duplicated ``writeStartElement``/``topLevel``/``writeEndElement``/
try-catch wrapping across all five property kinds (primitive,
enumeration, interface, concrete class, list), which also tightens
two branches' overly broad ``catch (Exception)`` down to ``catch
(XMLStreamException)``, matching what the other three branches
already did. A further ``serializeItems`` helper does the list-item
iteration generically as well, so every list-typed property collapses
to a single call instead of its own inlined ``for`` loop.

Rather than let the per-item and per-property content-writing logic
live on as duplicated lambda text at each call site, we follow the
shape of the merged C++ simplification (``SerializeBool``/
``SerializeInt64``/etc. plus a ``serialize_{enum}`` per enumeration):
we generate named methods once -- ``writeStringifiedContent``
(shared across ``boolean``/``long``/``double``/``String``, since
``Object.toString()`` is universal in Java, unlike C++),
``writeByteArrayContent``, and one ``write{Enum}Content`` per
enumeration and reference them via ``this::...`` from both the
standalone property and the list-item path.

A per-enum method is still needed there, even though the string
conversion itself is shared (see below), because Java resolves that
overload statically per concrete enum type, so a single generic wrapper
cannot call it.

We add ``Stringification.mustToString``, a per-enum helper that
returns the string representation of a literal or throws, and reuse
it for JSON's ``{enum}ToJsonValue`` and for XML's per-enum content
writer, removing three separate copies of the same
``Optional``-or-throw check.

We promote the ... (continued)

44 of 45 new or added lines in 5 files covered. (97.78%)

34 existing lines in 2 files now uncovered.

30924 of 36530 relevant lines covered (84.65%)

2.54 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
91.98
-0.05% aas_core_codegen/java/lib/_generate_xmlization.py

Coverage Regressions

Lines Coverage ∆ File
20
94.76
0.0% aas_core_codegen/python/lib/_generate_xmlization.py
14
94.97
0.02% aas_core_codegen/python/lib/_generate_jsonization.py
Jobs
ID Job ID Ran Files Coverage
1 3.11 - 33978422058.1 05 Sep 2026 04:45PM UTC 268
84.65
GitHub Action Run
2 3.10 - 33978422058.2 05 Sep 2026 04:45PM UTC 268
84.65
GitHub Action Run
3 3.12 - 33978422058.3 05 Sep 2026 04:45PM UTC 268
84.65
GitHub Action Run
Source Files on build 33978422058
  • Tree
  • List 268
  • Changed 6
  • Source Changed 0
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • e4549ab0 on github
  • Prev Build on main (#33972379192)
  • Next Build on main (#34020197342)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc