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:
@@ -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"))));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user