rounding fix for the xml
#story[1087]
This commit is contained in:
@@ -344,7 +344,8 @@ public class RaceXMLReader extends XMLReader implements RaceDataSource {
|
||||
String legName = lastCompoundMark.getName();
|
||||
|
||||
//Sets the rounding type of this compound mark
|
||||
lastCompoundMark.setRoundingType(RoundingType.valueOf(cornerRounding));
|
||||
|
||||
lastCompoundMark.setRoundingType(RoundingType.getValueOf(cornerRounding));
|
||||
|
||||
//For each following corner, create a leg between cornerN and cornerN+1.
|
||||
for(int i = 1; i < corners.getLength(); i++) {
|
||||
|
||||
@@ -31,4 +31,19 @@ public enum RoundingType {
|
||||
* opposite of SP
|
||||
*/
|
||||
PS;
|
||||
|
||||
public static RoundingType getValueOf(String value) {
|
||||
switch (value) {
|
||||
case "Port":
|
||||
return RoundingType.Port;
|
||||
case "Starboard":
|
||||
return RoundingType.Starboard;
|
||||
case "SP":
|
||||
return RoundingType.Port;
|
||||
case "PS":
|
||||
return RoundingType.Starboard;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user