Skip to content

Commit 2756a6f

Browse files
committed
Properly create IJavaProject in JpmsConfigurationTest
The pattern used to cast java nature to java project is wrong and we have seen it used in many places but broke for some reason with 2024-03. This reduces the failing tests of #1720 .
1 parent 41bce90 commit 2756a6f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

org.eclipse.m2e.jdt.tests/src/org/eclipse/m2e/jdt/tests/JpmsConfigurationTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public void testFileChangeUpdatesJPMSSettings() throws CoreException, IOExceptio
7575
waitForJobsToComplete();
7676

7777
// At start, check all attributes are empty
78-
IJavaProject javaProject = (IJavaProject) project.getNature(JavaCore.NATURE_ID);
78+
IJavaProject javaProject = JavaCore.create(project);
7979
Map<String, String> jreAttributes = Utils.getJreContainerAttributes(javaProject);
8080
Map<String, String> m2eAttributes = Utils.getM2eContainerAttributes(javaProject);
8181

0 commit comments

Comments
 (0)