From 17737b1cc94b1b36a324bacd660f2e94e9efde9f Mon Sep 17 00:00:00 2001 From: Mavaddat Javid <5055400+mavaddat@users.noreply.github.com> Date: Tue, 9 Jan 2024 22:00:01 -0500 Subject: [PATCH] Update check_and_update_jdk.py > Since [b1d0831](https://github.com/redhat-developer/vscode-java/commit/b1d08312b3d986368afbbe56e9271b4f9d6758fc) , we took advantage of [settings groups](https://code.visualstudio.com/docs/getstarted/settings#_settings-groups), which made the configuration object contain a list of the groups, each containing a properties objects. --- .github/scripts/check_and_update_jdk.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/check_and_update_jdk.py b/.github/scripts/check_and_update_jdk.py index a02bd0d48..a281b384a 100644 --- a/.github/scripts/check_and_update_jdk.py +++ b/.github/scripts/check_and_update_jdk.py @@ -78,7 +78,7 @@ package = json.load(f) # Add the latest JDK version to the java.configuration.runtimes array - package['contributes']['configuration']['properties']['java.configuration.runtimes']['items']['enum'].append(f'JavaSE-{latest_jdk}') + next(filter(lambda e: e['id'] == "java-jdks", package['contributes']['configuration']))['properties']['java.configuration.runtimes']['items']['properties']['name']['enum'] # Write the updated package.json file with open('package.json', 'w') as f: