From 49f65bd7aa7ab8c1ef641e06c8dbe0958ddca8ed Mon Sep 17 00:00:00 2001 From: "PSp..om" Date: Fri, 8 Apr 2011 02:01:52 +0000 Subject: [PATCH] At least fixing the type-check warnings in the code I added. Serializer is a little harder... git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7218 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../networking/com/jme3/network/base/ConnectorAdapter.java | 4 ++-- .../src/networking/com/jme3/network/base/DefaultClient.java | 2 +- .../src/networking/com/jme3/network/base/DefaultServer.java | 1 + .../src/networking/com/jme3/network/base/KernelAdapter.java | 4 ++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/engine/src/networking/com/jme3/network/base/ConnectorAdapter.java b/engine/src/networking/com/jme3/network/base/ConnectorAdapter.java index abab43472..82734349f 100644 --- a/engine/src/networking/com/jme3/network/base/ConnectorAdapter.java +++ b/engine/src/networking/com/jme3/network/base/ConnectorAdapter.java @@ -61,14 +61,14 @@ import com.jme3.network.serializing.Serializer; public class ConnectorAdapter extends Thread { private Connector connector; - private MessageListener dispatcher; + private MessageListener dispatcher; private AtomicBoolean go = new AtomicBoolean(true); // Marks the messages as reliable or not if they came // through this connector. private boolean reliable; - public ConnectorAdapter( Connector connector, MessageListener dispatcher, boolean reliable ) + public ConnectorAdapter( Connector connector, MessageListener dispatcher, boolean reliable ) { super( String.valueOf(connector) ); this.connector = connector; diff --git a/engine/src/networking/com/jme3/network/base/DefaultClient.java b/engine/src/networking/com/jme3/network/base/DefaultClient.java index 609ab6e04..19130db51 100644 --- a/engine/src/networking/com/jme3/network/base/DefaultClient.java +++ b/engine/src/networking/com/jme3/network/base/DefaultClient.java @@ -311,7 +311,7 @@ public class DefaultClient implements Client } } - protected class Redispatch implements MessageListener + protected class Redispatch implements MessageListener { public void messageReceived( Object source, Message m ) { diff --git a/engine/src/networking/com/jme3/network/base/DefaultServer.java b/engine/src/networking/com/jme3/network/base/DefaultServer.java index ee9582769..077bfafb4 100644 --- a/engine/src/networking/com/jme3/network/base/DefaultServer.java +++ b/engine/src/networking/com/jme3/network/base/DefaultServer.java @@ -434,6 +434,7 @@ public class DefaultServer implements Server return sessionData.put(name, value); } + @SuppressWarnings("unchecked") public T getAttribute( String name ) { return (T)sessionData.get(name); diff --git a/engine/src/networking/com/jme3/network/base/KernelAdapter.java b/engine/src/networking/com/jme3/network/base/KernelAdapter.java index 148ae2d6f..680efa96e 100644 --- a/engine/src/networking/com/jme3/network/base/KernelAdapter.java +++ b/engine/src/networking/com/jme3/network/base/KernelAdapter.java @@ -67,14 +67,14 @@ public class KernelAdapter extends Thread private DefaultServer server; // this is unfortunate private Kernel kernel; - private MessageListener messageDispatcher; + private MessageListener messageDispatcher; private AtomicBoolean go = new AtomicBoolean(true); // Marks the messages as reliable or not if they came // through this connector. private boolean reliable; - public KernelAdapter( DefaultServer server, Kernel kernel, MessageListener messageDispatcher, + public KernelAdapter( DefaultServer server, Kernel kernel, MessageListener messageDispatcher, boolean reliable ) { super( String.valueOf(kernel) );