Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Improve Java lexer and endpoint parsing to resolve crashes and newline issues #455

Merged
merged 4 commits into from
Nov 10, 2024

Conversation

ksg97031
Copy link
Member

Description

This PR addresses two critical issues identified during testing and development:

  1. Handling Empty URLs in Endpoint Parsing

    • Fixed an issue where endpoints with empty URLs were generated, causing crashes during runtime.
    • Added validation to ensure that empty URL strings are properly handled.
  2. Improving Java Lexer for Newline Sanitization

    • Resolved a parsing issue where comments between class declarations and RequestMapping annotations were improperly sanitized along with newlines.
    • Adjusted the lexer to correctly process comments and newlines without affecting subsequent mappings.

These changes improve the stability and reliability of endpoint parsing and Java annotation handling in the application.

Changes

  • Commit 8650dd4: Added handling for empty URLs in endpoint parsing.
  • Commit e04cc638: Prevented crashes caused by empty URL strings.
  • Commit 9e70456: Adjusted Java lexer to handle newline sanitization correctly.

Testing

  • Verified that endpoints with empty URLs are no longer created.
  • Confirmed that comments and newlines between class declarations and annotations are processed correctly.
  • Updated unit tests to cover these edge cases.

@ksg97031 ksg97031 self-assigned this Nov 10, 2024
@github-actions github-actions bot added the 🥢 mini-lexer Issue for mini-lexer and mini-parser label Nov 10, 2024
@ksg97031 ksg97031 closed this Nov 10, 2024
@ksg97031 ksg97031 reopened this Nov 10, 2024
@github-actions github-actions bot added the 💊 spec Issue for test codes label Nov 10, 2024
@ksg97031 ksg97031 merged commit fd712d7 into dev Nov 10, 2024
10 checks passed
@hahwul hahwul added this to the NextVersion milestone Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🥢 mini-lexer Issue for mini-lexer and mini-parser 💊 spec Issue for test codes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants