From 4faad305de3ec4d9a9dbe0dd7e3d078e99bf7376 Mon Sep 17 00:00:00 2001 From: Jonah Graham Date: Wed, 10 Aug 2022 15:31:54 -0400 Subject: [PATCH] Add reflection access when running some old tests (#28) This is the exception that would have been raised. java.lang.reflect.UndeclaredThrowableException at org.eclipse.cdt.core.cdescriptor.tests.CDescriptorOldTests.testProjectDataCreate(CDescriptorOldTests.java:370) Caused by: java.lang.IllegalAccessException: class org.eclipse.cdt.internal.core.CConfigBasedDescriptor$1 cannot access class com.sun.org.apache.xerces.internal.dom.ParentNode (in module java.xml) because module java.xml does not export com.sun.org.apache.xerces.internal.dom to unnamed module @772861aa at org.eclipse.cdt.core.cdescriptor.tests.CDescriptorOldTests.testProjectDataCreate(CDescriptorOldTests.java:370) It may be that --add-opens=java.xml/com.sun.org.apache.xerces.internal.dom=ALL-UNNAMED can/should be added to the product, similar to linuxtools in https://github.com/eclipse-linuxtools/org.eclipse.linuxtools/pull/20/files but as this affects only some special use cases that are probably not really in existence anymore we are just fixing the tests. Alternative would be to simply delete these old tests (CDescriptorOldTests) and surrounding code. --- pom.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 06389c4b5dd..c27f4676fdd 100644 --- a/pom.xml +++ b/pom.xml @@ -46,7 +46,8 @@ https://download.eclipse.org/eclipse/updates/4.24/ scm:git:https://git.eclipse.org/r/cdt/org.eclipse.cdt - -Xms256m -Xmx512m -ea + + -Xms256m -Xmx512m -ea --add-opens=java.xml/com.sun.org.apache.xerces.internal.dom=ALL-UNNAMED https://download.eclipse.org/tools/cdt/releases/10.6/cdt-10.6.0/