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

slub / urnlib / 44066120228

17 Nov 2026 10:33AM UTC coverage: 95.503% (+0.2%) from 95.287%
44066120228

push

github

claussni
Add normalize(), assignedName() and URN-equivalence to URNs and their parts

equals() compares URNs exactly as given. Whether two URNs name the same
thing is a separate question, answered by the equivalence rules of
RFC 2141, section 5 and RFC 8141, section 3, and by the rules of a
namespace.

- URN, NamespaceIdentifier and NamespaceSpecificString get an abstract
  normalize() returning the normal form of the same type: lower-case
  NID, upper-case hex digits in percent-encoded octets.
- NamespaceSpecificString gets the protected normalForm(String) hook, so
  that implementations for a particular namespace can add their rules.
- URN.assignedName() returns the URN without r-, q- and f-components.
- isEquivalentTo() on all three applies the rules of the receiver to the
  other object, which may be of any type. URN.areEquivalent() asks both
  URNs.

urn.normalize().assignedName() is a key for collections that are to
treat equivalent URNs as the same.

The abstract methods are a breaking change for third-party subclasses.

336 of 356 branches covered (94.38%)

Branch coverage included in aggregate %.

471 of 489 relevant lines covered (96.32%)

4.96 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

95.41
/de/slub/urn/NamespaceSpecificString.java


Source Not Available

The file "de/slub/urn/NamespaceSpecificString.java" isn't available on github. Either it's been removed, or the repo root directory needs to be updated.

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