DATAREST-279 - Fixed creation of point instances from longitude and latitude.
This commit is contained in:
@@ -50,7 +50,7 @@ public enum StringToPointConverter implements Converter<String, Point> {
|
||||
double latitude = Double.parseDouble(parts[0]);
|
||||
double longitude = Double.parseDouble(parts[1]);
|
||||
|
||||
return new Point(latitude, longitude);
|
||||
return new Point(longitude, latitude);
|
||||
|
||||
} catch (NumberFormatException o_O) {
|
||||
throw new IllegalArgumentException(String.format(INVALID_FORMAT, source), o_O);
|
||||
|
||||
@@ -35,7 +35,7 @@ public class StringToPointConverterUnitTests {
|
||||
@Test
|
||||
public void parsesPointFromString() {
|
||||
|
||||
Point reference = new Point(10.8, 20.9);
|
||||
Point reference = new Point(20.9, 10.8);
|
||||
|
||||
assertThat(INSTANCE.convert("10.8,20.9"), is(reference));
|
||||
assertThat(INSTANCE.convert(" 10.8,20.9 "), is(reference));
|
||||
|
||||
Reference in New Issue
Block a user