修改大部分阻断问题

This commit is contained in:
zhoudaxia 2016-08-26 16:20:48 +08:00
parent 4e13437171
commit 92e6225590
5 changed files with 6 additions and 4 deletions

View File

@ -379,7 +379,7 @@ public class RecordManager implements IRecordManager {
fos.flush();
}
}
if (isxml) {
if (isxml&&xwr!=null) {
xwr.endElement(); // turns
xwr.endElement(); // record
osw.flush();

View File

@ -309,10 +309,13 @@ public final class RobotStatics implements IRobotStatics, Serializable {
int index = serializer.deserializeInt(buffer);
int contestantIndex = serializer.deserializeInt(buffer);
if(teammates!=null)
return new RobotStatics(robocodeVersion, isJuniorRobot, isInteractiveRobot, isPaintRobot, isAdvancedRobot,
isTeamRobot, isTeamLeader, isDroid, isSentryRobot, name, shortName, veryShortName, fullClassName,
shortClassName, battleRules, teammates.toArray(new String[teammates.size()]), teamName, index,
contestantIndex);
else
;
}
}

View File

@ -160,7 +160,7 @@ public final class VersionManager implements IVersionManager {
version = versionFileLineToVersion(versionString);
} catch (Exception ignore) {}
}
if (version.equals(UNKNOWN_VERSION)) {
if (version!=null&&version.equals(UNKNOWN_VERSION)) {
logWarning("Getting version from file");
return getVersionFromFile();
}

View File

@ -609,9 +609,7 @@ public class AutoExtract implements ActionListener {
} catch (IOException e) {
e.printStackTrace();
} finally {
if (out != null) {
out.close();
}
if (file != null) {
if (!file.delete()) {
System.err.println("Could not delete the file: " + file);

View File

@ -72,6 +72,7 @@ public abstract class RepositoryItem implements IRepositoryItem, Serializable {
if (itemUrl == null && other.itemUrl != null) {
return false;
}
if (itemUrl != null)
return itemUrl.equals(other.itemUrl);
}
}