diff --git a/src/org/jibble/pircbot/DccManager.java b/src/org/jibble/pircbot/DccManager.java index a2a9d58..1fbd06d 100644 --- a/src/org/jibble/pircbot/DccManager.java +++ b/src/org/jibble/pircbot/DccManager.java @@ -86,7 +86,8 @@ public class DccManager { } else if (type.equals("ACCEPT")) { int port = Integer.parseInt(tokenizer.nextToken()); - long progress = Long.parseLong(tokenizer.nextToken()); + // XXX: progress is not used? + //long progress = Long.parseLong(tokenizer.nextToken()); DccFileTransfer transfer = null; synchronized (_awaitingResume) { @@ -146,6 +147,6 @@ public class DccManager { private PircBot _bot; - private Vector _awaitingResume = new Vector(); + private Vector _awaitingResume = new Vector(); } diff --git a/src/org/jibble/pircbot/IrcException.java b/src/org/jibble/pircbot/IrcException.java index 333ee3a..c34e9a1 100644 --- a/src/org/jibble/pircbot/IrcException.java +++ b/src/org/jibble/pircbot/IrcException.java @@ -22,8 +22,9 @@ package org.jibble.pircbot; * @version 1.4.6 (Build time: Wed Apr 11 19:20:59 2007) */ public class IrcException extends Exception { - - /** + private static final long serialVersionUID = -3705541066912475928L; + + /** * Constructs a new IrcException. * * @param e The error message to report. diff --git a/src/org/jibble/pircbot/NickAlreadyInUseException.java b/src/org/jibble/pircbot/NickAlreadyInUseException.java index c7b7eec..6e950ff 100644 --- a/src/org/jibble/pircbot/NickAlreadyInUseException.java +++ b/src/org/jibble/pircbot/NickAlreadyInUseException.java @@ -25,8 +25,9 @@ package org.jibble.pircbot; * @version 1.4.6 (Build time: Wed Apr 11 19:20:59 2007) */ public class NickAlreadyInUseException extends IrcException { - - /** + private static final long serialVersionUID = -4724325464519465479L; + + /** * Constructs a new IrcException. * * @param e The error message to report. diff --git a/src/org/jibble/pircbot/OutputThread.java b/src/org/jibble/pircbot/OutputThread.java index 963ca70..e1e33bb 100644 --- a/src/org/jibble/pircbot/OutputThread.java +++ b/src/org/jibble/pircbot/OutputThread.java @@ -15,7 +15,6 @@ found at http://www.jibble.org/licenses/ package org.jibble.pircbot; import java.io.*; -import java.net.*; /** * A Thread which is responsible for sending messages to the IRC server. diff --git a/src/org/jibble/pircbot/PircBot.java b/src/org/jibble/pircbot/PircBot.java index 369c734..96b9c42 100644 --- a/src/org/jibble/pircbot/PircBot.java +++ b/src/org/jibble/pircbot/PircBot.java @@ -2849,10 +2849,10 @@ public abstract class PircBot implements ReplyConstants { channel = channel.toLowerCase(); User[] userArray = new User[0]; synchronized (_channels) { - Hashtable users = (Hashtable) _channels.get(channel); + Hashtable users = _channels.get(channel); if (users != null) { userArray = new User[users.size()]; - Enumeration enumeration = users.elements(); + Enumeration enumeration = users.elements(); for (int i = 0; i < userArray.length; i++) { User user = (User) enumeration.nextElement(); userArray[i] = user; @@ -2879,7 +2879,7 @@ public abstract class PircBot implements ReplyConstants { String[] channels = new String[0]; synchronized (_channels) { channels = new String[_channels.size()]; - Enumeration enumeration = _channels.keys(); + Enumeration enumeration = _channels.keys(); for (int i = 0; i < channels.length; i++) { channels[i] = (String) enumeration.nextElement(); } @@ -2921,9 +2921,9 @@ public abstract class PircBot implements ReplyConstants { private final void addUser(String channel, User user) { channel = channel.toLowerCase(); synchronized (_channels) { - Hashtable users = (Hashtable) _channels.get(channel); + Hashtable users = _channels.get(channel); if (users == null) { - users = new Hashtable(); + users = new Hashtable(); _channels.put(channel, users); } users.put(user, user); @@ -2938,7 +2938,7 @@ public abstract class PircBot implements ReplyConstants { channel = channel.toLowerCase(); User user = new User("", nick); synchronized (_channels) { - Hashtable users = (Hashtable) _channels.get(channel); + Hashtable users = _channels.get(channel); if (users != null) { return (User) users.remove(user); } @@ -2952,7 +2952,7 @@ public abstract class PircBot implements ReplyConstants { */ private final void removeUser(String nick) { synchronized (_channels) { - Enumeration enumeration = _channels.keys(); + Enumeration enumeration = _channels.keys(); while (enumeration.hasMoreElements()) { String channel = (String) enumeration.nextElement(); this.removeUser(channel, nick); @@ -2966,7 +2966,7 @@ public abstract class PircBot implements ReplyConstants { */ private final void renameUser(String oldNick, String newNick) { synchronized (_channels) { - Enumeration enumeration = _channels.keys(); + Enumeration enumeration = _channels.keys(); while (enumeration.hasMoreElements()) { String channel = (String) enumeration.nextElement(); User user = this.removeUser(channel, oldNick); @@ -2995,7 +2995,7 @@ public abstract class PircBot implements ReplyConstants { */ private final void removeAllChannels() { synchronized(_channels) { - _channels = new Hashtable(); + _channels = new Hashtable>(); } } @@ -3003,10 +3003,10 @@ public abstract class PircBot implements ReplyConstants { private final void updateUser(String channel, int userMode, String nick) { channel = channel.toLowerCase(); synchronized (_channels) { - Hashtable users = (Hashtable) _channels.get(channel); + Hashtable users = _channels.get(channel); User newUser = null; if (users != null) { - Enumeration enumeration = users.elements(); + Enumeration enumeration = users.elements(); while(enumeration.hasMoreElements()) { User userObj = (User) enumeration.nextElement(); if (userObj.getNick().equalsIgnoreCase(nick)) { @@ -3074,11 +3074,11 @@ public abstract class PircBot implements ReplyConstants { // A Hashtable of channels that points to a selfreferential Hashtable of // User objects (used to remember which users are in which channels). - private Hashtable _channels = new Hashtable(); + private Hashtable> _channels = new Hashtable>(); // A Hashtable to temporarily store channel topics when we join them // until we find out who set that topic. - private Hashtable _topics = new Hashtable(); + private Hashtable _topics = new Hashtable(); // DccManager to process and handle all DCC events. private DccManager _dccManager = new DccManager(this); diff --git a/src/org/jibble/pircbot/Queue.java b/src/org/jibble/pircbot/Queue.java index c349cd6..37c899e 100644 --- a/src/org/jibble/pircbot/Queue.java +++ b/src/org/jibble/pircbot/Queue.java @@ -141,6 +141,6 @@ public class Queue { } - private Vector _queue = new Vector(); + private Vector _queue = new Vector(); }