fix: added JsonIgnore to EventMessage and RequestMessage variables
This commit is contained in:
parent
00fd033b61
commit
dbc7264d5f
@ -0,0 +1,2 @@
|
|||||||
|
package uulm.teamname.marvelous.gamelibrary.json.login;public class MessageDeserializer {
|
||||||
|
}
|
@ -1,5 +1,6 @@
|
|||||||
package uulm.teamname.marvelous.gamelibrary.messages;
|
package uulm.teamname.marvelous.gamelibrary.messages;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
import uulm.teamname.marvelous.gamelibrary.events.Event;
|
import uulm.teamname.marvelous.gamelibrary.events.Event;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
@ -21,7 +22,7 @@ public class EventMessage {
|
|||||||
/** The decoded contents of the custom content sent. */
|
/** The decoded contents of the custom content sent. */
|
||||||
public HashMap<String, Object> customContent;
|
public HashMap<String, Object> customContent;
|
||||||
|
|
||||||
@Override
|
@Override @JsonIgnore
|
||||||
public boolean equals(Object o) {
|
public boolean equals(Object o) {
|
||||||
if (this == o) return true;
|
if (this == o) return true;
|
||||||
if (o == null || getClass() != o.getClass()) return false;
|
if (o == null || getClass() != o.getClass()) return false;
|
||||||
@ -29,14 +30,14 @@ public class EventMessage {
|
|||||||
return messageType == that.messageType && Arrays.equals(messages, that.messages) && Objects.equals(customContentType, that.customContentType) && Objects.equals(customContent, that.customContent);
|
return messageType == that.messageType && Arrays.equals(messages, that.messages) && Objects.equals(customContentType, that.customContentType) && Objects.equals(customContent, that.customContent);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override @JsonIgnore
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
int result = Objects.hash(messageType, customContentType, customContent);
|
int result = Objects.hash(messageType, customContentType, customContent);
|
||||||
result = 31 * result + Arrays.hashCode(messages);
|
result = 31 * result + Arrays.hashCode(messages);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override @JsonIgnore
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "MessageStructure{" +
|
return "MessageStructure{" +
|
||||||
"messageType=" + messageType +
|
"messageType=" + messageType +
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package uulm.teamname.marvelous.gamelibrary.messages;
|
package uulm.teamname.marvelous.gamelibrary.messages;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
import uulm.teamname.marvelous.gamelibrary.events.Event;
|
import uulm.teamname.marvelous.gamelibrary.events.Event;
|
||||||
import uulm.teamname.marvelous.gamelibrary.requests.Request;
|
import uulm.teamname.marvelous.gamelibrary.requests.Request;
|
||||||
|
|
||||||
@ -22,7 +23,7 @@ public class RequestMessage {
|
|||||||
/** The decoded contents of the custom content sent. */
|
/** The decoded contents of the custom content sent. */
|
||||||
public HashMap<String, Object> customContent;
|
public HashMap<String, Object> customContent;
|
||||||
|
|
||||||
@Override
|
@Override @JsonIgnore
|
||||||
public boolean equals(Object o) {
|
public boolean equals(Object o) {
|
||||||
if (this == o) return true;
|
if (this == o) return true;
|
||||||
if (o == null || getClass() != o.getClass()) return false;
|
if (o == null || getClass() != o.getClass()) return false;
|
||||||
@ -30,14 +31,14 @@ public class RequestMessage {
|
|||||||
return messageType == that.messageType && Arrays.equals(messages, that.messages) && Objects.equals(customContentType, that.customContentType) && Objects.equals(customContent, that.customContent);
|
return messageType == that.messageType && Arrays.equals(messages, that.messages) && Objects.equals(customContentType, that.customContentType) && Objects.equals(customContent, that.customContent);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override @JsonIgnore
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
int result = Objects.hash(messageType, customContentType, customContent);
|
int result = Objects.hash(messageType, customContentType, customContent);
|
||||||
result = 31 * result + Arrays.hashCode(messages);
|
result = 31 * result + Arrays.hashCode(messages);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override @JsonIgnore
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "MessageStructure{" +
|
return "MessageStructure{" +
|
||||||
"messageType=" + messageType +
|
"messageType=" + messageType +
|
||||||
|
Loading…
Reference in New Issue
Block a user