Re-enabled source id allocator check.

Re-enabled rotation of map at startup.
Changed race.xml schema so that yacht elements aren't required inside the participants element.
#story[1185]
This commit is contained in:
fjc40
2017-09-13 00:41:23 +12:00
parent 3fa6b9200d
commit 9fa1b9ee67
6 changed files with 33 additions and 26 deletions
@@ -50,7 +50,7 @@ import javax.xml.bind.annotation.XmlType;
})
public class XMLParticipants {
@XmlElement(name = "Yacht", required = true)
@XmlElement(name = "Yacht", required = false)
protected List<XMLYacht> yacht;
/**
@@ -49,7 +49,7 @@ public class XMLUtilities {
return xmlToClass(document, schemaURL, c);
}
public static Object xmlToClass(String xml, URL schemaURL, Class c) throws ParserConfigurationException, IOException, SAXException, JAXBException {
public static <T> T xmlToClass(String xml, URL schemaURL, Class<T> c) throws ParserConfigurationException, IOException, SAXException, JAXBException {
DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
Document document = parser.parse(new InputSource(new ByteArrayInputStream(xml.getBytes("utf-8"))));