Title: Initiate concrete execution if a wrapper method is missing by dtim · Pull Request #392 · UnitTestBot/UTBotJava · GitHub
Open Graph Title: Initiate concrete execution if a wrapper method is missing by dtim · Pull Request #392 · UnitTestBot/UTBotJava
X Title: Initiate concrete execution if a wrapper method is missing by dtim · Pull Request #392 · UnitTestBot/UTBotJava
Description: Description If a JVM class is overridden but a method is missing from the wrapper, the engine will discard the path and fall back to concrete execution instead of analysing the real JVM code graph. This approach fixes the problem with methods that have been introduced in newer JDKs. Now wrappers are mostly limited to Java 1.8 interfaces and fail to analyze methods like String::isBlank or String::lines when the code runs under JDK 11. Building graphs from the real JDK code fails because the wrapper does not have private fields that the original code uses. TODO: to allow symbolic analysis of the code, missing methods should be actually implemented in corresponding wrappers. Fixes #375 Type of Change Breaking change (fix or feature that would cause existing functionality to not work as expected) How Has This Been Tested? Existing unit tests did not break on JDK 1.8. Tests involving JDK 11 String methods missing from UtString wrapper are correctly generated by the plugin (debug IDE). Automated Testing No new automated tests have been added: we use JDK 1.8 to run unit tests. Manual Scenario Sample code: import org.jetbrains.annotations.NotNull; public class NewMethods { public long countLines(@NotNull String text) { return text.lines().count(); } public String firstLine(@NotNull String text) { return text.lines().findFirst().orElse(null); } public boolean checkBlank(@NotNull String text) { return text.strip().isBlank(); } } Tests for all these methods should be generated. Checklist: The change followed the style guidelines of the UTBot project Self-review of the code is passed The change contains enough commentaries, particularly in hard-to-understand areas No new warnings Tests that prove my change is effective (manual tests only). All tests pass locally with my changes
Open Graph Description: Description If a JVM class is overridden but a method is missing from the wrapper, the engine will discard the path and fall back to concrete execution instead of analysing the real JVM code graph....
X Description: Description If a JVM class is overridden but a method is missing from the wrapper, the engine will discard the path and fall back to concrete execution instead of analysing the real JVM code graph....
Opengraph URL: https://github.com/UnitTestBot/UTBotJava/pull/392
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:44167e91-8dfb-8c55-b130-c478a6f023c6 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | D442:9A1E2:3080D78:41A7857:698DC009 |
| html-safe-nonce | 8b421b5c3ec4a9c9c3e178c376af11cee4e4292487e7e8132b07946bf30d4b68 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENDQyOjlBMUUyOjMwODBENzg6NDFBNzg1Nzo2OThEQzAwOSIsInZpc2l0b3JfaWQiOiIyNDc5NDQ2MjU5MTAzODA5NTQ1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 5ff67af862991d23b29ee3a795b0922dcb137ab32d29a577b51307f1ad343cf1 |
| hovercard-subject-tag | pull_request:986514830 |
| 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/UnitTestBot/UTBotJava/pull/392/files |
| twitter:image | https://avatars.githubusercontent.com/u/336793?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/336793?s=400&v=4 |
| og:image:alt | Description If a JVM class is overridden but a method is missing from the wrapper, the engine will discard the path and fall back to concrete execution instead of analysing the real JVM code graph.... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 2457fd9a1b17ca7f38c3c2653895ccb2e0dd04f18f77446a21354e9bc4b7902f |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/UnitTestBot/UTBotJava git https://github.com/UnitTestBot/UTBotJava.git |
| octolytics-dimension-user_id | 87413538 |
| octolytics-dimension-user_login | UnitTestBot |
| octolytics-dimension-repository_id | 480810501 |
| octolytics-dimension-repository_nwo | UnitTestBot/UTBotJava |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 480810501 |
| octolytics-dimension-repository_network_root_nwo | UnitTestBot/UTBotJava |
| 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 | 878672b82363fd98fbdc5bd0edb68e572c8a8d9b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width