Skip to content

Commit

Permalink
Fix code smells
Browse files Browse the repository at this point in the history
  • Loading branch information
RetGal committed Feb 22, 2024
1 parent 8bd592c commit eaf8712
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/main/java/mpo/dayon/common/network/NetworkEngine.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public abstract class NetworkEngine {

protected static final String UNSUPPORTED_TYPE = "Unsupported message type [%s]!";

private final static String CLIPBOARD_DEBUG = "setClipboardContents %s";
private static final String CLIPBOARD_DEBUG = "setClipboardContents %s";

protected NetworkSender sender; // out

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ private void writeObject(ObjectOutputStream out) throws IOException {

private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
in.defaultReadObject();
Log.info(String.valueOf(in));
image = ImageIO.read(in);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package mpo.dayon.common.network.message;

import mpo.dayon.common.log.Log;
import mpo.dayon.common.network.TransferableImage;

import java.awt.datatransfer.DataFlavor;
Expand All @@ -20,9 +19,7 @@ public NetworkClipboardGraphicMessage(TransferableImage payload) {
}

public static NetworkClipboardGraphicMessage unmarshall(ObjectInputStream in) throws IOException, ClassNotFoundException {
Log.info("unmarshall " +in);
TransferableImage graphic = (TransferableImage) in.readObject();
Log.info("unmarshall " +graphic);
TransferableImage graphic = (TransferableImage) in.readUnshared();
return new NetworkClipboardGraphicMessage(graphic);
}

Expand Down

0 comments on commit eaf8712

Please sign in to comment.