修改部分阻断问题

This commit is contained in:
zhoudaxia 2016-08-26 12:56:01 +08:00
parent ac3d4364c7
commit ed407d3129
10 changed files with 22 additions and 3 deletions

View File

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

View File

@ -68,5 +68,6 @@ public class JarJarTest {
ClassLoader ucl = new URLClassLoader(new URL[] { u});
ucl.loadClass(clas);
ucl.close();
}
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -133,6 +133,7 @@ public class SoundManager implements ISoundManager {
if (m.getClass().getSimpleName().equals(mixerClassName)) {
return m;
}
m.close();
}
return null;
}

View File

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