Title: fix: honor source encodings when resolving breakpoints by chagong · Pull Request #647 · microsoft/java-debug · GitHub
Open Graph Title: fix: honor source encodings when resolving breakpoints by chagong · Pull Request #647 · microsoft/java-debug
X Title: fix: honor source encodings when resolving breakpoints by chagong · Pull Request #647 · microsoft/java-debug
Description: Summary Fixes microsoft/vscode-java-debug#1726. The file-backed source lookup decoded Java sources with the language-server JVM's default charset before parsing them. UTF-16 bytes consequently produced an unusable AST and no breakpoint class name, leaving line breakpoints unverified. Use Eclipse IFile.readString() for workspace resources, honoring file/project encodings and stripping Unicode BOMs. Recognize UTF-16 LE/BE and UTF-8 BOMs for external sources with the already bundled Commons IO reader. Preserve the JVM-default fallback for external files without a BOM, and log source-read failures. Add 14 headless Eclipse/JDT regression cases exercising getBreakpointLocations() from actual encoded files through AST parsing to the resolved class name and line. Cover workspace and external BOMs, BOM-less resource encodings, UTF-8, and ISO-8859-1 with a non-ASCII package identifier. Enable same-module Tycho plugin tests. Include the optional m2e/Buildship runtime dependencies needed to start JDT LS, and keep the compiler compatible with the Eclipse 4.38 JDT model (the moving snapshot otherwise selects an incompatible compiler and fails external AST binding with NoSuchMethodError). README.md has no net changes relative to the PR base. The documentation-only follow-up 46db436a48270e53eb169f868d19ffdef2ed6d0b removes the original README additions without changing the runtime fix or regression coverage. There is no suitable existing contributor guide, so contributor-facing build/test evidence and implementation rationale remain in this PR description rather than a new repository document. Verification Performed for the unchanged runtime fix in this cloud worktree on Linux with Temurin JDK 27 (Java 21 plugin target): Original reader reproduced null/incorrect breakpoint class names for UTF-16 and configured single-byte workspace sources. ./mvnw -B -ntp clean verify — passed: 55 existing core tests and all 14 new headless plugin cases. ./mvnw -B -ntp checkstyle:check — passed. ./mvnw -B -ntp -pl com.microsoft.java.debug.plugin,com.microsoft.java.debug.target checkstyle:check -Dcheckstyle.includeTestSourceDirectory=true — passed, including the new tests. Initial implementation CI completed successfully for commit 5a6483183afaff90e2711b1df3fef29e6f4f2f0a on Linux, Windows, and macOS with JDK 21. Every platform ran all 14 plugin regression cases with no failures or skips, and passed Checkstyle. The existing core suite ran 55 cases per platform (one existing Windows-only skip; no failures). The CLA check also passed. Copilot review was requested after CI passed and reported no open issues on that implementation commit. Current-head CI also completed successfully for the README-only follow-up 46db436a48270e53eb169f868d19ffdef2ed6d0b: clean verify and Checkstyle passed on Linux, Windows, and macOS with JDK 21, and the CLA check passed. The follow-up was verified with zero net README diff against the PR base and no changes to the runtime, tests, or harness. No redundant local build was run for that documentation-only change. These are real JVM/JDT integration tests, not just byte-decoder checks. No VS Code UI/debuggee end-to-end reproduction was performed; the claim verified here is correct source decoding and breakpoint class-name/location resolution.
Open Graph Description: Summary Fixes microsoft/vscode-java-debug#1726. The file-backed source lookup decoded Java sources with the language-server JVM's default charset before parsing them. UTF-16 bytes consequently ...
X Description: Summary Fixes microsoft/vscode-java-debug#1726. The file-backed source lookup decoded Java sources with the language-server JVM's default charset before parsing them. UTF-16 bytes consequen...
Opengraph URL: https://github.com/microsoft/java-debug/pull/647
X: @github
Domain: github.com
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:5a3ce9b1-5fa4-1e6b-9acd-1e4d80d70b4b |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | DA1A:25D1C1:69FCE:8E3F3:6AF67507 |
| html-safe-nonce | d778e6987706b3c90b5fec0deb1b222873b507debe0a406d0697699462cd2218 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQTFBOjI1RDFDMTo2OUZDRTo4RTNGMzo2QUY2NzUwNyIsInZpc2l0b3JfaWQiOiIzMjk4NTEyMzUzNzI0MTAxODk1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 11604cfe238c06932339a884c3eb2e65728dee4cb74680757aa21bfbf1cee9bc |
| hovercard-subject-tag | pull_request:5060903310 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/microsoft/java-debug/pull/647/files |
| twitter:image | https://avatars.githubusercontent.com/u/831821?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/831821?s=400&v=4 |
| og:image:alt | Summary Fixes microsoft/vscode-java-debug#1726. The file-backed source lookup decoded Java sources with the language-server JVM's default charset before parsing them. UTF-16 bytes consequently ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5451898e13f81636602c8a1de0fb8d7190b7b2a473a9f8241168fd4dd110372e |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/microsoft/java-debug git https://github.com/microsoft/java-debug.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 102583752 |
| octolytics-dimension-repository_nwo | microsoft/java-debug |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 102583752 |
| octolytics-dimension-repository_network_root_nwo | microsoft/java-debug |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8ba36e600310e0a3f7f56ea2244ea1240ea62bbf |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width