[CLEANUP] Reformatted code

This commit is contained in:
JKetelaar
2017-08-29 00:19:17 +02:00
parent d3541f795b
commit bcb0ddfab7
120 changed files with 6073 additions and 6255 deletions
@@ -9,44 +9,42 @@ import org.parabot.environment.servers.executers.ServerExecuter;
import java.net.MalformedURLException;
/**
*
* Loads locally stored server providers
*
*
* @author Everel
*
*/
@SuppressWarnings("Duplicates")
@Deprecated
public class LocalServerExecuter extends ServerExecuter {
private final ServerProvider serverProvider;
private ClassPath classPath;
private String serverName;
private final ServerProvider serverProvider;
private ClassPath classPath;
private String serverName;
public LocalServerExecuter(ServerProvider serverProvider,
ClassPath classPath, final String serverName) {
this.serverProvider = serverProvider;
this.classPath = classPath;
this.serverName = serverName;
}
public LocalServerExecuter(ServerProvider serverProvider,
ClassPath classPath, final String serverName) {
this.serverProvider = serverProvider;
this.classPath = classPath;
this.serverName = serverName;
}
@Override
public void run() {
// add jar or directory to buildpath.
if (this.classPath.isJar()) {
Core.verbose("Adding server provider jar to buildpath: "
+ this.classPath.lastParsed.toString());
this.classPath.addToBuildPath();
} else {
Core.verbose("Adding server providers directory to buildpath: "
+ Directories.getServerPath().getPath());
try {
BuildPath.add(Directories.getServerPath().toURI().toURL());
} catch (MalformedURLException e) {
e.printStackTrace();
}
}
// finalize
super.finalize(this.serverProvider, this.serverName);
}
@Override
public void run() {
// add jar or directory to buildpath.
if (this.classPath.isJar()) {
Core.verbose("Adding server provider jar to buildpath: "
+ this.classPath.lastParsed.toString());
this.classPath.addToBuildPath();
} else {
Core.verbose("Adding server providers directory to buildpath: "
+ Directories.getServerPath().getPath());
try {
BuildPath.add(Directories.getServerPath().toURI().toURL());
} catch (MalformedURLException e) {
e.printStackTrace();
}
}
// finalize
super.finalize(this.serverProvider, this.serverName);
}
}