From 5f63ec0074f51675fe0a107d6c216a43a772166e Mon Sep 17 00:00:00 2001 From: Ziggeh Date: Fri, 5 Sep 2014 22:05:29 +0200 Subject: [PATCH] Removed unused mutator methods from SetWaypointColor --- src/protocol/swg/SetWaypointColor.java | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/src/protocol/swg/SetWaypointColor.java b/src/protocol/swg/SetWaypointColor.java index f7a418d9..93d2a006 100644 --- a/src/protocol/swg/SetWaypointColor.java +++ b/src/protocol/swg/SetWaypointColor.java @@ -21,36 +21,30 @@ ******************************************************************************/ package protocol.swg; -import java.io.UnsupportedEncodingException; import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; import org.apache.mina.core.buffer.IoBuffer; public class SetWaypointColor extends SWGMessage { - + private long objectId; private String color; - + public SetWaypointColor() { } - + @Override public void deserialize(IoBuffer data) { - //data.getShort(); - //data.getInt(); objectId = data.getLong(); short size = data.getShort(); - try { - color = new String(ByteBuffer.allocate(size).put(data.array(), data.position(), size).array(), "US-ASCII"); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } + + color = new String(ByteBuffer.allocate(size).put(data.array(), data.position(), size).array(), StandardCharsets.US_ASCII); } @Override public IoBuffer serialize() { - return null; } @@ -58,16 +52,8 @@ public class SetWaypointColor extends SWGMessage { return objectId; } - public void setObjectId(long objectId) { - this.objectId = objectId; - } - public String getColor() { return color; } - public void setColor(String color) { - this.color = color; - } - }