Title: Fix searching of modifiers field for JDK 8-17 by sergeypospelov · Pull Request #408 · UnitTestBot/UTBotJava · GitHub
Open Graph Title: Fix searching of modifiers field for JDK 8-17 by sergeypospelov · Pull Request #408 · UnitTestBot/UTBotJava
X Title: Fix searching of modifiers field for JDK 8-17 by sergeypospelov · Pull Request #408 · UnitTestBot/UTBotJava
Description: Description Changed the way of searching modifiers field in ReflectionUtil.kt. The suggested change works for JDK 8-17, but doesn't work for JDK 18. Fixes #374 Type of Change Bug fix (non-breaking change which fixes an issue) How Has This Been Tested? Manual Scenario Repeated To Reproduce section from the #374: Steps to reproduce the behavior: Define JDK-13 as primary (Path, JAVA_HOME) Download one of the latest CLI from master For simplicity in the folder where utbot-cli*.jar is located : Create ExampleString.java using var (feature introduced in Java 9) public class ExampleString { public void stringNewMethod() { var text = "Hello!\n This is String defined with var"; text = text.toLowerCase(); System.out.println(text); text = text.toUpperCase(); System.out.println(text); } } Compile your files with JDK-13 javac -version javac ExampleString.class Run utbot-cli to generate tests for it, like that: java -jar utbot-cli-2022.7.jar generate --source ExampleString.java --classpath "D:\Current\Java" -o ExampleStringTest.java ExampleString Tests are generated. Checklist (remove irrelevant options): 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 New documentation is provided or existed one is altered No new warnings Tests that prove my change is effective All tests pass locally with my changes
Open Graph Description: Description Changed the way of searching modifiers field in ReflectionUtil.kt. The suggested change works for JDK 8-17, but doesn't work for JDK 18. Fixes #374 Type of Change Bug fix (non-brea...
X Description: Description Changed the way of searching modifiers field in ReflectionUtil.kt. The suggested change works for JDK 8-17, but doesn't work for JDK 18. Fixes #374 Type of Change Bug fix (non-...
Opengraph URL: https://github.com/UnitTestBot/UTBotJava/pull/408
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:1eef8eb5-8c22-7d90-9780-edd2899ff1fa |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | E2DA:CF362:D28625:10CC8F7:69901964 |
| html-safe-nonce | e2dcf5db031ec95cc2059f9a6d0e0cc2002a225dc11d9483fc626090be4dbd63 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMkRBOkNGMzYyOkQyODYyNToxMENDOEY3OjY5OTAxOTY0IiwidmlzaXRvcl9pZCI6IjM5NDI1NTYzMDYxOTIyMTAyNzYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 1b2b6edf4f1873a11f3b66c4008e8d6927f4a24429159facd041af023e7ad666 |
| hovercard-subject-tag | pull_request:987096104 |
| 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/408/files |
| twitter:image | https://avatars.githubusercontent.com/u/30112817?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/30112817?s=400&v=4 |
| og:image:alt | Description Changed the way of searching modifiers field in ReflectionUtil.kt. The suggested change works for JDK 8-17, but doesn't work for JDK 18. Fixes #374 Type of Change Bug fix (non-brea... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 42c603b9d642c4a9065a51770f75e5e27132fef0e858607f5c9cb7e422831a7b |
| 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 |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3b33c5aedc9808f45bc5fcf0b1e4404cf749dac7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width