mirror of
https://github.com/openjdk/jdk.git
synced 2026-05-11 14:11:36 +00:00
8172255: JShell API: ExecutionControl/LoaderDelegate: Remove unused/unimplemented setClassPath
Reviewed-by: jlahoda
This commit is contained in:
parent
869f5bbd91
commit
f9b57bfbed
@ -114,12 +114,6 @@ class DefaultLoaderDelegate implements LoaderDelegate {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setClasspath(String path)
|
||||
throws EngineTerminationException, InternalException {
|
||||
throw new NotImplementedException("setClasspath: Not supported yet.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<?> findClass(String name) throws ClassNotFoundException {
|
||||
Class<?> klass = klasses.get(name);
|
||||
|
||||
@ -131,12 +131,6 @@ public class DirectExecutionControl implements ExecutionControl {
|
||||
loaderDelegate.addToClasspath(cp);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setClasspath(String path)
|
||||
throws EngineTerminationException, InternalException {
|
||||
loaderDelegate.setClasspath(path);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
|
||||
@ -147,12 +147,6 @@ class ExecutionControlForwarder {
|
||||
ec.addToClasspath(cp);
|
||||
return writeSuccess();
|
||||
}
|
||||
case CMD_SET_CLASSPATH: {
|
||||
// Set the claspath
|
||||
String cp = in.readUTF();
|
||||
ec.setClasspath(cp);
|
||||
return writeSuccess();
|
||||
}
|
||||
case CMD_STOP: {
|
||||
// Stop the current execution
|
||||
try {
|
||||
|
||||
@ -59,16 +59,6 @@ public interface LoaderDelegate {
|
||||
void addToClasspath(String path)
|
||||
throws EngineTerminationException, InternalException;
|
||||
|
||||
/**
|
||||
* Sets the execution class path to the specified path.
|
||||
*
|
||||
* @param path the path to add
|
||||
* @throws EngineTerminationException the execution engine has terminated
|
||||
* @throws InternalException an internal problem occurred
|
||||
*/
|
||||
void setClasspath(String path)
|
||||
throws EngineTerminationException, InternalException;
|
||||
|
||||
/**
|
||||
* Finds the class with the specified binary name.
|
||||
*
|
||||
|
||||
@ -65,10 +65,6 @@ class RemoteCodes {
|
||||
* Add to the class-path.
|
||||
*/
|
||||
static final String CMD_ADD_CLASSPATH = "CMD_ADD_CLASSPATH";
|
||||
/**
|
||||
* Set the class-path.
|
||||
*/
|
||||
static final String CMD_SET_CLASSPATH = "CMD_SET_CLASSPATH";
|
||||
/**
|
||||
* Stop an invoke.
|
||||
*/
|
||||
|
||||
@ -136,21 +136,6 @@ public class StreamingExecutionControl implements ExecutionControl {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setClasspath(String path)
|
||||
throws EngineTerminationException, InternalException {
|
||||
try {
|
||||
// Send the classpath addition command to the remote agent.
|
||||
writeCommand(CMD_SET_CLASSPATH);
|
||||
out.writeUTF(path);
|
||||
out.flush();
|
||||
// Retrieve and report results from the remote agent.
|
||||
readAndReportClassSimpleResult();
|
||||
} catch (IOException ex) {
|
||||
throw new EngineTerminationException("Exception writing remote set classpath: " + ex);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stop()
|
||||
throws EngineTerminationException, InternalException {
|
||||
|
||||
@ -117,16 +117,6 @@ public interface ExecutionControl extends AutoCloseable {
|
||||
void addToClasspath(String path)
|
||||
throws EngineTerminationException, InternalException;
|
||||
|
||||
/**
|
||||
* Sets the execution class path to the specified path.
|
||||
*
|
||||
* @param path the path to add
|
||||
* @throws EngineTerminationException the execution engine has terminated
|
||||
* @throws InternalException an internal problem occurred
|
||||
*/
|
||||
void setClasspath(String path)
|
||||
throws EngineTerminationException, InternalException;
|
||||
|
||||
/**
|
||||
* Interrupts a running invoke.
|
||||
*
|
||||
|
||||
@ -99,7 +99,6 @@ public class KullaTesting {
|
||||
|
||||
private Map<String, Snippet> idToSnippet = new LinkedHashMap<>();
|
||||
private Set<Snippet> allSnippets = new LinkedHashSet<>();
|
||||
private List<String> classpath;
|
||||
|
||||
static {
|
||||
JShell js = JShell.create();
|
||||
@ -159,7 +158,6 @@ public class KullaTesting {
|
||||
}
|
||||
|
||||
public void addToClasspath(String path) {
|
||||
classpath.add(path);
|
||||
getState().addToClasspath(path);
|
||||
}
|
||||
|
||||
@ -200,7 +198,6 @@ public class KullaTesting {
|
||||
state = builder.build();
|
||||
allSnippets = new LinkedHashSet<>();
|
||||
idToSnippet = new LinkedHashMap<>();
|
||||
classpath = new ArrayList<>();
|
||||
}
|
||||
|
||||
@AfterMethod
|
||||
@ -210,7 +207,6 @@ public class KullaTesting {
|
||||
analysis = null;
|
||||
allSnippets = null;
|
||||
idToSnippet = null;
|
||||
classpath = null;
|
||||
}
|
||||
|
||||
public ClassLoader createAndRunFromModule(String moduleName, Path modPath) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user