DATAREST-279 - Fixed creation of point instances from longitude and latitude.

This commit is contained in:
Oliver Gierke
2014-03-25 10:36:56 +01:00
parent a0395002d0
commit fc4eb30aa1
2 changed files with 2 additions and 2 deletions

View File

@@ -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);

View File

@@ -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));