Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Require-Bundle: org.eclipse.jdt.core,
org.eclipse.text,
org.eclipse.ltk.core.refactoring,
org.eclipse.debug.core,
org.eclipse.jdt.junit.core,
org.eclipse.jdt.junit.core;bundle-version="[3.15.0,4.0.0)",
org.eclipse.jdt.junit.runtime,
org.eclipse.jdt.junit4.runtime,
org.eclipse.jdt.junit5.runtime,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Arrays;
Expand Down Expand Up @@ -96,13 +94,8 @@ public Response<JUnitLaunchArguments> getJUnitLaunchArguments(ILaunchConfigurati
IProgressMonitor monitor) {
final ILaunch launch = new Launch(configuration, mode, null);

// TODO: Make the getVMRunnerConfiguration() in super class protected.
try {
final Method getVMRunnerConfiguration = getClass().getSuperclass().getDeclaredMethod(
"getVMRunnerConfiguration", ILaunchConfiguration.class, ILaunch.class, String.class,
IProgressMonitor.class);
getVMRunnerConfiguration.setAccessible(true);
final VMRunnerConfiguration config = (VMRunnerConfiguration) getVMRunnerConfiguration.invoke(this,
final VMRunnerConfiguration config = getVMRunnerConfiguration(
configuration, launch, mode, new NullProgressMonitor());
final IJavaProject javaProject = getJavaProject(configuration);
final JUnitLaunchArguments launchArguments = new JUnitLaunchArguments();
Expand All @@ -115,8 +108,7 @@ public Response<JUnitLaunchArguments> getJUnitLaunchArguments(ILaunchConfigurati
launchArguments.programArguments = parseParameters(config.getProgramArguments());

return new Response<>(launchArguments, null);
} catch (NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException |
InvocationTargetException | CoreException e) {
} catch (CoreException e) {
JUnitPlugin.logException("failed to resolve the classpath.", e);
final String msg = e.getCause() != null ? e.getCause().getMessage() : e.getMessage();
return new Response<>(null, msg);
Expand Down
Loading