Skip to content

Commit 6a6a668

Browse files
committed
Some minor cleanup
1 parent 851be40 commit 6a6a668

File tree

3 files changed

+16
-6
lines changed

3 files changed

+16
-6
lines changed

atlassian-ide-plugin.xml

-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222
</servers>
2323
<default-crucible-server>89c4100c-3c20-4d7d-8611-0dbe1bee742e</default-crucible-server>
2424
<default-crucible-repo>repos</default-crucible-repo>
25-
<default-fisheye-server>89c4100c-3c20-4d7d-8611-0dbe1bee742e</default-fisheye-server>
26-
<default-fisheye-repo>repos</default-fisheye-repo>
2725
<fisheye-project-path>asterisk-java/trunk</fisheye-project-path>
2826
<default-jira-server>e88a6130-6bd2-45dd-aa5d-57b845f76d0f</default-jira-server>
2927
</project-configuration>

src/main/java/org/asteriskjava/Cli.java

+11
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,17 @@ private String getVersion()
101101
{
102102
return version;
103103
}
104+
finally
105+
{
106+
try
107+
{
108+
is.close();
109+
}
110+
catch (IOException e)
111+
{
112+
// ignore
113+
}
114+
}
104115

105116
version = properties.getProperty("version", version);
106117
return version;

src/main/java/org/asteriskjava/fastagi/ScriptEngineMappingStrategy.java

+5-4
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import javax.script.Bindings;
2525
import javax.script.ScriptException;
2626
import java.io.*;
27+
import java.util.Arrays;
2728
import java.util.regex.Matcher;
2829
import java.util.List;
2930
import java.util.ArrayList;
@@ -74,8 +75,8 @@ public ScriptEngineMappingStrategy()
7475
*/
7576
public ScriptEngineMappingStrategy(String[] scriptPath, String[] libPath)
7677
{
77-
this.scriptPath = scriptPath;
78-
this.libPath = libPath;
78+
setScriptPath(scriptPath);
79+
setLibPath(libPath);
7980
}
8081

8182
/**
@@ -86,7 +87,7 @@ public ScriptEngineMappingStrategy(String[] scriptPath, String[] libPath)
8687
*/
8788
public void setScriptPath(String[] scriptPath)
8889
{
89-
this.scriptPath = scriptPath;
90+
this.scriptPath = Arrays.copyOf(scriptPath, scriptPath.length);;
9091
}
9192

9293
/**
@@ -97,7 +98,7 @@ public void setScriptPath(String[] scriptPath)
9798
*/
9899
public void setLibPath(String[] libPath)
99100
{
100-
this.libPath = libPath;
101+
this.libPath = Arrays.copyOf(libPath, libPath.length);
101102
}
102103

103104
public AgiScript determineScript(AgiRequest request)

0 commit comments

Comments
 (0)