Skip to content

Commit e0feea3

Browse files
committed
Tidy all code
1 parent 6cc1a6d commit e0feea3

20 files changed

Lines changed: 123 additions & 131 deletions

pom.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
34
<modelVersion>4.0.0</modelVersion>
45

56
<groupId>com.maxmind.minfraud</groupId>
@@ -211,7 +212,7 @@
211212
<configuration>
212213
<format>xml</format>
213214
<maxmem>256m</maxmem>
214-
<check />
215+
<check/>
215216
</configuration>
216217
</plugin>
217218
<plugin>

src/main/java/com/maxmind/minfraud/WebServiceClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public static final class Builder {
109109
private ProxySelector proxy = ProxySelector.getDefault();
110110

111111
/**
112-
* @param accountId Your MaxMind account ID.
112+
* @param accountId Your MaxMind account ID.
113113
* @param licenseKey Your MaxMind license key.
114114
*/
115115
public Builder(int accountId, String licenseKey) {

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -250,12 +250,12 @@ public String getToken() {
250250

251251
/**
252252
* @return An indication of whether or not the outcome of 3D-Secure
253-
* verification (e.g. Safekey, SecureCode, Verified by Visa) was
254-
* successful, as provided by the end user. {@code true} if customer
255-
* verification was successful, or {@code false} if the customer
256-
* failed verification. {@code null} if 3-D Secure verification was
257-
* not used, was unavailable, or resulted in another outcome other
258-
* than success or failure.
253+
* verification (e.g. Safekey, SecureCode, Verified by Visa) was
254+
* successful, as provided by the end user. {@code true} if customer
255+
* verification was successful, or {@code false} if the customer
256+
* failed verification. {@code null} if 3-D Secure verification was
257+
* not used, was unavailable, or resulted in another outcome other
258+
* than success or failure.
259259
*/
260260
@JsonProperty("was_3d_secure_successful")
261261
public Boolean getWas3dSecureSuccessful() {

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import org.apache.commons.codec.digest.DigestUtils;
77
import org.apache.commons.validator.routines.DomainValidator;
88
import org.apache.commons.validator.routines.EmailValidator;
9+
910
import java.net.IDN;
1011
import java.util.Collections;
1112
import java.util.HashMap;
@@ -55,7 +56,7 @@ public static final class Builder {
5556

5657
/**
5758
* The constructor for the builder.
58-
*
59+
* <p>
5960
* By default, validation will be enabled.
6061
*/
6162
public Builder() {
@@ -77,7 +78,7 @@ public Builder(boolean enableValidation) {
7778
* need to set the domain separately. The domain will be set to
7879
* the domain of the email address and the address field will be
7980
* set to the email address passed.
80-
*
81+
* <p>
8182
* The email address will be sent in plain text unless you also call
8283
* {@link #hashAddress()} to instead send it as an MD5 hash.
8384
*
@@ -103,7 +104,7 @@ public Email.Builder address(String address) {
103104

104105
/**
105106
* Send the email address as its MD5 hash.
106-
*
107+
* <p>
107108
* By default the email address set by {@link #address(String)} will be
108109
* sent in plain text. Enable sending it as an MD5 hash instead by
109110
* calling this method.

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

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ public static final class Builder {
4646
*
4747
* @param ipAddress The IP address associated with the device used
4848
* by the customer in the transaction.
49-
* @param tag A string indicating the likelihood that a transaction may be
50-
* fraudulent.
49+
* @param tag A string indicating the likelihood that a transaction may be
50+
* fraudulent.
5151
*/
5252
public Builder(InetAddress ipAddress, Tag tag) {
5353
if (ipAddress == null) {
@@ -63,7 +63,7 @@ public Builder(InetAddress ipAddress, Tag tag) {
6363

6464
/**
6565
* @param chargebackCode A string which is provided by your payment processor
66-
* indicating the reason for the chargeback.
66+
* indicating the reason for the chargeback.
6767
* @return The builder object.
6868
*/
6969
public TransactionReport.Builder chargebackCode(String chargebackCode) {
@@ -73,13 +73,13 @@ public TransactionReport.Builder chargebackCode(String chargebackCode) {
7373

7474
/**
7575
* @param maxmindId A unique eight character string identifying a minFraud
76-
* Standard or Premium request. These IDs are returned in the maxmindID field
77-
* of a response for a successful minFraud request. This field is not required,
78-
* but you are encouraged to provide it, if possible.
76+
* Standard or Premium request. These IDs are returned in the maxmindID field
77+
* of a response for a successful minFraud request. This field is not required,
78+
* but you are encouraged to provide it, if possible.
7979
* @return The builder object.
8080
*/
8181
public TransactionReport.Builder maxmindId(String maxmindId) {
82-
if (maxmindId.length() != 8 ) {
82+
if (maxmindId.length() != 8) {
8383
throw new IllegalArgumentException("maxmindId must be exactly 8 characters in length");
8484
}
8585
this.maxmindId = maxmindId;
@@ -88,10 +88,10 @@ public TransactionReport.Builder maxmindId(String maxmindId) {
8888

8989
/**
9090
* @param minfraudId A UUID that identifies a minFraud Score, minFraud Insights,
91-
* or minFraud Factors request. This ID is returned via getId() in the
92-
* Score, Insights or Factors response object. This field is not
93-
* required, but you are encouraged to provide it if the request was
94-
* made to one of these services.
91+
* or minFraud Factors request. This ID is returned via getId() in the
92+
* Score, Insights or Factors response object. This field is not
93+
* required, but you are encouraged to provide it if the request was
94+
* made to one of these services.
9595
* @return The builder object.
9696
*/
9797
public TransactionReport.Builder minfraudId(UUID minfraudId) {

src/main/java/com/maxmind/minfraud/response/CreditCard.java

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,14 @@ public final class CreditCard extends AbstractModel {
1717
private final String type;
1818

1919
/**
20+
* @param brand The credit card brand.
21+
* @param country The country the card was issued in.
22+
* @param isIssuedInBillingAddressCountry Whether the issuing country matches billing country.
23+
* @param isPrepaid Whether the card was prepaid.
24+
* @param issuer The issuer information.
25+
* @param type The type.
2026
* @deprecated This constructor only exists for backward compatibility
2127
* and will be removed in the next major release.
22-
*
23-
* @param brand The credit card brand.
24-
* @param country The country the card was issued in.
25-
* @param isIssuedInBillingAddressCountry Whether the issuing country matches billing country.
26-
* @param isPrepaid Whether the card was prepaid.
27-
* @param issuer The issuer information.
28-
* @param type The type.
2928
*/
3029
public CreditCard(
3130
String brand,
@@ -36,20 +35,19 @@ public CreditCard(
3635
String type
3736
) {
3837
this(brand, country, isIssuedInBillingAddressCountry, isPrepaid, false,
39-
issuer, type);
38+
issuer, type);
4039
}
4140

4241
/**
42+
* @param brand The credit card brand.
43+
* @param country The country the card was issued in.
44+
* @param isIssuedInBillingAddressCountry Whether the issuing country matches billing country.
45+
* @param isPrepaid Whether the card was prepaid.
46+
* @param isVirtual Whether it is a virtual card.
47+
* @param issuer The issuer information.
48+
* @param type The type.
4349
* @deprecated This constructor only exists for backward compatibility
4450
* and will be removed in the next major release.
45-
*
46-
* @param brand The credit card brand.
47-
* @param country The country the card was issued in.
48-
* @param isIssuedInBillingAddressCountry Whether the issuing country matches billing country.
49-
* @param isPrepaid Whether the card was prepaid.
50-
* @param isVirtual Whether it is a virtual card.
51-
* @param issuer The issuer information.
52-
* @param type The type.
5351
*/
5452
public CreditCard(
5553
String brand,
@@ -61,7 +59,7 @@ public CreditCard(
6159
String type
6260
) {
6361
this(brand, country, false, isIssuedInBillingAddressCountry, isPrepaid,
64-
isVirtual, issuer, type);
62+
isVirtual, issuer, type);
6563
}
6664

6765

src/main/java/com/maxmind/minfraud/response/Device.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,11 @@ public final class Device extends AbstractModel {
2222
private final String localTime;
2323

2424
/**
25+
* @param confidence The device confidence.
26+
* @param id The device ID.
27+
* @param lastSeen When the device was last seen.
2528
* @deprecated This constructor only exists for backward compatibility
2629
* and will be removed in the next major release.
27-
*
28-
* @param confidence The device confidence.
29-
* @param id The device ID.
30-
* @param lastSeen When the device was last seen.
3130
*/
3231
public Device(
3332
Double confidence,

src/main/java/com/maxmind/minfraud/response/Email.java

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,12 @@ public Email(
3131
}
3232

3333
/**
34+
* @param isDisposable Whether it is a disposable email.
35+
* @param isFree Whether it is a free email.
36+
* @param isHighRisk Whether it is a high risk email.
37+
* @param firstSeen When the email was first seen.
3438
* @deprecated This constructor only exists for backward compatibility
3539
* and will be removed in the next major release.
36-
*
37-
* @param isDisposable Whether it is a disposable email.
38-
* @param isFree Whether it is a free email.
39-
* @param isHighRisk Whether it is a high risk email.
40-
* @param firstSeen When the email was first seen.
4140
*/
4241
public Email(
4342
Boolean isDisposable,
@@ -49,12 +48,11 @@ public Email(
4948
}
5049

5150
/**
51+
* @param isFree Whether it is a free email.
52+
* @param isHighRisk Whether it is a high risk email.
53+
* @param firstSeen When the email was first seen.
5254
* @deprecated This constructor only exists for backward compatibility
5355
* and will be removed in the next major release.
54-
*
55-
* @param isFree Whether it is a free email.
56-
* @param isHighRisk Whether it is a high risk email.
57-
* @param firstSeen When the email was first seen.
5856
*/
5957
public Email(
6058
Boolean isFree,
@@ -65,11 +63,10 @@ public Email(
6563
}
6664

6765
/**
66+
* @param isFree Whether it is a free email.
67+
* @param isHighRisk Whether it is a high risk email.
6868
* @deprecated This constructor only exists for backward compatibility
6969
* and will be removed in the next major release.
70-
*
71-
* @param isFree Whether it is a free email.
72-
* @param isHighRisk Whether it is a high risk email.
7370
*/
7471
public Email(
7572
Boolean isFree,

src/main/java/com/maxmind/minfraud/response/GeoIp2Country.java

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,14 @@ public final class GeoIp2Country extends Country {
1515
private final boolean isHighRisk;
1616

1717
/**
18-
* @deprecated This constructor only exists for backward compatibility
19-
* and will be removed in the next major release.
20-
*
21-
* @param locales The locales.
18+
* @param locales The locales.
2219
* @param confidence The confidence.
23-
* @param geoNameId The GeoName ID.
20+
* @param geoNameId The GeoName ID.
2421
* @param isHighRisk Whether it is a high risk country.
25-
* @param isoCode The ISO code.
26-
* @param names The names.
22+
* @param isoCode The ISO code.
23+
* @param names The names.
24+
* @deprecated This constructor only exists for backward compatibility
25+
* and will be removed in the next major release.
2726
*/
2827
public GeoIp2Country(
2928
List<String> locales,

src/main/java/com/maxmind/minfraud/response/IpAddress.java

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,20 +39,19 @@ public IpAddress(
3939
}
4040

4141
/**
42+
* @param city The city information.
43+
* @param continent The continent information.
44+
* @param country The country information.
45+
* @param location The location information.
46+
* @param maxmind MaxMind-specific information.
47+
* @param postal The postal information.
48+
* @param registeredCountry The information about the country where the IP was registered.
49+
* @param representedCountry The represented country, e.g., for military bases in other countries.
50+
* @param risk The IP risk.
51+
* @param subdivisions The list of subdivisions.
52+
* @param traits Information about various other IP traits.
4253
* @deprecated This constructor only exists for backward compatibility
4354
* and will be removed in the next major release.
44-
*
45-
* @param city The city information.
46-
* @param continent The continent information.
47-
* @param country The country information.
48-
* @param location The location information.
49-
* @param maxmind MaxMind-specific information.
50-
* @param postal The postal information.
51-
* @param registeredCountry The information about the country where the IP was registered.
52-
* @param representedCountry The represented country, e.g., for military bases in other countries.
53-
* @param risk The IP risk.
54-
* @param subdivisions The list of subdivisions.
55-
* @param traits Information about various other IP traits.
5655
*/
5756
public IpAddress(
5857
City city,

0 commit comments

Comments
 (0)