Title: Plugin fails with an exception if no SDK is configured for the test module · Issue #399 · UnitTestBot/UTBotJava · GitHub
Open Graph Title: Plugin fails with an exception if no SDK is configured for the test module · Issue #399 · UnitTestBot/UTBotJava
X Title: Plugin fails with an exception if no SDK is configured for the test module · Issue #399 · UnitTestBot/UTBotJava
Description: Description If the test module has no Java SDK configured, the plugin fails when it tries to get JDK version in UtTestsDialogProcessor::createDialog. To Reproduce In "Project Settings" dialogue set Project SDK as "No SDK", test module SD...
Open Graph Description: Description If the test module has no Java SDK configured, the plugin fails when it tries to get JDK version in UtTestsDialogProcessor::createDialog. To Reproduce In "Project Settings" dialogue set...
X Description: Description If the test module has no Java SDK configured, the plugin fails when it tries to get JDK version in UtTestsDialogProcessor::createDialog. To Reproduce In "Project Settings" di...
Opengraph URL: https://github.com/UnitTestBot/UTBotJava/issues/399
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Plugin fails with an exception if no SDK is configured for the test module","articleBody":"**Description**\r\n\r\nIf the test module has no Java SDK configured, the plugin fails when it tries to get JDK version in `UtTestsDialogProcessor::createDialog`.\r\n\r\n**To Reproduce**\r\n\r\nIn \"Project Settings\" dialogue set Project SDK as \"No SDK\", test module SDK as \"No SDK\". Try to generate tests for a class or a method.\r\n\r\n**Expected behavior**\r\n\r\nNo tests are generated. Either a dialogue is open with an error message, or a stand-alone error message is displayed.\r\n\r\n**Actual behavior**\r\n\r\nA stand-alone error message is displayed (supposedly by Idea), the plugin fails with an `IllegalStateException`.\r\n\r\n**Visual proofs (screenshots, logs, images)**\r\n\r\n```\r\n2022-07-04 18:17:50,954 [ 25595] ERROR - llij.ide.plugins.PluginManager - Failed to obtain JDK version of the project \r\njava.lang.IllegalStateException: Failed to obtain JDK version of the project\r\n\tat org.utbot.intellij.plugin.ui.ErrorNotifier.notify(Notifications.kt:51)\r\n\tat org.utbot.intellij.plugin.ui.Notifier.notify$default(Notifications.kt:29)\r\n\tat org.utbot.intellij.plugin.ui.utils.ModuleUtilsKt.jdkVersionBy(ModuleUtils.kt:243)\r\n\tat org.utbot.intellij.plugin.ui.utils.ModuleUtilsKt.jdkVersion(ModuleUtils.kt:43)\r\n\tat org.utbot.intellij.plugin.ui.UtTestsDialogProcessor.createDialog(UtTestsDialogProcessor.kt:72)\r\n\tat org.utbot.intellij.plugin.ui.UtTestsDialogProcessor.createDialogAndGenerateTests(UtTestsDialogProcessor.kt:55)\r\n\tat org.utbot.intellij.plugin.ui.actions.GenerateTestsAction.actionPerformed(GenerateTestsAction.kt:29)\r\n\tat com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:282)\r\n\tat com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher$1.performAction(IdeKeyEventDispatcher.java:610)\r\n\tat com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.lambda$processAction$3(IdeKeyEventDispatcher.java:670)\r\n\tat com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:94)\r\n\tat com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:669)\r\n\tat com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:620)\r\n\tat com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processActionOrWaitSecondStroke(IdeKeyEventDispatcher.java:517)\r\n\tat com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.inInitState(IdeKeyEventDispatcher.java:471)\r\n\tat com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.dispatchKeyEvent(IdeKeyEventDispatcher.java:220)\r\n\tat com.intellij.ide.IdeEventQueue.dispatchKeyEvent(IdeEventQueue.java:888)\r\n\tat com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:833)\r\n\tat com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:450)\r\n\tat com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:744)\r\n\tat com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:449)\r\n\tat com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:802)\r\n\tat com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:503)\r\n\tat java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)\r\n\tat java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)\r\n\tat java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)\r\n\tat java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)\r\n\tat java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)\r\n\tat java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)\r\n2022-07-04 18:17:50,955 [ 25596] ERROR - llij.ide.plugins.PluginManager - IntelliJ IDEA 2020.2 Build #IC-202.6397.94 \r\n2022-07-04 18:17:50,955 [ 25596] ERROR - llij.ide.plugins.PluginManager - JDK: 11.0.7; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o. \r\n2022-07-04 18:17:50,955 [ 25596] ERROR - llij.ide.plugins.PluginManager - OS: Windows 10 \r\n2022-07-04 18:17:50,955 [ 25596] ERROR - llij.ide.plugins.PluginManager - Plugin to blame: UnitTestBot version: 1.0-SNAPSHOT \r\n2022-07-04 18:17:50,955 [ 25596] ERROR - llij.ide.plugins.PluginManager - Last Action: org.utbot.intellij.plugin.ui.actions.GenerateTestsAction \r\n```\r\n\r\n**Environment**\r\n\r\nA Gradle project imported in Idea, configured to use no SDK.\r\n ","author":{"url":"https://github.com/dtim","@type":"Person","name":"dtim"},"datePublished":"2022-07-04T15:31:23.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/399/UTBotJava/issues/399"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:2bba38ba-0a18-8491-e3ae-550238ea2509 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B152:3DB6FE:3B69BC:508AFC:698D8828 |
| html-safe-nonce | 2c62d6167b6ca19a8fb7b263b03f37a66aaaf11f214ea1c9be86b524a4114a93 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMTUyOjNEQjZGRTozQjY5QkM6NTA4QUZDOjY5OEQ4ODI4IiwidmlzaXRvcl9pZCI6IjQ0NjA0NzAwNTU5MzkyOTc2OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 0d3d4bc9b729a01be7f465e882b5713ebbb52b4c01d3341432d05c66d2c23131 |
| hovercard-subject-tag | issue:1293317083 |
| github-keyboard-shortcuts | repository,issues,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/_view_fragments/issues/show/UnitTestBot/UTBotJava/399/issue_layout |
| twitter:image | https://opengraph.githubassets.com/db1e6601a5942485c27108c5c5752c3aca089ee0c345b9c1430c19dd1f4e6cbb/UnitTestBot/UTBotJava/issues/399 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/db1e6601a5942485c27108c5c5752c3aca089ee0c345b9c1430c19dd1f4e6cbb/UnitTestBot/UTBotJava/issues/399 |
| og:image:alt | Description If the test module has no Java SDK configured, the plugin fails when it tries to get JDK version in UtTestsDialogProcessor::createDialog. To Reproduce In "Project Settings" dialogue set... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dtim |
| hostname | github.com |
| expected-hostname | github.com |
| None | c0818105fa276287e9369cfdefa0a0fa7953719791ceff9b94d69623c0a4fe8a |
| turbo-cache-control | no-preview |
| 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 | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 4c8f4bd0b67d7f1472d0ab3f49827eaae062a36b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width