Skip to content

2.7 1485 reference parsing issues#1507

Merged
thboileau merged 6 commits into
2.7from
2.7_1485_reference_parsing_issues
May 31, 2026
Merged

2.7 1485 reference parsing issues#1507
thboileau merged 6 commits into
2.7from
2.7_1485_reference_parsing_issues

Conversation

@thboileau
Copy link
Copy Markdown
Contributor

The aim

Fix parsing of Reference instances as reported in ticket 1485

Check-list

  • PR size
    • Under 300 lines ✅
    • Can't be split without complicating the process even more
  • Tests
    • Added
    • Not applicable (why?)
  • Doc
    • Added
    • Not applicable
  • Reviewer
    • Asked for a review
    • Added label DO NOT REVIEW

@thboileau thboileau force-pushed the 2.7_1485_reference_parsing_issues branch from 5f2d97b to 23412fe Compare May 15, 2026 20:05
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses Restlet issue #1485 by tightening Reference parsing/validation so malformed schemes and authorities (notably around IPv6 and userinfo/host ambiguity) are detected earlier, and by expanding test coverage for these failure modes.

Changes:

  • Add scheme and authority validation in Reference (including IPv6 + embedded IPv4 tail checks) and adjust parsing around query/path boundary cases.
  • Extend ReferenceTestCase with new negative tests for malformed hosts/schemes and additional parsing edge cases.
  • Minor formatting/header updates in unrelated files.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
org.restlet/src/main/java/org/restlet/data/Reference.java Adds authority/scheme validation and adjusts parsing logic (query vs path; IPv6/IPv4-tail validation).
org.restlet/src/test/java/org/restlet/data/ReferenceTestCase.java Adds/adjusts tests for invalid authorities/schemes and edge-case parsing behaviors.
org.restlet/src/main/java/org/restlet/resource/ClientResource.java Updates copyright year.
org.restlet.ext.freemarker/src/test/java/org/restlet/ext/freemarker/FreeMarkerTestCase.java Formatting-only change for Configuration initialization.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread org.restlet/src/main/java/org/restlet/data/Reference.java
Comment thread org.restlet/src/main/java/org/restlet/data/Reference.java
Comment thread org.restlet/src/main/java/org/restlet/data/Reference.java Outdated
Comment thread org.restlet/src/test/java/org/restlet/data/ReferenceTestCase.java
Comment thread org.restlet/src/main/java/org/restlet/data/Reference.java
@thboileau thboileau force-pushed the 2.7_1485_reference_parsing_issues branch from 755cae5 to 4a69450 Compare May 31, 2026 17:07
@sonarqubecloud
Copy link
Copy Markdown

@thboileau thboileau merged commit 584851b into 2.7 May 31, 2026
3 checks passed
@thboileau thboileau deleted the 2.7_1485_reference_parsing_issues branch May 31, 2026 17:10
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