8172255: JShell API: ExecutionControl/LoaderDelegate: Remove unused/unimplemented setClassPath

Reviewed-by: jlahoda
This commit is contained in:
Robert Field 2017-01-09 13:50:45 -08:00
parent 869f5bbd91
commit f9b57bfbed
8 changed files with 0 additions and 61 deletions

View File

@ -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);

View File

@ -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>

View File

@ -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 {

View File

@ -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.
*

View File

@ -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.
*/

View File

@ -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 {

View File

@ -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.
*

View File

@ -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) {