Ciao, stò facendo un mini programmino in java per testare una cosa eppure ho qualche problema in fase di compilazione (nulla di che, un warning, eppure mi stà facendo andare in bestia)...

Qualcuno ha qualche idea?

Ecco il codice:

codice:
//server di comunicazione

import java.io.*;
import java.net.*;
import java.util.*;
import java.text.DateFormat;

class server {
	public static void main (String args[]) throws Exception {
		ServerSocket server = null;
		Socket client = null;
		ThreadTCP t;
		Hashtable hashtbl = new Hashtable();

		try
		{
			server = new ServerSocket(7000);
		}
		catch (IOException e){}
		while(true)
		{
			client = server.accept();
			t = new ThreadTCP(client, hashtbl);
			t.start();
		}
	}
}

//rendere multithread
class ThreadTCP extends Thread {
	
	private Socket thread_client = null;
	//User tmp = null;
	private Date now = new Date();
	private Hashtable onuser = new Hashtable();

	public ThreadTCP(Socket client, Hashtable hashtbl)
	{
		this.thread_client = client;
		this.onuser = hashtbl;
	}

	public void run()
	{
		try
		{
			String strng_client, frase_server;
			InetAddress tmpip = null;
			String tmp = new String("testo a caso");
			BufferedReader from_client = new BufferedReader(new InputStreamReader(thread_client.getInputStream()));
			strng_client = from_client.readLine();
			tmpip = thread_client.getInetAddress();
			System.out.println(tmpip + " connesso " + DateFormat.getTimeInstance(DateFormat.SHORT).format(now));
			if(onuser.contains(tmpip)){
				System.out.println("gia connesso");	
			}
			else {
				System.out.println("connettiti");
				onuser.put(tmp, tmpip);
			}
			frase_server = strng_client.toUpperCase();
			DataOutputStream server_out = new DataOutputStream(thread_client.getOutputStream());
			server_out.writeBytes(frase_server + '\n');
		}
		catch (IOException e) {}
	}
}
Il warning è il seguente:

codice:
server.java:82: warning: [unchecked] unchecked call to put(K,V) as a member of the raw type java.util.Hashtable
                                onuser.put(tmp, tmpip);
                                          ^
1 warning
Qualche idea???