File tree Expand file tree Collapse file tree 6 files changed +50
-3
lines changed
ui/org.eclipse.pde.junit.runtime
src9/org/eclipse/pde/internal/junit/runtime
src/org/eclipse/pde/internal/junit/runtime Expand file tree Collapse file tree 6 files changed +50
-3
lines changed Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" UTF-8" ?>
22<classpath >
3- <classpathentry kind =" con" path =" org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8" />
3+ <classpathentry kind =" con" path =" org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-9" >
4+ <attributes >
5+ <attribute name =" module" value =" true" />
6+ </attributes >
7+ </classpathentry >
48 <classpathentry kind =" con" path =" org.eclipse.pde.core.requiredPlugins" />
59 <classpathentry kind =" src" path =" src" />
10+ <classpathentry kind =" src" path =" src9" >
11+ <attributes >
12+ <attribute name =" release" value =" 9" />
13+ </attributes >
14+ </classpathentry >
615 <classpathentry kind =" output" path =" bin" />
716</classpath >
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ org.eclipse.jdt.core.circularClasspath=error
88org.eclipse.jdt.core.classpath.exclusionPatterns =enabled
99org.eclipse.jdt.core.classpath.multipleOutputLocations =enabled
1010org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode =enabled
11+ org.eclipse.jdt.core.compiler.codegen.methodParameters =do not generate
1112org.eclipse.jdt.core.compiler.codegen.targetPlatform =1.8
1213org.eclipse.jdt.core.compiler.codegen.unusedLocal =preserve
1314org.eclipse.jdt.core.compiler.compliance =1.8
Original file line number Diff line number Diff line change 11compilers.f.unresolved-features =1
22compilers.f.unresolved-plugins =1
3- compilers.incompatible-environment =0
3+ compilers.incompatible-environment =2
44compilers.p.build =1
55compilers.p.build.bin.includes =1
66compilers.p.build.encodings =2
@@ -12,14 +12,18 @@ compilers.p.build.source.library=1
1212compilers.p.build.src.includes =1
1313compilers.p.deprecated =1
1414compilers.p.discouraged-class =1
15+ compilers.p.exec-env-too-low =2
16+ compilers.p.ignored-resource-protocols =
1517compilers.p.internal =1
1618compilers.p.matching-pom-version =0
1719compilers.p.missing-packages =0
1820compilers.p.missing-version-export-package =2
1921compilers.p.missing-version-import-package =2
2022compilers.p.missing-version-require-bundle =2
2123compilers.p.no-required-att =0
24+ compilers.p.no.automatic.module =1
2225compilers.p.not-externalized-att =1
26+ compilers.p.service.component.without.lazyactivation =1
2327compilers.p.unknown-attribute =1
2428compilers.p.unknown-class =1
2529compilers.p.unknown-element =1
Original file line number Diff line number Diff line change @@ -14,3 +14,4 @@ Bundle-ActivationPolicy: lazy
1414Import-Package : org.eclipse.ui.testing;resolution:=optional
1515DynamicImport-Package : org.junit.platform.engine;version="[1.14.0,2.0.0)"
1616Automatic-Module-Name : org.eclipse.pde.junit.runtime
17+ Multi-Release : true
Original file line number Diff line number Diff line change 2424
2525/**
2626 * Default implementation used with Java 1.8
27- * TODO provide MR variant using stack walker, currently blocked by JDT bug ...
2827 */
2928public class Caller {
3029
Original file line number Diff line number Diff line change 1+ /*******************************************************************************
2+ * Copyright (c) 2025 Christoph Läubrich and others.
3+ * This program and the accompanying materials
4+ * are made available under the terms of the Eclipse Public License 2.0
5+ * which accompanies this distribution, and is available at
6+ * https://www.eclipse.org/legal/epl-2.0/
7+ *
8+ * SPDX-License-Identifier: EPL-2.0
9+ *
10+ * Contributors:
11+ * Christoph Läubrich - initial API and implementation
12+ *
13+ */
14+ package org .eclipse .pde .internal .junit .runtime ;
15+
16+ import java .util .Objects ;
17+
18+ import org .osgi .framework .Bundle ;
19+ import org .osgi .framework .FrameworkUtil ;
20+
21+ /**
22+ * Release specific implementation that using stack walker
23+ */
24+ public class Caller {
25+
26+ private static final StackWalker WALKER = StackWalker .getInstance (StackWalker .Option .RETAIN_CLASS_REFERENCE );
27+ private static final Bundle LOADER_BUNDLE = FrameworkUtil .getBundle (SPIBundleClassLoader .class );
28+
29+ static Bundle getBundle (int junitVersion ) {
30+ return WALKER .walk (stream -> stream .map (sf -> FrameworkUtil .getBundle (sf .getDeclaringClass ())).filter (Objects ::nonNull ).filter (b -> b != LOADER_BUNDLE ).findFirst ().orElse (null ));
31+ }
32+
33+ }
You can’t perform that action at this time.
0 commit comments