Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public void destroy() {
}

protected BaseBind createBindRequest(SmppSessionConfiguration config) throws UnrecoverablePduException {
BaseBind bind = null;
BaseBind bind;
if (config.getType() == SmppBindType.TRANSCEIVER) {
bind = new BindTransceiver();
} else if (config.getType() == SmppBindType.RECEIVER) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ public void start() throws SmppChannelException {

@Override
public void stop() {
if (this.channels.size() > 0) {
if (!this.channels.isEmpty()) {
logger.info("{} currently has [{}] open child channel(s) that will be closed as part of stop()", configuration.getName(), this.channels.size());
}
// close all channels still open within this session "bootstrap"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ protected Object decode(ChannelHandlerContext ctx, Channel channel, ChannelBuffe
}

// is there a PDU someone wants us to write in response?
if (this.writePduQueue.size() > 0) {
if (!this.writePduQueue.isEmpty()) {
Pdu pduToWrite = this.writePduQueue.remove();
logger.info("Automatically writing back on channel 0x" + HexUtil.toHexString(channel.getId()) + " the PDU: {}", pduToWrite);
ChannelBuffer writeBuffer = this.transcoder.encode(pduToWrite);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public String validate(KeyStore keyStore, String keyAlias) throws CertificateExc
* @throws CertificateException
*/
public void validate(KeyStore keyStore, Certificate cert) throws CertificateException {
Certificate[] certChain = null;
Certificate[] certChain;
if (cert != null && cert instanceof X509Certificate) {
((X509Certificate)cert).checkValidity();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ protected Pdu doDecode(int commandLength, ChannelBuffer buffer) throws Unrecover
// this is a major issue if the sequence number is invalid
SequenceNumber.assertValid(sequenceNumber);

Pdu pdu = null;
Pdu pdu;

// any command id with its 31st bit set to true is a response
if (PduUtil.isRequestCommandId(commandId)) {
Expand Down