-
Notifications
You must be signed in to change notification settings - Fork 466
"java.lang.IllegalArgumentException: Bad escape" when path has non-ASCII characters #3735
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
Comments
Are you able to share the sample project for which this occurs ? Seems pretty similar to https://bugs.openjdk.org/browse/JDK-8162518 . |
@rgrunber that non ASCII character bug is the culprit, thank you! My new system is German and turns out the OneDrive directory is not ~/Library/CloudStorage/OneDrive-Personal anymore but OneDrive-Persönlich. That ö is causing all the trouble. After moving the folder out of OneDrive, plugin version 1.33.0 worked absolutely flawlessly. Thank you so much. Still don't quite understand why 1.32.0 can handle that ö but 1.33.0 can't though. |
We added a new feature in 1.33.0 that requires checking each file (most likely when diagnostics need to be update). This happens in places like : https://github.com/eclipse-jdtls/eclipse.jdt.ls/blob/master/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/handlers/BaseDiagnosticsHandler.java#L149-L155 . This ends up calling https://github.com/eclipse-jdtls/eclipse.jdt.ls/blob/master/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/JDTUtils.java#L1837-L1846 . We can definitely reduce the likelihood of this for people not using the filter feature, since we can check if the list is empty ( Update: I also found errors that likely existed even before 1.33.0 relating to mishandling of non-ascii characters in the paths :
|
We can try to use
instead of
|
I can add that to the existing PR after testing that it works. |
Same issue happens when chinese characters appear in the address of the project... |
EDIT: CORRECTION
TLDR is that on version 1.33.0, when the project path contains non-ASCII characters, diagnostics would throw the exception
java.lang.IllegalArgumentException: Bad escape
. Moving the project to a path that contains only ASCII characters would prevent this.Original Post
[provide a description of the issue]
(Noobie here, I'm sorry if I am not supposed to ask about this here)
Fresh install of openjdk@21, vscode (universal binary) and Extension Pack for Java (that includes redhat-developer/vscode-java 1.33.0) on arm64 macOS 15.0 will cause internal errors when loading in any java projects and the plugin will then provide no syntax checking. The plugin on 1.32.0 functions as expected.
Most errors are of the same type, here is an example:
Environment
Steps To Reproduce
brew install openjdk@21
Load any projects or create a new oneLoad any projects WITH PATH containing non-ASCII characters*[Please attach a sample project reproducing the error]
Any project will do.Projects located in paths with non-ASCII charactersPlease attach logs
log.log
Current Result
Expected Result
Additional Informations
The text was updated successfully, but these errors were encountered: