-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
[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
| void uriMissingSchemeAndNotStartingWithWww() { | ||
| // URLs not starting with www. and without a scheme should still throw an exception | ||
| 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! ✅✨ |
* upstream/main: (32 commits) Fix path (#13769) Mode aware consistency check (#13584) Refine JBang check (#13765) Add Language Server to the UI and add the integrity/consistency check (#13697) Fix/remove comment code (#13763) New Crowdin updates (#13760) Bump org.openrewrite.rewrite from 7.14.0 to 7.14.1 (#13757) Bump com.autonomousapps:dependency-analysis-gradle-plugin (#13756) Bump dev.langchain4j:langchain4j-bom from 1.2.0 to 1.3.0 in /versions (#13755) Bump jablib/src/main/resources/csl-locales from `fa56de1` to `e29c453` (#13754) Bump com.autonomousapps:dependency-analysis-gradle-plugin (#13753) Bump org.mockito:mockito-core from 5.18.0 to 5.19.0 in /versions (#13752) Bump actions/upload-pages-artifact from 3 to 4 (#13751) Migrate fetchers to Search.g4 ANTLR parser. (#13691) [Junie]: fix: resolve IllegalArgumentException for non-absolute URIs (#13669) Add auto-renaming of linked files on entry data change (#13295) Walkthrough additions (#13745) Switch from zulu to corretto (#13749) New Crowdin updates (#13747) Fix copy to (#13741) ...
📌 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 absoluteerror in JabRef by modifying theURLUtil.createmethod to add "http://" to URLs starting with "www." All tests passed successfully after these changes, and the fix was documented in the CHANGELOG.md.