Skip to content

Commit 85defd7

Browse files
authored
fix: language question result conversion in default setup (#1640)
### Motivation The code for selecting the language in the default task setup was changed to use locales instead of strings, however the result handling was not changed accordingly. This results in a class cast exception when the results are being processed. ### Modification Change the default setup result handler to use locales instead of strings. ### Result No more class cast exceptions when completing the default config setup.
1 parent d36b7b7 commit 85defd7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

node/impl/src/main/java/eu/cloudnetservice/node/impl/setup/DefaultConfigSetup.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,8 @@ public void applyQuestions(@NonNull ConsoleSetupAnimation animation) {
217217
@Override
218218
public void handleResults(@NonNull ConsoleSetupAnimation animation) {
219219
// language
220-
this.configuration.language(animation.result("language"));
220+
Locale selectedLanguage = animation.result("language");
221+
this.configuration.language(selectedLanguage.toLanguageTag());
221222

222223
// init the local node identity
223224
HostAndPort host = animation.result("internalHost");

0 commit comments

Comments
 (0)