mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[git] Remove unused method and unused field.
This commit is contained in:
@@ -69,7 +69,7 @@ public abstract class GitXmlRpcHandlerService<T> {
|
||||
@NotNull
|
||||
public synchronized File getScriptPath() throws IOException {
|
||||
if (myScriptPath == null || !myScriptPath.exists()) {
|
||||
ScriptGenerator generator = new ScriptGenerator(getScriptTempFilePrefix(), getScriptMainClass(), getTempDir());
|
||||
ScriptGenerator generator = new ScriptGenerator(getScriptTempFilePrefix(), getScriptMainClass());
|
||||
generator.addClasses(XmlRpcClientLite.class, DecoderException.class, FileUtilRt.class);
|
||||
customizeScriptGenerator(generator);
|
||||
myScriptPath = generator.generate();
|
||||
@@ -88,15 +88,6 @@ public abstract class GitXmlRpcHandlerService<T> {
|
||||
*/
|
||||
protected abstract void customizeScriptGenerator(@NotNull ScriptGenerator generator);
|
||||
|
||||
/**
|
||||
* @return the temporary directory to use or null if the default directory might be used
|
||||
*/
|
||||
@SuppressWarnings({"MethodMayBeStatic"})
|
||||
@Nullable
|
||||
protected File getTempDir() {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Register handler. Note that handlers must be unregistered using {@link #unregisterHandler(int)}.
|
||||
*
|
||||
|
||||
@@ -21,7 +21,6 @@ import com.intellij.openapi.util.io.FileUtil;
|
||||
import com.intellij.util.PathUtil;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileWriter;
|
||||
@@ -56,10 +55,6 @@ public class ScriptGenerator {
|
||||
* The scripts may class
|
||||
*/
|
||||
private final Class myMainClass;
|
||||
/**
|
||||
* The temporary directory to use or null, if system directory should be used
|
||||
*/
|
||||
@Nullable private final File myTempDir;
|
||||
/**
|
||||
* The class paths for the script
|
||||
*/
|
||||
@@ -69,20 +64,6 @@ public class ScriptGenerator {
|
||||
*/
|
||||
private final ArrayList<String> myInternalParameters = new ArrayList<String>();
|
||||
|
||||
/**
|
||||
* A constructor
|
||||
*
|
||||
* @param prefix the script prefix
|
||||
* @param mainClass the script main class
|
||||
* @param tempDir the temporary directory to use. if null, system default is used.
|
||||
*/
|
||||
public ScriptGenerator(final String prefix, final Class mainClass, File tempDir) {
|
||||
myPrefix = prefix;
|
||||
myMainClass = mainClass;
|
||||
myTempDir = tempDir;
|
||||
addClasses(myMainClass);
|
||||
}
|
||||
|
||||
/**
|
||||
* A constructor
|
||||
*
|
||||
@@ -90,7 +71,9 @@ public class ScriptGenerator {
|
||||
* @param mainClass the script main class
|
||||
*/
|
||||
public ScriptGenerator(final String prefix, final Class mainClass) {
|
||||
this(prefix, mainClass, null);
|
||||
myPrefix = prefix;
|
||||
myMainClass = mainClass;
|
||||
addClasses(myMainClass);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -149,8 +132,7 @@ public class ScriptGenerator {
|
||||
*/
|
||||
@SuppressWarnings({"HardCodedStringLiteral"})
|
||||
public File generate() throws IOException {
|
||||
File scriptPath = myTempDir != null ? FileUtil.createTempFile(myTempDir, myPrefix, SCRIPT_EXT, true)
|
||||
: FileUtil.createTempFile(myPrefix, SCRIPT_EXT);
|
||||
File scriptPath = FileUtil.createTempFile(myPrefix, SCRIPT_EXT);
|
||||
scriptPath.deleteOnExit();
|
||||
PrintWriter out = new PrintWriter(new FileWriter(scriptPath));
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user