Skip to content

Commit 746a843

Browse files
committed
Minor code cleanup
1 parent ea5b3c1 commit 746a843

6 files changed

Lines changed: 15 additions & 19 deletions

File tree

src/main/java/com/maxmind/minfraud/request/AbstractLocation.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@
88
* Billing and Shipping.
99
*/
1010
public abstract class AbstractLocation extends AbstractModel {
11-
protected String firstName;
12-
protected String lastName;
13-
protected String company;
14-
protected String address;
15-
protected String address2;
16-
protected String city;
17-
protected String region;
18-
protected String country;
19-
protected String postal;
20-
protected String phoneNumber;
21-
protected String phoneCountryCode;
11+
private final String firstName;
12+
private final String lastName;
13+
private final String company;
14+
private final String address;
15+
private final String address2;
16+
private final String city;
17+
private final String region;
18+
private final String country;
19+
private final String postal;
20+
private final String phoneNumber;
21+
private final String phoneCountryCode;
2222

2323
protected AbstractLocation(AbstractLocation.Builder builder) {
2424
firstName = builder.firstName;

src/main/java/com/maxmind/minfraud/request/Event.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import com.fasterxml.jackson.annotation.JsonProperty;
44
import com.maxmind.minfraud.AbstractModel;
55

6-
import java.text.ParseException;
76
import java.text.SimpleDateFormat;
87
import java.util.Date;
98

@@ -30,7 +29,6 @@ public static final class Builder {
3029
String shopId;
3130
Date time;
3231
Type type;
33-
SimpleDateFormat dateFormat;
3432

3533
/**
3634
* @param id Your internal ID for the transaction. We can use this to

src/main/java/com/maxmind/minfraud/request/Transaction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public static class Builder {
4848
Order order;
4949
Payment payment;
5050
Shipping shipping;
51-
List<ShoppingCartItem> shoppingCart = new ArrayList<>();
51+
final List<ShoppingCartItem> shoppingCart = new ArrayList<>();
5252

5353
/**
5454
* The constructor for {@code Builder}

src/test/java/com/maxmind/minfraud/WebServiceClientTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@
2323
public class WebServiceClientTest {
2424

2525
@Rule
26-
public ExpectedException thrown = ExpectedException.none();
26+
public final ExpectedException thrown = ExpectedException.none();
2727

2828
@Rule
29-
public WireMockRule wireMockRule = new WireMockRule(0); // 0 picks random port
29+
public final WireMockRule wireMockRule = new WireMockRule(0); // 0 picks random port
3030

3131
@Test
3232
public void testFullScoreTransaction() throws Exception {

src/test/java/com/maxmind/minfraud/response/DeviceTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public void testDevice() throws Exception {
2323
.finish()
2424
);
2525

26-
assertEquals(99.0, device.getConfidence().doubleValue(), 1e-15);
26+
assertEquals(99.0, device.getConfidence(), 1e-15);
2727
assertEquals(UUID.fromString("C8D3BE1A-BE26-11E5-8C50-1B575C37265F"), device.getId());
2828
assertEquals("2016-06-08T14:16:38Z", device.getLastSeen());
2929
}

src/test/java/com/maxmind/minfraud/response/SubscoresTest.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ public class SubscoresTest extends AbstractOutputTest {
99

1010
@Test
1111
public void testSubscores() throws Exception {
12-
String phone = "132-342-2131";
13-
1412
Subscores subscores = this.deserialize(
1513
Subscores.class,
1614
JSON.std

0 commit comments

Comments
 (0)