Fixed issue using File from java.io.File which did not like maven
This commit is contained in:
@@ -87,6 +87,7 @@ public class Event {
|
||||
//Read XML files.
|
||||
try {
|
||||
this.raceXML = RaceXMLCreator.alterRaceToWind(raceXMLFile, 90);
|
||||
//this.raceXML = XMLReader.readXMLFileToString(raceXMLFile, StandardCharsets.UTF_8);
|
||||
this.boatXML = XMLReader.readXMLFileToString(boatsXMLFile, StandardCharsets.UTF_8);
|
||||
this.regattaXML = XMLReader.readXMLFileToString(regattaXMLFile, StandardCharsets.UTF_8);
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ public class RaceXMLCreator {
|
||||
public static String alterRaceToWind(String s, double degrees) throws XMLReaderException, InvalidRaceDataException, JAXBException, IOException, SAXException, ParserConfigurationException {
|
||||
RaceXMLReader reader = new RaceXMLReader(s, XMLFileType.ResourcePath);
|
||||
|
||||
XMLRace race = (XMLRace) XMLUtilities.xmlToClass(new File(RaceXMLCreator.class.getClassLoader().getResource(s).getFile()),
|
||||
XMLRace race = (XMLRace) XMLUtilities.xmlToClass(RaceXMLCreator.class.getClassLoader().getResourceAsStream(s),
|
||||
RaceXMLCreator.class.getClassLoader().getResource("mock/mockXML/schema/raceSchema.xsd"),
|
||||
XMLRace.class);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user