-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
[Junie]: fix: resolve IllegalArgumentException for non-absolute URIs #13669
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
[Junie]: fix: resolve IllegalArgumentException for non-absolute URIs #13669
Conversation
A fix was implemented for the `IllegalArgumentException: URI is not absolute` error in JabRef by modifying the `URLUtil.create` method to add "http://" to URLs starting with "www." All tests passed successfully after these changes, and the fix was documented in the CHANGELOG.md.
|
||
// Add http:// prefix to URLs starting with www. to make them absolute | ||
if (trimmedUrl.startsWith("www.")) { | ||
trimmedUrl = "http://" + trimmedUrl; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update to https - we have 2025 with http severywhere. @jetbrains-junie
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update to https - we have 2025 with http severywhere. https://github.com/jetbrains-junie
MalformedURLException exception = assertThrows(MalformedURLException.class, () -> | ||
URLUtil.create("www.example.com")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please keep the existin test - only add new ones @jetbrains-junie
Hey, it’s Junie by JetBrains! I started processing your request 🚀 |
@jetbrains-junie Add a test for the file field that tests this
|
❌ There is a running Junie process for this pull request. Please, wait until it would be finished or cancel the corresponding Junie action |
Future work: Add test to |
❌ Execution FailedThe application encountered an error during execution. Error Details:
More information: |
@jetbrains-junie Add test to org.jabref.logic.importer.util.FileFieldParserTest |
Hey, it’s Junie by JetBrains! I started processing your request 🚀 |
…th "www." A new test was successfully added to the `FileFieldParserTest` class to verify that URLs starting with "www." are correctly handled by converting them to absolute URLs using the "http://" prefix. The test case passed, confirming the fix made in the `URLUtil.create()` method. All existing tests in the class also passed without any errors.
✅ Generation Status
Message:
📌 Issues Detected During Processing
Message:
More information: |
@jetbrains-junie Ignore the build failures and try again |
Hey, it’s Junie by JetBrains! I started processing your request 🚀 |
❌ Execution FailedThe application encountered an error during execution. Error Details:
More information: |
…2-437d-a291-ced0190b26f1
@jetbrains-junie try again |
Hey, it’s Junie by JetBrains! I started processing your request 🚀 |
A fix was made to resolve the `IllegalArgumentException` by changing the `URLUtil.create` method to use "https://" for "www." prefixed URLs. All related tests were updated and passed successfully.
✅ The execution was successful
📌 Issues Detected During Processing
Issues:
More information: |
jablib/src/test/java/org/jabref/logic/importer/util/FileFieldParserTest.java
Show resolved
Hide resolved
@trag-bot didn't find any issues in the code! ✅✨ |
📌 Hey! This PR was made for you with Junie, the coding agent by JetBrains Early Access Preview
It's still learning, developing, and might make mistakes. Please make sure you review the changes before you accept them.
We'd love your feedback — join our Discord to share bugs, ideas: here.
📊 Junie Summary
A fix was implemented for the
IllegalArgumentException: URI is not absolute
error in JabRef by modifying theURLUtil.create
method to add "http://" to URLs starting with "www." All tests passed successfully after these changes, and the fix was documented in the CHANGELOG.md.