broker/Authorization: code formatter used
This commit is contained in:
@@ -13,6 +13,7 @@
|
|||||||
*
|
*
|
||||||
* You may elect to redistribute this code under either of these licenses.
|
* You may elect to redistribute this code under either of these licenses.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package io.moquette.spi.impl.security;
|
package io.moquette.spi.impl.security;
|
||||||
|
|
||||||
import static io.moquette.spi.impl.security.Authorization.Permission.READWRITE;
|
import static io.moquette.spi.impl.security.Authorization.Permission.READWRITE;
|
||||||
@@ -23,12 +24,13 @@ import static io.moquette.spi.impl.security.Authorization.Permission.READWRITE;
|
|||||||
* @author andrea
|
* @author andrea
|
||||||
*/
|
*/
|
||||||
public class Authorization {
|
public class Authorization {
|
||||||
|
|
||||||
protected final String topic;
|
protected final String topic;
|
||||||
protected final Permission permission;
|
protected final Permission permission;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Access rights
|
* Access rights
|
||||||
* */
|
*/
|
||||||
enum Permission {
|
enum Permission {
|
||||||
READ, WRITE, READWRITE
|
READ, WRITE, READWRITE
|
||||||
}
|
}
|
||||||
@@ -48,13 +50,17 @@ public class Authorization {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object o) {
|
public boolean equals(Object o) {
|
||||||
if (this == o) return true;
|
if (this == o)
|
||||||
if (o == null || getClass() != o.getClass()) return false;
|
return true;
|
||||||
|
if (o == null || getClass() != o.getClass())
|
||||||
|
return false;
|
||||||
|
|
||||||
Authorization that = (Authorization) o;
|
Authorization that = (Authorization) o;
|
||||||
|
|
||||||
if (permission != that.permission) return false;
|
if (permission != that.permission)
|
||||||
if (!topic.equals(that.topic)) return false;
|
return false;
|
||||||
|
if (!topic.equals(that.topic))
|
||||||
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user