Skip to content

Commit

Permalink
Fix usage of deprecated Double constructor.
Browse files Browse the repository at this point in the history
  • Loading branch information
ktuukkan committed Oct 6, 2021
1 parent 5fe0949 commit 3483ed2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/test/java/net/sf/marineapi/nmea/parser/WPLTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

/**
* WPLTest
*
*
* @author Kimmo Tuukkanen
*/
public class WPLTest {
Expand Down Expand Up @@ -46,17 +46,17 @@ public void testConstructor() {
*/
@Test
public void testGetWaypoint() {
final Double lat = new Double(55 + (36.200 / 60));
final Double lon = new Double(14 + (36.500 / 60));
final Double lat = Double.valueOf(55 + (36.200 / 60));
final Double lon = Double.valueOf(14 + (36.500 / 60));

Waypoint wp = wpl.getWaypoint();

assertNotNull(wp);
assertEquals("RUSKI", wp.getId());
assertEquals(CompassPoint.NORTH, wp.getLatitudeHemisphere());
assertEquals(CompassPoint.EAST, wp.getLongitudeHemisphere());
assertEquals(lat, new Double(wp.getLatitude()));
assertEquals(lon, new Double(wp.getLongitude()));
assertEquals(lat, Double.valueOf(wp.getLatitude()));
assertEquals(lon, Double.valueOf(wp.getLongitude()));
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/net/sf/marineapi/nmea/util/DateTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public void testEqualsWhenChanged() {
@Test
public void testEqualsWrongType() {
Object str = new String("foobar");
Object dbl = new Double(123);
Object dbl = Double.valueOf(123);
assertFalse(instance.equals(str));
assertFalse(instance.equals(dbl));
}
Expand Down

0 comments on commit 3483ed2

Please sign in to comment.