broker/Subscription: code formatter used

This commit is contained in:
Andreas Mager
2017-02-01 17:13:40 +01:00
parent 3bbec46585
commit fdf5a83386
@@ -13,28 +13,27 @@
*
* You may elect to redistribute this code under either of these licenses.
*/
package io.moquette.spi.impl.subscriptions;
import io.moquette.spi.ISessionsStore.ClientTopicCouple;
import io.netty.handler.codec.mqtt.MqttQoS;
import java.io.Serializable;
/**
* Maintain the information about which Topic a certain ClientID is subscribed
* and at which QoS
*
*
* Maintain the information about which Topic a certain ClientID is subscribed and at which QoS
*
*
* @author andrea
*/
public final class Subscription implements Serializable {
private static final long serialVersionUID = -3383457629635732794L;
final MqttQoS requestedQos; //max QoS acceptable
final MqttQoS requestedQos; // max QoS acceptable
final String clientId;
final String topicFilter;
final boolean active;
public Subscription(String clientId, String topicFilter, MqttQoS requestedQos) {
this.requestedQos = requestedQos;
this.clientId = clientId;
@@ -67,12 +66,15 @@ public final class Subscription implements Serializable {
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
Subscription that = (Subscription) o;
if (clientId != null ? !clientId.equals(that.clientId) : that.clientId != null) return false;
if (clientId != null ? !clientId.equals(that.clientId) : that.clientId != null)
return false;
return !(topicFilter != null ? !topicFilter.equals(that.topicFilter) : that.topicFilter != null);
}
@@ -86,8 +88,12 @@ public final class Subscription implements Serializable {
@Override
public String toString() {
return String.format("[filter:%s, cliID: %s, qos: %s, active: %s]", this.topicFilter, this.clientId,
this.requestedQos, this.active);
return String.format(
"[filter:%s, cliID: %s, qos: %s, active: %s]",
this.topicFilter,
this.clientId,
this.requestedQos,
this.active);
}
@Override