Title: Use ClassId name in prettifiedName if canonical name is null by dtim · Pull Request #484 · UnitTestBot/UTBotJava · GitHub
Open Graph Title: Use ClassId name in prettifiedName if canonical name is null by dtim · Pull Request #484 · UnitTestBot/UTBotJava
X Title: Use ClassId name in prettifiedName if canonical name is null by dtim · Pull Request #484 · UnitTestBot/UTBotJava
Description: Description Anonymous classes do not have canonical names, It makes ClassId::canonicalName property fail with an exception. ClassId::prettifiedName fails for anonymous classes as well. This fix changes the call to exception-throwing ClassId::canonicalName in prettifiedName with an explicit call to jClass::canonicalName which returns a nullable value. If the class has no canonical name, ClassId::name is used instead. Fixes #459 Type of Change Bug fix (non-breaking change which fixes an issue) How Has This Been Tested? Automated Testing Existing tests should not fail. Manual Scenario Run contest estimator with methodFilter = "com.google.common.base.CaseFormat.*" and projectFilter = null. Without this fix, errors like this will be presented: public void testValues_errors() { // Couldn't generate some tests. List of errors: // // 1 occurrences of: // ClassId com.google.common.base.CaseFormat$1 does not have canonical name } With the fix, no these errors will be produced (many other errors will probably be generated instead, as there are related bugs and limitations in enum processing, both in engine and codegen). 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 Anonymous classes do not have canonical names, It makes ClassId::canonicalName property fail with an exception. ClassId::prettifiedName fails for anonymous classes as well. This fix cha...
X Description: Description Anonymous classes do not have canonical names, It makes ClassId::canonicalName property fail with an exception. ClassId::prettifiedName fails for anonymous classes as well. This fix cha...
Opengraph URL: https://github.com/UnitTestBot/UTBotJava/pull/484
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:7817a663-7f49-0833-28b6-c0469398c5f6 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 990C:2386CF:1183E0:16DF82:6990934F |
| html-safe-nonce | 4eac0230f14b97922cc46a7d4029f4aba86e7bb4734d9d34f5b7b3b615fa83a2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5OTBDOjIzODZDRjoxMTgzRTA6MTZERjgyOjY5OTA5MzRGIiwidmlzaXRvcl9pZCI6IjUxNzUzNTUzMzMzOTcyMjIyMjMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 39719e0b3556571793cc2bda2dfc027123aa7d07e895f0f76f669d7087e6f7b6 |
| hovercard-subject-tag | pull_request:993111362 |
| 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/484/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 Anonymous classes do not have canonical names, It makes ClassId::canonicalName property fail with an exception. ClassId::prettifiedName fails for anonymous classes as well. This fix cha... |
| 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