Skip to content

Commit 293b603

Browse files
mavaddatrgrunber
authored andcommitted
Regex update and sealed removed.
- Make `.` optional in the regex. Also, remove `sealed` class tests.
1 parent 93e0a42 commit 293b603

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

.github/scripts/check_and_update_jdk.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
# Query the Oracle website for the latest JDK version
1111
response = requests.get('http://javadl-esd-secure.oracle.com/update/baseline.version')
12-
latest_jdk = re.search(r'(?P<major>\d+)\.', response.text)
12+
latest_jdk = re.search(r'(?P<major>\d+)\.?', response.text)
1313
if latest_jdk is None:
1414
print('Failed to retrieve latest JDK version')
1515
exit(1)
@@ -33,10 +33,6 @@
3333
uri_base = 'https://ci.eclipse.org/ls/job/jdt-ls-master/lastCompletedBuild/testReport/org.eclipse.jdt.ls.core.internal.{package}/{java_class}/{method}/api/python'
3434
# Define the test URLs to check using the template and list comprehension
3535
tests = [
36-
uri_base.format(package='correction', java_class='ModifierCorrectionsQuickFixTest', method=m) for m in ['testAddSealedMissingClassModifierProposal', 'testAddSealedAsDirectSuperClass', 'testAddPermitsToDirectSuperClass']
37-
] + [
38-
uri_base.format(package='correction', java_class='UnresolvedTypesQuickFixTest', method='testTypeInSealedTypeDeclaration')
39-
] + [
4036
uri_base.format(package='managers', java_class=c, method=m) for c, m in [('EclipseProjectImporterTest', 'testPreviewFeaturesDisabledByDefault'), ('InvisibleProjectImporterTest', 'testPreviewFeaturesEnabledByDefault'), ('MavenProjectImporterTest', f'testJava{latest_jdk}Project')]
4137
]
4238

@@ -61,11 +57,11 @@
6157

6258
# Replace the ~ with current_jdk
6359
readme_ver_pattern = re.sub('~', current_jdk, readme_ver_pattern)
64-
60+
6561
# Write this to a file for the create-pull-request workflow
6662
with open('latest_jdk.txt', 'w') as f:
6763
f.write(latest_jdk)
68-
64+
6965
# Replace the current supported JDK version with the latest JDK version
7066
readme = re.sub(readme_ver_pattern, latest_jdk, readme)
7167

0 commit comments

Comments
 (0)