1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2025-09-10 18:59:41 +02:00

Merge branch '3.4.0' into master

Conflicts:
	source/org/jivesoftware/smack/SmackConfiguration.java
This commit is contained in:
Florian Schmaus 2014-02-03 10:26:33 +01:00
commit b18a43920a
154 changed files with 3460 additions and 1650 deletions

View file

@ -337,6 +337,7 @@ public class DiscoverInfo extends IQ {
* 'type' attribute refer to <a href="http://www.jabber.org/registrar/disco-categories.html">Jabber::Registrar</a>
*
* @param type the identity's type.
* @deprecated As per the spec, this field is mandatory and the 3 argument constructor should be used instead.
*/
public void setType(String type) {
this.type = type;

View file

@ -30,6 +30,7 @@ import org.jivesoftware.smack.packet.PacketExtension;
*
* @author Jeff Williams
*/
@Deprecated
public class PEPEvent implements PacketExtension {
PEPItem item;

View file

@ -30,6 +30,7 @@ import org.jivesoftware.smack.packet.PacketExtension;
*
* @author Jeff Williams
*/
@Deprecated
public abstract class PEPItem implements PacketExtension {
String id;

View file

@ -30,6 +30,7 @@ import org.jivesoftware.smack.packet.IQ;
*
* @author Jeff Williams
*/
@Deprecated
public class PEPPubSub extends IQ {
PEPItem item;

View file

@ -27,6 +27,8 @@ import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.TimeZone;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
* A Time IQ packet, which is used by XMPP clients to exchange their respective local
@ -61,7 +63,8 @@ import java.util.TimeZone;
* @author Matt Tucker
*/
public class Time extends IQ {
private static Logger log = Logger.getLogger(Time.class.getName());
private static SimpleDateFormat utcFormat = new SimpleDateFormat("yyyyMMdd'T'HH:mm:ss");
private static DateFormat displayFormat = DateFormat.getDateTimeInstance();
@ -94,7 +97,7 @@ public class Time extends IQ {
/**
* Returns the local time or <tt>null</tt> if the time hasn't been set.
*
* @return the lcocal time.
* @return the local time.
*/
public Date getTime() {
if (utc == null) {
@ -109,7 +112,7 @@ public class Time extends IQ {
date = cal.getTime();
}
catch (Exception e) {
e.printStackTrace();
log.log(Level.SEVERE, "Error getting local time", e);
}
return date;
}

View file

@ -33,6 +33,8 @@ import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.jivesoftware.smack.Connection;
import org.jivesoftware.smack.PacketCollector;
@ -85,6 +87,8 @@ 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 String DEFAULT_MIME_TYPE = "image/jpeg";
/**
@ -332,7 +336,7 @@ public class VCard extends IQ {
bytes = getBytes(avatarURL);
}
catch (IOException e) {
e.printStackTrace();
log.log(Level.SEVERE, "Error getting bytes from URL: " + avatarURL, e);
}
setAvatar(bytes);
@ -489,7 +493,7 @@ public class VCard extends IQ {
digest = MessageDigest.getInstance("SHA-1");
}
catch (NoSuchAlgorithmException e) {
e.printStackTrace();
log.log(Level.SEVERE, "Failed to get message digest", e);
return null;
}
@ -582,7 +586,7 @@ public class VCard extends IQ {
result = (VCard) packet;
}
catch (ClassCastException e) {
System.out.println("No VCard for " + user);
log.log(Level.SEVERE, "No VCard for " + user, e);
return;
}