修改部分阻断问题
This commit is contained in:
parent
ac3d4364c7
commit
ed407d3129
|
@ -48,6 +48,7 @@ public class AutoExtract implements ActionListener {
|
|||
JarFile extractJar = new JarFile("extract.jar");
|
||||
|
||||
is = extractJar.getInputStream(extractJar.getJarEntry("license/cpl-v10.html"));
|
||||
extractFJar.close();
|
||||
} catch (IOException e) {
|
||||
return true;
|
||||
}
|
||||
|
@ -250,7 +251,7 @@ public class AutoExtract implements ActionListener {
|
|||
}
|
||||
|
||||
File installDir = null;
|
||||
File suggestedDir;
|
||||
File suggestedDir;s
|
||||
|
||||
AutoExtract extractor = new AutoExtract();
|
||||
|
||||
|
|
|
@ -68,5 +68,6 @@ public class JarJarTest {
|
|||
ClassLoader ucl = new URLClassLoader(new URL[] { u});
|
||||
|
||||
ucl.loadClass(clas);
|
||||
ucl.close();
|
||||
}
|
||||
}
|
||||
|
|
Binary file not shown.
|
@ -68,6 +68,7 @@ public class AutoExtract implements ActionListener {
|
|||
JarFile extractJar = new JarFile("extract.jar");
|
||||
|
||||
is = extractJar.getInputStream(extractJar.getJarEntry("license/cpl-v10.html"));
|
||||
extractJar.close();
|
||||
} catch (IOException e) {
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -161,6 +161,7 @@ public class BattlesRunner {
|
|||
String record;
|
||||
while ((record = br.readLine()) != null) {
|
||||
robots.add(record);
|
||||
fr.close();
|
||||
}
|
||||
} catch (IOException e) {
|
||||
System.out.println("Battles input file not found ... Aborting");
|
||||
|
|
|
@ -76,7 +76,9 @@ public class PrepareBattles {
|
|||
BufferedReader br = null;
|
||||
|
||||
try {
|
||||
FileReader fr = new FileReader(participantsfile);
|
||||
|
||||
|
||||
fr = new FileReader(participantsfile);
|
||||
|
||||
br = new BufferedReader(fr);
|
||||
String participant;
|
||||
|
@ -101,6 +103,7 @@ public class PrepareBattles {
|
|||
}
|
||||
}
|
||||
}
|
||||
fr.close();
|
||||
} catch (IOException e) {
|
||||
System.out.println("Participants file not found ... Aborting");
|
||||
System.out.println(e);
|
||||
|
@ -117,6 +120,7 @@ public class PrepareBattles {
|
|||
|
||||
try {
|
||||
outtxt = new PrintStream(new BufferedOutputStream(new FileOutputStream(battlesfile)), false);
|
||||
outtxt.close();
|
||||
} catch (IOException e) {
|
||||
System.out.println("Not able to open battles file " + battlesfile + " ... Aborting");
|
||||
System.out.println(e);
|
||||
|
@ -201,6 +205,7 @@ public class PrepareBattles {
|
|||
}
|
||||
}
|
||||
}
|
||||
fr.close();
|
||||
} catch (IOException e) {
|
||||
System.out.println("Participants file not found ... Aborting");
|
||||
System.out.println(e);
|
||||
|
@ -241,6 +246,7 @@ public class PrepareBattles {
|
|||
}
|
||||
}
|
||||
}
|
||||
fr.close();
|
||||
} catch (IOException e) {
|
||||
System.out.println("Priority battles file not found ... ");
|
||||
} finally {
|
||||
|
|
|
@ -259,6 +259,7 @@ public class BotsDownload {
|
|||
names.add(name);
|
||||
}
|
||||
}
|
||||
fr.close();
|
||||
} catch (IOException e) {
|
||||
System.out.println("Participants file not found ... Aborting");
|
||||
System.out.println(e);
|
||||
|
@ -299,6 +300,7 @@ public class BotsDownload {
|
|||
String name = record.substring(0, record.indexOf(","));
|
||||
size.checkCompetitorForSize(name, 1500);
|
||||
}
|
||||
fr.close();
|
||||
} catch (IOException e) {
|
||||
System.out.println("Battles input file not found ... Aborting");
|
||||
System.out.println(e);
|
||||
|
@ -400,6 +402,7 @@ public class BotsDownload {
|
|||
String version = parameters.getProperty("team.version", "");
|
||||
|
||||
return (botname.equals(botname.substring(0, botname.indexOf(" ")) + " " + version));
|
||||
jarf.close();
|
||||
} catch (Exception e) {
|
||||
System.out.println(e);
|
||||
return false;
|
||||
|
@ -487,6 +490,7 @@ public class BotsDownload {
|
|||
}
|
||||
}
|
||||
}
|
||||
fr.close();
|
||||
} catch (IOException e) {
|
||||
System.out.println("Participants file not found when removing old participants ... Aborting");
|
||||
System.out.println(e);
|
||||
|
|
|
@ -105,6 +105,7 @@ public class ResultsUpload {
|
|||
results.add(bot2);
|
||||
}
|
||||
}
|
||||
fr.close();
|
||||
} catch (IOException e) {
|
||||
System.out.println("Can't open result file for upload");
|
||||
return;
|
||||
|
|
|
@ -133,6 +133,7 @@ public class SoundManager implements ISoundManager {
|
|||
if (m.getClass().getSimpleName().equals(mixerClassName)) {
|
||||
return m;
|
||||
}
|
||||
m.close();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -228,6 +228,7 @@ public class PreferencesSoundOptionsTab extends WizardPanel {
|
|||
if (AudioSystem.getMixer(mi).getSourceLineInfo(clipLineInfo).length > 0) {
|
||||
mixers.add(mi);
|
||||
}
|
||||
mi.close();
|
||||
}
|
||||
|
||||
mixerComboBox = new JComboBox(mixers);
|
||||
|
@ -318,6 +319,7 @@ public class PreferencesSoundOptionsTab extends WizardPanel {
|
|||
getMixerComboBox().setSelectedItem(mi);
|
||||
break;
|
||||
}
|
||||
mi.close();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -353,6 +355,7 @@ public class PreferencesSoundOptionsTab extends WizardPanel {
|
|||
|
||||
boolean volumeSupported;
|
||||
boolean panSupported;
|
||||
mixer.close();
|
||||
|
||||
try {
|
||||
Line line = mixer.getLine(lineInfo);
|
||||
|
|
Loading…
Reference in New Issue