diff --git a/代码/workspace_robo4/robocode.roborumble/src/main/java/net/sf/robocode/roborumble/netengine/UpdateRatingFiles.java b/代码/workspace_robo4/robocode.roborumble/src/main/java/net/sf/robocode/roborumble/netengine/UpdateRatingFiles.java index ea9c212..bae6525 100644 --- a/代码/workspace_robo4/robocode.roborumble/src/main/java/net/sf/robocode/roborumble/netengine/UpdateRatingFiles.java +++ b/代码/workspace_robo4/robocode.roborumble/src/main/java/net/sf/robocode/roborumble/netengine/UpdateRatingFiles.java @@ -73,6 +73,7 @@ public class UpdateRatingFiles { while ((record = br.readLine()) != null) { battles.add(record); } + fr.close(); } catch (IOException e) { System.out.println("Can't open # battles file ... Aborting # battles update"); return false; diff --git a/代码/workspace_robo4/robocode.ui/src/main/java/net/sf/robocode/ui/dialog/PreferencesSoundOptionsTab.java b/代码/workspace_robo4/robocode.ui/src/main/java/net/sf/robocode/ui/dialog/PreferencesSoundOptionsTab.java index 9dc4e61..1653e10 100644 --- a/代码/workspace_robo4/robocode.ui/src/main/java/net/sf/robocode/ui/dialog/PreferencesSoundOptionsTab.java +++ b/代码/workspace_robo4/robocode.ui/src/main/java/net/sf/robocode/ui/dialog/PreferencesSoundOptionsTab.java @@ -228,7 +228,7 @@ public class PreferencesSoundOptionsTab extends WizardPanel { if (AudioSystem.getMixer(mi).getSourceLineInfo(clipLineInfo).length > 0) { mixers.add(mi); } - mi.close(); + AudioSystem.getMixer(mi).close(); } mixerComboBox = new JComboBox(mixers); @@ -319,7 +319,7 @@ public class PreferencesSoundOptionsTab extends WizardPanel { getMixerComboBox().setSelectedItem(mi); break; } - mi.close(); + AudioSystem.getMixer(mi).close(); } }