Skip to content

refactor!: rename classes with outright naming defects - #157

Open
szysas wants to merge 3 commits into
next-3from
next-4
Open

szysas wants to merge 3 commits into
next-3from
next-4

Conversation

@szysas

@szysas szysas commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

Renames only, no behaviour change:

  • MediaTypes -> ContentFormat (The class holds numbers from the IANA CoAP Content-Formats registry, not
    MIME media types)
  • SignallingHeaderOptions -> SignalingHeaderOptions (RFC 8323 spelling, matching the SignalingOptions class in the same package); its members and methods follow the same spelling fix
  • coap-cli CoapSerializer -> CoapPacketCodec, so it no longer shadows opencoap.packet.CoapSerializer
  • CoapRequestEntityIncomplete -> CoapRequestEntityIncompleteException
  • CoapRequestEntityTooLarge -> CoapRequestEntityTooLargeException
  • CoapBlockTooLargeEntityException -> CoapBlockEntityTooLargeException
  • MessageIdSupplierImpl -> SequentialMessageIdSupplier
  • CapabilitiesStorageImpl -> HashMapCapabilitiesStorage
  • Method.iPATCH -> Method.IPATCH

@szysas
szysas added this pull request to stack #155 September 24, 2026 08:10
@codecov

codecov Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.71930% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.56%. Comparing base (5c8b462) to head (bc34a79).

Files with missing lines Patch % Lines
...ain/java/opencoap/core/SignalingHeaderOptions.java 84.00% 0 Missing and 4 partials ⚠️
...-core/src/main/java/opencoap/core/CoapRequest.java 50.00% 0 Missing and 1 partial ⚠️
...ore/src/main/java/opencoap/core/ContentFormat.java 83.33% 1 Missing ⚠️
...main/java/opencoap/endpoint/MessageIdSupplier.java 50.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             next-3     #157      +/-   ##
============================================
+ Coverage     93.53%   93.56%   +0.02%     
- Complexity     1834     1835       +1     
============================================
  Files           108      108              
  Lines          4054     4054              
  Branches        538      537       -1     
============================================
+ Hits           3792     3793       +1     
  Misses          144      144              
+ Partials        118      117       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@szysas
szysas removed this pull request from stack #155 September 24, 2026 10:58
@szysas
szysas added this pull request to stack #159 September 24, 2026 10:59
Renames only, no behaviour change:

- SignallingHeaderOptions -> SignalingHeaderOptions (RFC 8323 spelling,
  matching the SignalingOptions class in the same package); its members
  and methods follow the same spelling fix
- coap-cli CoapSerializer -> CoapPacketCodec, so it no longer shadows
  opencoap.packet.CoapSerializer
- CoapRequestEntityIncomplete -> CoapRequestEntityIncompleteException
- CoapRequestEntityTooLarge -> CoapRequestEntityTooLargeException
- CoapBlockTooLargeEntityException -> CoapBlockEntityTooLargeException
- MessageIdSupplierImpl -> SequentialMessageIdSupplier
- CapabilitiesStorageImpl -> HashMapCapabilitiesStorage
- Method.iPATCH -> Method.IPATCH
The class holds numbers from the IANA CoAP Content-Formats registry, not
MIME media types -- the MIME strings are only a side lookup table used by
`contentFormatToString`. The new name matches the `Content-Format` option
it describes and reads better at the call site.

Constant names are left untouched here.

BREAKING CHANGE: `MediaTypes` is now `ContentFormat`.
@szysas
szysas marked this pull request as ready for review September 24, 2026 11:16
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.

1 participant