Skip to content

Commit 598b396

Browse files
committed
Merge pull request #268 from DevFactory/release/redundant-field-initializer-fix-1
Code quality fix - Redundant Field Initializer
2 parents 3351abf + be65149 commit 598b396

File tree

6 files changed

+16
-16
lines changed

6 files changed

+16
-16
lines changed

src/main/java/com/notnoop/apns/ApnsServiceBuilder.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ public class ApnsServiceBuilder {
9090

9191
private SSLContext sslContext;
9292

93-
private int readTimeout = 0;
94-
private int connectTimeout = 0;
93+
private int readTimeout;
94+
private int connectTimeout;
9595

9696
private String gatewayHost;
9797
private int gatewayPort = -1;
@@ -101,23 +101,23 @@ public class ApnsServiceBuilder {
101101
private int pooledMax = 1;
102102
private int cacheLength = ApnsConnection.DEFAULT_CACHE_LENGTH;
103103
private boolean autoAdjustCacheLength = true;
104-
private ExecutorService executor = null;
104+
private ExecutorService executor;
105105

106106
private ReconnectPolicy reconnectPolicy = ReconnectPolicy.Provided.EVERY_HALF_HOUR.newObject();
107-
private boolean isQueued = false;
108-
private ThreadFactory queueThreadFactory = null;
107+
private boolean isQueued;
108+
private ThreadFactory queueThreadFactory;
109109

110-
private boolean isBatched = false;
110+
private boolean isBatched;
111111
private int batchWaitTimeInSec;
112112
private int batchMaxWaitTimeInSec;
113-
private ScheduledExecutorService batchThreadPoolExecutor = null;
113+
private ScheduledExecutorService batchThreadPoolExecutor;
114114

115115
private ApnsDelegate delegate = ApnsDelegate.EMPTY;
116-
private Proxy proxy = null;
117-
private String proxyUsername = null;
118-
private String proxyPassword = null;
116+
private Proxy proxy;
117+
private String proxyUsername;
118+
private String proxyPassword;
119119
private boolean errorDetection = true;
120-
private ThreadFactory errorDetectionThreadFactory = null;
120+
private ThreadFactory errorDetectionThreadFactory;
121121

122122
/**
123123
* Constructs a new instance of {@code ApnsServiceBuilder}

src/main/java/com/notnoop/apns/EnhancedApnsNotification.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public int getExpiry() {
112112
return expiry;
113113
}
114114

115-
private byte[] marshall = null;
115+
private byte[] marshall;
116116
/**
117117
* Returns the binary representation of the message as expected by the
118118
* APNS server.

src/main/java/com/notnoop/apns/SimpleApnsNotification.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public byte[] getPayload() {
9797
return Utilities.copyOf(payload);
9898
}
9999

100-
private byte[] marshall = null;
100+
private byte[] marshall;
101101
/**
102102
* Returns the binary representation of the message as expected by the
103103
* APNS server.

src/test/java/com/notnoop/apns/ApnsServerSocketBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public class ApnsServerSocketBuilder {
7070
private SSLContext sslContext;
7171
private int gatewayPort = -1;
7272
private int feedbackPort = -1;
73-
private ExecutorService executor = null;
73+
private ExecutorService executor;
7474
private ApnsServerService serverService = ApnsServerService.EMPTY;
7575
private ApnsServerExceptionDelegate exceptionDelegate = ApnsServerExceptionDelegate.EMPTY;
7676

src/test/java/com/notnoop/apns/internal/ApnsFeedbackParsingUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ static byte[] pack(byte[]... args) {
7070
|| (Arrays.equals(firstDevice, thirdDevice)));
7171
}
7272

73-
static int simpleDate = 0;
73+
static int simpleDate;
7474
public static byte[] simple = pack(
7575
/* time_t */ new byte[] {0, 0, 0, 0},
7676
/* length */ new byte[] { 0, 32 },

src/test/java/com/notnoop/apns/utils/ApnsServerStub.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public static ApnsServerStub prepareAndStartServer() {
8383
private final int feedbackPort;
8484
private int effectiveGatewayPort;
8585
private int effectiveFeedbackPort;
86-
private OutputStream gatewayOutputStream = null;
86+
private OutputStream gatewayOutputStream;
8787

8888
public ApnsServerStub(ServerSocketFactory sslFactory) {
8989
this(sslFactory, 0, 0);

0 commit comments

Comments
 (0)