mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2025-09-10 18:59:41 +02:00
Make JUL Loggers final (SMACK-536)
This commit is contained in:
parent
f0c6d1f1d3
commit
54a421e84e
30 changed files with 109 additions and 109 deletions
|
@ -42,7 +42,7 @@ import java.util.logging.Logger;
|
|||
* @author Gaston Dombiak
|
||||
*/
|
||||
public class MultipleRecipientManager {
|
||||
private static Logger log = Logger.getLogger(MultipleRecipientManager.class.getName());
|
||||
private static final Logger LOGGER = Logger.getLogger(MultipleRecipientManager.class.getName());
|
||||
|
||||
/**
|
||||
* Create a cache to hold the 100 most recently accessed elements for a period of
|
||||
|
@ -315,7 +315,7 @@ public class MultipleRecipientManager {
|
|||
services.put(serviceName, serviceAddress == null ? "" : serviceAddress);
|
||||
}
|
||||
catch (XMPPException e) {
|
||||
log.log(Level.SEVERE, "Error occurred retrieving multiple recipients service", e);
|
||||
LOGGER.log(Level.SEVERE, "Error occurred retrieving multiple recipients service", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -72,7 +72,7 @@ import org.jivesoftware.smack.XMPPException;
|
|||
* @author Henning Staib
|
||||
*/
|
||||
public class Socks5Proxy {
|
||||
private static Logger log = Logger.getLogger(Socks5Proxy.class.getName());
|
||||
private static final Logger LOGGER = Logger.getLogger(Socks5Proxy.class.getName());
|
||||
|
||||
/* SOCKS5 proxy singleton */
|
||||
private static Socks5Proxy socks5Server;
|
||||
|
@ -196,7 +196,7 @@ public class Socks5Proxy {
|
|||
}
|
||||
catch (IOException e) {
|
||||
// couldn't setup server
|
||||
log.log(Level.SEVERE, "couldn't setup local SOCKS5 proxy on port " + getLocalSocks5ProxyPort(), e);
|
||||
LOGGER.log(Level.SEVERE, "couldn't setup local SOCKS5 proxy on port " + getLocalSocks5ProxyPort(), e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ import org.xmlpull.v1.XmlPullParserException;
|
|||
*
|
||||
*/
|
||||
public class SimpleDirectoryPersistentCache implements EntityCapsPersistentCache {
|
||||
private static Logger log = Logger.getLogger(SimpleDirectoryPersistentCache.class.getName());
|
||||
private static final Logger LOGGER = Logger.getLogger(SimpleDirectoryPersistentCache.class.getName());
|
||||
|
||||
private File cacheDir;
|
||||
private StringEncoder filenameEncoder;
|
||||
|
@ -94,7 +94,7 @@ public class SimpleDirectoryPersistentCache implements EntityCapsPersistentCache
|
|||
if (nodeFile.createNewFile())
|
||||
writeInfoToFile(nodeFile, info);
|
||||
} catch (IOException e) {
|
||||
log.log(Level.SEVERE, "Failed to write disco info to file", e);
|
||||
LOGGER.log(Level.SEVERE, "Failed to write disco info to file", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -163,7 +163,7 @@ public class SimpleDirectoryPersistentCache implements EntityCapsPersistentCache
|
|||
parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, true);
|
||||
parser.setInput(reader);
|
||||
} catch (XmlPullParserException xppe) {
|
||||
log.log(Level.SEVERE, "Exception initializing parser", xppe);
|
||||
LOGGER.log(Level.SEVERE, "Exception initializing parser", xppe);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ import org.jivesoftware.smackx.xdata.Form;
|
|||
* @author Gaston Dombiak, Larry Kirschner
|
||||
*/
|
||||
public class MultiUserChat {
|
||||
private static Logger log = Logger.getLogger(MultiUserChat.class.getName());
|
||||
private static final Logger LOGGER = Logger.getLogger(MultiUserChat.class.getName());
|
||||
|
||||
private final static String discoNamespace = "http://jabber.org/protocol/muc";
|
||||
private final static String discoNode = "http://jabber.org/protocol/muc#rooms";
|
||||
|
@ -183,7 +183,7 @@ public class MultiUserChat {
|
|||
return result.containsFeature(discoNamespace);
|
||||
}
|
||||
catch (XMPPException e) {
|
||||
log.log(Level.SEVERE, "Error checking user [" + user + "] for MUC support", e);
|
||||
LOGGER.log(Level.SEVERE, "Error checking user [" + user + "] for MUC support", e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -226,7 +226,7 @@ public class MultiUserChat {
|
|||
return answer.iterator();
|
||||
}
|
||||
catch (XMPPException e) {
|
||||
log.log(Level.SEVERE, "Error getting joined rooms for user [" + user + "]", e);
|
||||
LOGGER.log(Level.SEVERE, "Error getting joined rooms for user [" + user + "]", e);
|
||||
// Return an iterator on an empty collection
|
||||
return new ArrayList<String>().iterator();
|
||||
}
|
||||
|
@ -870,7 +870,7 @@ public class MultiUserChat {
|
|||
}
|
||||
}
|
||||
catch (XMPPException e) {
|
||||
log.log(Level.SEVERE, "Error retrieving room nickname", e);
|
||||
LOGGER.log(Level.SEVERE, "Error retrieving room nickname", e);
|
||||
}
|
||||
// If no Identity was found then the user does not have a reserved room nickname
|
||||
return null;
|
||||
|
@ -1824,11 +1824,11 @@ public class MultiUserChat {
|
|||
method.invoke(listener, params);
|
||||
}
|
||||
} catch (NoSuchMethodException e) {
|
||||
log.log(Level.SEVERE, "Failed to invoke method on UserStatusListener", e);
|
||||
LOGGER.log(Level.SEVERE, "Failed to invoke method on UserStatusListener", e);
|
||||
} catch (InvocationTargetException e) {
|
||||
log.log(Level.SEVERE, "Failed to invoke method on UserStatusListener", e);
|
||||
LOGGER.log(Level.SEVERE, "Failed to invoke method on UserStatusListener", e);
|
||||
} catch (IllegalAccessException e) {
|
||||
log.log(Level.SEVERE, "Failed to invoke method on UserStatusListener", e);
|
||||
LOGGER.log(Level.SEVERE, "Failed to invoke method on UserStatusListener", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1875,11 +1875,11 @@ public class MultiUserChat {
|
|||
method.invoke(listener, params.toArray());
|
||||
}
|
||||
} catch (NoSuchMethodException e) {
|
||||
log.log(Level.SEVERE, "Failed to invoke method on ParticipantStatusListener", e);
|
||||
LOGGER.log(Level.SEVERE, "Failed to invoke method on ParticipantStatusListener", e);
|
||||
} catch (InvocationTargetException e) {
|
||||
log.log(Level.SEVERE, "Failed to invoke method on ParticipantStatusListener", e);
|
||||
LOGGER.log(Level.SEVERE, "Failed to invoke method on ParticipantStatusListener", e);
|
||||
} catch (IllegalAccessException e) {
|
||||
log.log(Level.SEVERE, "Failed to invoke method on ParticipantStatusListener", e);
|
||||
LOGGER.log(Level.SEVERE, "Failed to invoke method on ParticipantStatusListener", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ import org.xmlpull.v1.XmlPullParser;
|
|||
*
|
||||
*/
|
||||
public class StreamInitiationProvider implements IQProvider {
|
||||
private static Logger log = Logger.getLogger(StreamInitiationProvider.class.getName());
|
||||
private static final Logger LOGGER = Logger.getLogger(StreamInitiationProvider.class.getName());
|
||||
|
||||
public IQ parseIQ(final XmlPullParser parser) throws Exception {
|
||||
boolean done = false;
|
||||
|
@ -91,7 +91,7 @@ public class StreamInitiationProvider implements IQProvider {
|
|||
fileSize = Long.parseLong(size);
|
||||
}
|
||||
catch (NumberFormatException e) {
|
||||
log.log(Level.SEVERE, "Failed to parse file size from " + fileSize, e);
|
||||
LOGGER.log(Level.SEVERE, "Failed to parse file size from " + fileSize, e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ import java.util.logging.Logger;
|
|||
* @author Matt Tucker
|
||||
*/
|
||||
public class Time extends IQ {
|
||||
private static Logger log = Logger.getLogger(Time.class.getName());
|
||||
private static final Logger LOGGER = Logger.getLogger(Time.class.getName());
|
||||
|
||||
private static SimpleDateFormat utcFormat = new SimpleDateFormat("yyyyMMdd'T'HH:mm:ss");
|
||||
private static DateFormat displayFormat = DateFormat.getDateTimeInstance();
|
||||
|
@ -109,7 +109,7 @@ public class Time extends IQ {
|
|||
date = cal.getTime();
|
||||
}
|
||||
catch (Exception e) {
|
||||
log.log(Level.SEVERE, "Error getting local time", e);
|
||||
LOGGER.log(Level.SEVERE, "Error getting local time", e);
|
||||
}
|
||||
return date;
|
||||
}
|
||||
|
|
|
@ -79,7 +79,7 @@ import org.jivesoftware.smack.util.StringUtils;
|
|||
* @author Kirill Maximov (kir@maxkir.com)
|
||||
*/
|
||||
public class VCard extends IQ {
|
||||
private static Logger log = Logger.getLogger(VCard.class.getName());
|
||||
private static final Logger LOGGER = Logger.getLogger(VCard.class.getName());
|
||||
|
||||
private static final String DEFAULT_MIME_TYPE = "image/jpeg";
|
||||
|
||||
|
@ -328,7 +328,7 @@ public class VCard extends IQ {
|
|||
bytes = getBytes(avatarURL);
|
||||
}
|
||||
catch (IOException e) {
|
||||
log.log(Level.SEVERE, "Error getting bytes from URL: " + avatarURL, e);
|
||||
LOGGER.log(Level.SEVERE, "Error getting bytes from URL: " + avatarURL, e);
|
||||
}
|
||||
|
||||
setAvatar(bytes);
|
||||
|
@ -485,7 +485,7 @@ public class VCard extends IQ {
|
|||
digest = MessageDigest.getInstance("SHA-1");
|
||||
}
|
||||
catch (NoSuchAlgorithmException e) {
|
||||
log.log(Level.SEVERE, "Failed to get message digest", e);
|
||||
LOGGER.log(Level.SEVERE, "Failed to get message digest", e);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ import java.util.logging.Logger;
|
|||
* @author Derek DeMoro
|
||||
*/
|
||||
public class VCardProvider implements IQProvider {
|
||||
private static Logger log = Logger.getLogger(VCardProvider.class.getName());
|
||||
private static final Logger LOGGER = Logger.getLogger(VCardProvider.class.getName());
|
||||
|
||||
private static final String PREFERRED_ENCODING = "UTF-8";
|
||||
|
||||
|
@ -72,10 +72,10 @@ public class VCardProvider implements IQProvider {
|
|||
}
|
||||
}
|
||||
catch (XmlPullParserException e) {
|
||||
log.log(Level.SEVERE, "Exception parsing VCard", e);
|
||||
LOGGER.log(Level.SEVERE, "Exception parsing VCard", e);
|
||||
}
|
||||
catch (IOException e) {
|
||||
log.log(Level.SEVERE, "Exception parsing VCard", e);
|
||||
LOGGER.log(Level.SEVERE, "Exception parsing VCard", e);
|
||||
}
|
||||
|
||||
String xmlText = sb.toString();
|
||||
|
|
|
@ -40,7 +40,7 @@ import org.jivesoftware.smackx.xevent.packet.MessageEvent;
|
|||
* @author Gaston Dombiak
|
||||
*/
|
||||
public class MessageEventManager {
|
||||
private static Logger log = Logger.getLogger(MessageEventManager.class.getName());
|
||||
private static final Logger LOGGER = Logger.getLogger(MessageEventManager.class.getName());
|
||||
|
||||
private List<MessageEventNotificationListener> messageEventNotificationListeners = new ArrayList<MessageEventNotificationListener>();
|
||||
private List<MessageEventRequestListener> messageEventRequestListeners = new ArrayList<MessageEventRequestListener>();
|
||||
|
@ -157,7 +157,7 @@ public class MessageEventManager {
|
|||
method.invoke(listeners[i], new Object[] { from, packetID, this });
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "Error while invoking MessageEventRequestListener", e);
|
||||
LOGGER.log(Level.SEVERE, "Error while invoking MessageEventRequestListener", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -184,7 +184,7 @@ public class MessageEventManager {
|
|||
method.invoke(listeners[i], new Object[] { from, packetID });
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "Error while invoking MessageEventNotificationListener", e);
|
||||
LOGGER.log(Level.SEVERE, "Error while invoking MessageEventNotificationListener", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ import java.util.logging.Logger;
|
|||
*/
|
||||
public class XHTMLManager {
|
||||
|
||||
private static Logger log = Logger.getLogger(XHTMLManager.class.getName());
|
||||
private static final Logger LOGGER = Logger.getLogger(XHTMLManager.class.getName());
|
||||
|
||||
private final static String namespace = "http://jabber.org/protocol/xhtml-im";
|
||||
|
||||
|
@ -139,7 +139,7 @@ public class XHTMLManager {
|
|||
return result.containsFeature(namespace);
|
||||
}
|
||||
catch (XMPPException e) {
|
||||
log.log(Level.SEVERE, "Error checking if service is available", e);
|
||||
LOGGER.log(Level.SEVERE, "Error checking if service is available", e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue