mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-21 22:02:06 +01:00
Enable more 'checkstyle' checks
AvoidStarImport IllegalImport RedundantImport UpperEll ArrayTypeStyle GenericWhitespace EmptyStatement PackageDelcaration
This commit is contained in:
parent
522d0f30ff
commit
7277eb553a
92 changed files with 465 additions and 253 deletions
|
@ -22,7 +22,6 @@
|
|||
<module name="UnusedImports">
|
||||
<property name="processJavadoc" value="true"/>
|
||||
</module>
|
||||
<!-- TODO: enable later on
|
||||
<module name="AvoidStarImport"/>
|
||||
<module name="IllegalImport"/>
|
||||
<module name="RedundantImport"/>
|
||||
|
@ -31,6 +30,5 @@
|
|||
<module name="GenericWhitespace"/>
|
||||
<module name="EmptyStatement"/>
|
||||
<module name="PackageDeclaration"/>
|
||||
-->
|
||||
</module>
|
||||
</module>
|
||||
|
|
|
@ -3,5 +3,11 @@
|
|||
"-//Puppy Crawl//DTD Suppressions 1.1//EN"
|
||||
"http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">
|
||||
<suppressions>
|
||||
<!-- currently none -->
|
||||
<suppress checks="IllegalImport"
|
||||
files="Java7HostnameVerifier.java"/>
|
||||
<!-- GenericWhitespace has some problems with false postive, leave
|
||||
it disabled until gradle uses a checkstyle version where this is fixed
|
||||
-->
|
||||
<suppress checks="GenericWhitespace"
|
||||
files="Protocol.java" />
|
||||
</suppressions>
|
||||
|
|
|
@ -22,7 +22,10 @@ import org.jivesoftware.smack.ConnectionListener;
|
|||
import org.jivesoftware.smack.PacketListener;
|
||||
import org.jivesoftware.smack.XMPPConnection;
|
||||
import org.jivesoftware.smack.packet.Packet;
|
||||
import org.jivesoftware.smack.util.*;
|
||||
import org.jivesoftware.smack.util.ObservableReader;
|
||||
import org.jivesoftware.smack.util.ObservableWriter;
|
||||
import org.jivesoftware.smack.util.ReaderListener;
|
||||
import org.jivesoftware.smack.util.WriterListener;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
|
|
|
@ -17,11 +17,16 @@
|
|||
|
||||
package org.jivesoftware.smack;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import org.jivesoftware.smack.SmackException.NotConnectedException;
|
||||
import org.jivesoftware.smack.packet.IQ;
|
||||
import org.jivesoftware.smack.packet.RosterPacket;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* Each user in your roster is represented by a roster entry, which contains the user's
|
||||
|
|
|
@ -20,7 +20,10 @@ import org.jivesoftware.smack.ConnectionListener;
|
|||
import org.jivesoftware.smack.PacketListener;
|
||||
import org.jivesoftware.smack.XMPPConnection;
|
||||
import org.jivesoftware.smack.packet.Packet;
|
||||
import org.jivesoftware.smack.util.*;
|
||||
import org.jivesoftware.smack.util.ObservableReader;
|
||||
import org.jivesoftware.smack.util.ObservableWriter;
|
||||
import org.jivesoftware.smack.util.ReaderListener;
|
||||
import org.jivesoftware.smack.util.WriterListener;
|
||||
import org.jxmpp.util.XmppStringUtils;
|
||||
|
||||
import java.io.Reader;
|
||||
|
|
|
@ -17,9 +17,10 @@
|
|||
|
||||
package org.jivesoftware.smack.debugger;
|
||||
|
||||
import java.io.*;
|
||||
import java.io.Reader;
|
||||
import java.io.Writer;
|
||||
|
||||
import org.jivesoftware.smack.*;
|
||||
import org.jivesoftware.smack.PacketListener;
|
||||
|
||||
/**
|
||||
* Interface that allows for implementing classes to debug XML traffic. That is a GUI window that
|
||||
|
|
|
@ -17,7 +17,10 @@
|
|||
|
||||
package org.jivesoftware.smack.packet;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.jivesoftware.smack.util.XmlStringBuilder;
|
||||
|
||||
|
|
|
@ -17,9 +17,15 @@
|
|||
|
||||
package org.jivesoftware.smack.packet;
|
||||
|
||||
import org.jivesoftware.smack.util.XmlStringBuilder;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Set;
|
||||
|
||||
import java.util.*;
|
||||
import org.jivesoftware.smack.util.XmlStringBuilder;
|
||||
|
||||
/**
|
||||
* Represents XMPP message packets. A message can be one of several types:
|
||||
|
|
|
@ -22,7 +22,6 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
|
||||
import org.jivesoftware.smack.packet.PacketExtension;
|
||||
import org.jivesoftware.smack.provider.PacketExtensionProvider;
|
||||
import org.jivesoftware.smack.util.PacketParserUtils;
|
||||
import org.xmlpull.v1.XmlPullParser;
|
||||
|
||||
|
|
|
@ -203,7 +203,7 @@ public abstract class SASLMechanism implements Comparable<SASLMechanism> {
|
|||
*/
|
||||
public final void challengeReceived(String challengeString, boolean finalChallenge) throws SmackException, NotConnectedException {
|
||||
byte[] challenge = StringUtils.decodeBase64(challengeString);
|
||||
byte response[] = evaluateChallenge(challenge);
|
||||
byte[] response = evaluateChallenge(challenge);
|
||||
if (finalChallenge) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -108,8 +108,8 @@ public class Base32Encoder implements StringEncoder {
|
|||
ByteArrayOutputStream os = new ByteArrayOutputStream();
|
||||
|
||||
for (int i = 0; i < (b.length + 4) / 5; i++) {
|
||||
short s[] = new short[5];
|
||||
int t[] = new int[8];
|
||||
short[] s = new short[5];
|
||||
int[] t = new int[8];
|
||||
|
||||
int blocklen = 5;
|
||||
for (int j = 0; j < 5; j++) {
|
||||
|
|
|
@ -16,7 +16,14 @@
|
|||
*/
|
||||
package org.jivesoftware.smack.util;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.AbstractCollection;
|
||||
import java.util.AbstractSet;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
/**
|
||||
|
|
|
@ -106,7 +106,7 @@ public final class FileUtils {
|
|||
Reader reader = null;
|
||||
try {
|
||||
reader = new FileReader(file);
|
||||
char buf[] = new char[8192];
|
||||
char[] buf = new char[8192];
|
||||
int len;
|
||||
StringBuilder s = new StringBuilder();
|
||||
while ((len = reader.read(buf)) >= 0) {
|
||||
|
|
|
@ -16,8 +16,11 @@
|
|||
*/
|
||||
package org.jivesoftware.smack.util;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
import java.io.Reader;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* An ObservableReader is a wrapper on a Reader that notifies to its listeners when
|
||||
|
@ -59,7 +62,7 @@ public class ObservableReader extends Reader {
|
|||
return wrappedReader.read();
|
||||
}
|
||||
|
||||
public int read(char cbuf[]) throws IOException {
|
||||
public int read(char[] cbuf) throws IOException {
|
||||
return wrappedReader.read(cbuf);
|
||||
}
|
||||
|
||||
|
|
|
@ -16,8 +16,10 @@
|
|||
*/
|
||||
package org.jivesoftware.smack.util;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
import java.io.Writer;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* An ObservableWriter is a wrapper on a Writer that notifies to its listeners when
|
||||
|
@ -34,7 +36,7 @@ public class ObservableWriter extends Writer {
|
|||
this.wrappedWriter = wrappedWriter;
|
||||
}
|
||||
|
||||
public void write(char cbuf[], int off, int len) throws IOException {
|
||||
public void write(char[] cbuf, int off, int len) throws IOException {
|
||||
wrappedWriter.write(cbuf, off, len);
|
||||
String str = new String(cbuf, off, len);
|
||||
notifyListeners(str);
|
||||
|
@ -52,7 +54,7 @@ public class ObservableWriter extends Writer {
|
|||
wrappedWriter.write(c);
|
||||
}
|
||||
|
||||
public void write(char cbuf[]) throws IOException {
|
||||
public void write(char[] cbuf) throws IOException {
|
||||
wrappedWriter.write(cbuf);
|
||||
String str = new String(cbuf);
|
||||
notifyListeners(str);
|
||||
|
|
|
@ -344,7 +344,7 @@ public class PacketParserUtils {
|
|||
// XmlPullParser reports namespaces in nested elements even if *only* the outer ones defines
|
||||
// it. This 'flag' ensures that when a namespace is set for an element, it won't be set again
|
||||
// in a nested element. It's an ugly workaround that has the potential to break things.
|
||||
String namespaceElement = null;;
|
||||
String namespaceElement = null;
|
||||
while (true) {
|
||||
if (event == XmlPullParser.START_TAG) {
|
||||
xml.halfOpenElement(parser.getName());
|
||||
|
|
|
@ -23,14 +23,8 @@ import java.util.concurrent.BlockingQueue;
|
|||
import java.util.concurrent.LinkedBlockingQueue;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
|
||||
import org.jivesoftware.smack.SmackException.NotConnectedException;
|
||||
import org.jivesoftware.smack.XMPPConnection;
|
||||
import org.jivesoftware.smack.ConnectionConfiguration;
|
||||
import org.jivesoftware.smack.ConnectionCreationListener;
|
||||
import org.jivesoftware.smack.ConnectionListener;
|
||||
import org.jivesoftware.smack.PacketCollector;
|
||||
import org.jivesoftware.smack.Roster;
|
||||
import org.jivesoftware.smack.XMPPException;
|
||||
import org.jivesoftware.smack.packet.Packet;
|
||||
|
||||
/**
|
||||
|
|
|
@ -17,7 +17,12 @@
|
|||
|
||||
package org.jivesoftware.smack;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertNull;
|
||||
import static org.junit.Assert.assertSame;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
|
@ -552,7 +557,7 @@ public class RosterTest {
|
|||
connection.processPacket(rosterResult);
|
||||
break;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -16,9 +16,10 @@
|
|||
*/
|
||||
package org.jivesoftware.smack.packet;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
import org.jivesoftware.smack.packet.StreamError;
|
||||
import org.jivesoftware.smack.util.PacketParserUtils;
|
||||
import org.junit.Test;
|
||||
import org.xmlpull.v1.XmlPullParser;
|
||||
|
|
|
@ -22,12 +22,6 @@ import java.util.Collection;
|
|||
import org.junit.Assert;
|
||||
|
||||
import org.jivesoftware.smack.packet.IQ;
|
||||
import org.jivesoftware.smack.provider.ExtensionProviderInfo;
|
||||
import org.jivesoftware.smack.provider.IQProvider;
|
||||
import org.jivesoftware.smack.provider.IQProviderInfo;
|
||||
import org.jivesoftware.smack.provider.ProviderFileLoader;
|
||||
import org.jivesoftware.smack.provider.ProviderLoader;
|
||||
import org.jivesoftware.smack.provider.ProviderManager;
|
||||
import org.jivesoftware.smack.util.FileUtils;
|
||||
import org.junit.Test;
|
||||
import org.xmlpull.v1.XmlPullParser;
|
||||
|
|
|
@ -27,18 +27,48 @@ import org.jivesoftware.smack.packet.IQ;
|
|||
import org.jivesoftware.smack.packet.Message;
|
||||
import org.jivesoftware.smack.packet.Packet;
|
||||
import org.jivesoftware.smack.packet.Presence;
|
||||
import org.jivesoftware.smack.util.*;
|
||||
import org.jivesoftware.smack.util.ObservableReader;
|
||||
import org.jivesoftware.smack.util.ObservableWriter;
|
||||
import org.jivesoftware.smack.util.ReaderListener;
|
||||
import org.jivesoftware.smack.util.StringUtils;
|
||||
import org.jivesoftware.smack.util.WriterListener;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.AbstractAction;
|
||||
import javax.swing.BorderFactory;
|
||||
import javax.swing.Icon;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JFormattedTextField;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JMenuItem;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JPopupMenu;
|
||||
import javax.swing.JScrollPane;
|
||||
import javax.swing.JSplitPane;
|
||||
import javax.swing.JTabbedPane;
|
||||
import javax.swing.JTable;
|
||||
import javax.swing.JTextArea;
|
||||
import javax.swing.ListSelectionModel;
|
||||
import javax.swing.SwingUtilities;
|
||||
import javax.swing.event.ListSelectionEvent;
|
||||
import javax.swing.event.ListSelectionListener;
|
||||
import javax.swing.table.DefaultTableModel;
|
||||
import javax.swing.text.BadLocationException;
|
||||
import javax.xml.transform.*;
|
||||
import javax.xml.transform.OutputKeys;
|
||||
import javax.xml.transform.Transformer;
|
||||
import javax.xml.transform.TransformerConfigurationException;
|
||||
import javax.xml.transform.TransformerException;
|
||||
import javax.xml.transform.TransformerFactory;
|
||||
import javax.xml.transform.stream.StreamResult;
|
||||
import javax.xml.transform.stream.StreamSource;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Color;
|
||||
import java.awt.GridBagConstraints;
|
||||
import java.awt.GridBagLayout;
|
||||
import java.awt.GridLayout;
|
||||
import java.awt.Insets;
|
||||
import java.awt.Toolkit;
|
||||
import java.awt.datatransfer.Clipboard;
|
||||
import java.awt.datatransfer.StringSelection;
|
||||
import java.awt.event.ActionEvent;
|
||||
|
|
|
@ -17,18 +17,35 @@
|
|||
|
||||
package org.jivesoftware.smackx.debugger;
|
||||
|
||||
import org.jivesoftware.smack.SmackConfiguration;
|
||||
import org.jivesoftware.smack.provider.ProviderManager;
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.GridLayout;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.awt.event.MouseAdapter;
|
||||
import java.awt.event.MouseEvent;
|
||||
import java.awt.event.WindowAdapter;
|
||||
import java.awt.event.WindowEvent;
|
||||
import java.net.URL;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Vector;
|
||||
|
||||
import javax.swing.BorderFactory;
|
||||
import javax.swing.BoxLayout;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JFormattedTextField;
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JList;
|
||||
import javax.swing.JMenuItem;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JPopupMenu;
|
||||
import javax.swing.JScrollPane;
|
||||
import javax.swing.JTabbedPane;
|
||||
|
||||
import org.jivesoftware.smack.SmackConfiguration;
|
||||
import org.jivesoftware.smack.provider.ProviderManager;
|
||||
|
||||
/**
|
||||
* The EnhancedDebuggerWindow is the main debug window that will show all the EnhancedDebuggers.
|
||||
* For each connection to debug there will be an EnhancedDebugger that will be shown in the
|
||||
|
|
|
@ -17,17 +17,37 @@
|
|||
|
||||
package org.jivesoftware.smackx.debugger;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.datatransfer.*;
|
||||
import java.awt.event.*;
|
||||
import java.io.*;
|
||||
import java.awt.Color;
|
||||
import java.awt.GridLayout;
|
||||
import java.awt.Toolkit;
|
||||
import java.awt.datatransfer.Clipboard;
|
||||
import java.awt.datatransfer.StringSelection;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.awt.event.MouseAdapter;
|
||||
import java.awt.event.MouseEvent;
|
||||
import java.awt.event.MouseListener;
|
||||
import java.awt.event.WindowAdapter;
|
||||
import java.awt.event.WindowEvent;
|
||||
import java.io.Reader;
|
||||
import java.io.Writer;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JMenuItem;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JPopupMenu;
|
||||
import javax.swing.JScrollPane;
|
||||
import javax.swing.JTabbedPane;
|
||||
import javax.swing.JTextArea;
|
||||
|
||||
import org.jivesoftware.smack.*;
|
||||
import org.jivesoftware.smack.PacketListener;
|
||||
import org.jivesoftware.smack.XMPPConnection;
|
||||
import org.jivesoftware.smack.debugger.SmackDebugger;
|
||||
import org.jivesoftware.smack.packet.*;
|
||||
import org.jivesoftware.smack.util.*;
|
||||
import org.jivesoftware.smack.packet.Packet;
|
||||
import org.jivesoftware.smack.util.ObservableReader;
|
||||
import org.jivesoftware.smack.util.ObservableWriter;
|
||||
import org.jivesoftware.smack.util.ReaderListener;
|
||||
import org.jivesoftware.smack.util.WriterListener;
|
||||
import org.jxmpp.util.XmppStringUtils;
|
||||
|
||||
/**
|
||||
|
|
|
@ -16,14 +16,16 @@
|
|||
*/
|
||||
package org.jivesoftware.smackx.hoxt.provider;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import org.jivesoftware.smack.packet.PacketExtension;
|
||||
import org.jivesoftware.smack.util.PacketParserUtils;
|
||||
import org.jivesoftware.smackx.hoxt.packet.Base64BinaryChunk;
|
||||
import org.junit.Test;
|
||||
import org.xmlpull.v1.XmlPullParser;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Tests correct parsing of 'chunk' elements in Message stanza.
|
||||
*/
|
||||
|
|
|
@ -16,14 +16,16 @@
|
|||
*/
|
||||
package org.jivesoftware.smackx.hoxt.provider;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import org.jivesoftware.smack.packet.IQ;
|
||||
import org.jivesoftware.smack.util.PacketParserUtils;
|
||||
import org.jivesoftware.smackx.hoxt.packet.HttpOverXmppResp;
|
||||
import org.junit.Test;
|
||||
import org.xmlpull.v1.XmlPullParser;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Tests correct attribute parsing in 'resp' element.
|
||||
*/
|
||||
|
|
|
@ -16,14 +16,16 @@
|
|||
*/
|
||||
package org.jivesoftware.smackx.amp.packet;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
|
||||
import org.jivesoftware.smack.packet.PacketExtension;
|
||||
import org.jivesoftware.smackx.amp.AMPDeliverCondition;
|
||||
import org.jivesoftware.smackx.amp.AMPExpireAtCondition;
|
||||
import org.jivesoftware.smackx.amp.AMPMatchResourceCondition;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
|
||||
public class AMPExtension implements PacketExtension {
|
||||
|
||||
public static final String NAMESPACE = "http://jabber.org/protocol/amp";
|
||||
|
|
|
@ -627,7 +627,7 @@ public class InBandBytestreamSession implements BytestreamSession {
|
|||
buffer[bufferPointer++] = (byte) b;
|
||||
}
|
||||
|
||||
public synchronized void write(byte b[], int off, int len) throws IOException {
|
||||
public synchronized void write(byte[] b, int off, int len) throws IOException {
|
||||
if (b == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
|
@ -671,7 +671,7 @@ public class InBandBytestreamSession implements BytestreamSession {
|
|||
* @param len the number of bytes to write
|
||||
* @throws IOException if an I/O error occurred while sending or if the stream is closed
|
||||
*/
|
||||
private synchronized void writeOut(byte b[], int off, int len) throws IOException {
|
||||
private synchronized void writeOut(byte[] b, int off, int len) throws IOException {
|
||||
if (this.isClosed) {
|
||||
throw new IOException("Stream is closed");
|
||||
}
|
||||
|
|
|
@ -197,7 +197,7 @@ class Socks5Client {
|
|||
* @return SOCKS5 connection request message
|
||||
*/
|
||||
private byte[] createSocks5ConnectRequest() {
|
||||
byte addr[] = this.digest.getBytes();
|
||||
byte[] addr = this.digest.getBytes();
|
||||
|
||||
byte[] data = new byte[7 + addr.length];
|
||||
data[0] = (byte) 0x05; // version (SOCKS5)
|
||||
|
|
|
@ -17,8 +17,22 @@
|
|||
|
||||
package org.jivesoftware.smackx.commands;
|
||||
|
||||
import org.jivesoftware.smack.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.WeakHashMap;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import org.jivesoftware.smack.ConnectionCreationListener;
|
||||
import org.jivesoftware.smack.Manager;
|
||||
import org.jivesoftware.smack.PacketListener;
|
||||
import org.jivesoftware.smack.SmackException;
|
||||
import org.jivesoftware.smack.SmackException.NotConnectedException;
|
||||
import org.jivesoftware.smack.XMPPConnection;
|
||||
import org.jivesoftware.smack.XMPPConnectionRegistry;
|
||||
import org.jivesoftware.smack.XMPPException;
|
||||
import org.jivesoftware.smack.XMPPException.XMPPErrorException;
|
||||
import org.jivesoftware.smack.filter.PacketFilter;
|
||||
import org.jivesoftware.smack.filter.PacketTypeFilter;
|
||||
|
@ -33,18 +47,10 @@ import org.jivesoftware.smackx.commands.packet.AdHocCommandData;
|
|||
import org.jivesoftware.smackx.disco.NodeInformationProvider;
|
||||
import org.jivesoftware.smackx.disco.ServiceDiscoveryManager;
|
||||
import org.jivesoftware.smackx.disco.packet.DiscoverInfo;
|
||||
import org.jivesoftware.smackx.disco.packet.DiscoverItems;
|
||||
import org.jivesoftware.smackx.disco.packet.DiscoverInfo.Identity;
|
||||
import org.jivesoftware.smackx.disco.packet.DiscoverItems;
|
||||
import org.jivesoftware.smackx.xdata.Form;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.WeakHashMap;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
/**
|
||||
* An AdHocCommandManager is responsible for keeping the list of available
|
||||
* commands offered by a service and for processing commands requests.
|
||||
|
|
|
@ -16,6 +16,19 @@
|
|||
*/
|
||||
package org.jivesoftware.smackx.filetransfer;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.Callable;
|
||||
import java.util.concurrent.CompletionService;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.ExecutorCompletionService;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.Future;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import org.jivesoftware.smack.PacketCollector;
|
||||
import org.jivesoftware.smack.SmackException;
|
||||
import org.jivesoftware.smack.SmackException.NoResponseException;
|
||||
|
@ -27,12 +40,6 @@ import org.jivesoftware.smack.filter.PacketFilter;
|
|||
import org.jivesoftware.smack.packet.Packet;
|
||||
import org.jivesoftware.smackx.si.packet.StreamInitiation;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.util.concurrent.*;
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
|
||||
|
||||
/**
|
||||
* The fault tolerant negotiator takes two stream negotiators, the primary and the secondary
|
||||
|
|
|
@ -16,11 +16,21 @@
|
|||
*/
|
||||
package org.jivesoftware.smackx.filetransfer;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.util.concurrent.Callable;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.FutureTask;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.TimeoutException;
|
||||
|
||||
import org.jivesoftware.smack.SmackException;
|
||||
import org.jivesoftware.smack.XMPPException.XMPPErrorException;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.concurrent.*;
|
||||
|
||||
/**
|
||||
* An incoming file transfer is created when the
|
||||
|
|
|
@ -16,14 +16,19 @@
|
|||
*/
|
||||
package org.jivesoftware.smackx.filetransfer;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
|
||||
import org.jivesoftware.smack.SmackException;
|
||||
import org.jivesoftware.smack.SmackException.IllegalStateChangeException;
|
||||
import org.jivesoftware.smack.XMPPException;
|
||||
import org.jivesoftware.smack.XMPPException.XMPPErrorException;
|
||||
import org.jivesoftware.smack.packet.XMPPError;
|
||||
|
||||
import java.io.*;
|
||||
|
||||
/**
|
||||
* Handles the sending of a file to another user. File transfer's in jabber have
|
||||
* several steps and there are several methods in this class that handle these
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
|
||||
package org.jivesoftware.smackx.muc.provider;
|
||||
|
||||
import org.jivesoftware.smack.packet.*;
|
||||
import org.jivesoftware.smack.provider.*;
|
||||
import org.jivesoftware.smack.packet.IQ;
|
||||
import org.jivesoftware.smack.provider.IQProvider;
|
||||
import org.jivesoftware.smack.util.PacketParserUtils;
|
||||
import org.jivesoftware.smackx.muc.packet.MUCOwner;
|
||||
import org.xmlpull.v1.XmlPullParser;
|
||||
|
|
|
@ -16,7 +16,11 @@
|
|||
*/
|
||||
package org.jivesoftware.smackx.privacy.packet;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.jivesoftware.smack.packet.IQ;
|
||||
import org.jivesoftware.smackx.privacy.PrivacyListManager;
|
||||
|
|
|
@ -25,7 +25,7 @@ import java.util.List;
|
|||
*
|
||||
* @author Robin Collier
|
||||
*/
|
||||
public class ItemPublishEvent <T extends Item> extends SubscriptionEvent
|
||||
public class ItemPublishEvent<T extends Item> extends SubscriptionEvent
|
||||
{
|
||||
private List<T> items;
|
||||
private Date originalDate;
|
||||
|
|
|
@ -24,7 +24,7 @@ import java.util.Collection;
|
|||
*
|
||||
* @author Robin Collier
|
||||
*/
|
||||
public class PublishItem <T extends Item> extends NodeExtension
|
||||
public class PublishItem<T extends Item> extends NodeExtension
|
||||
{
|
||||
protected Collection<T> items;
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ import org.jivesoftware.smackx.pubsub.LeafNode;
|
|||
*
|
||||
* @author Robin Collier
|
||||
*/
|
||||
public interface ItemEventListener <T extends Item>
|
||||
public interface ItemEventListener<T extends Item>
|
||||
{
|
||||
/**
|
||||
* Called whenever an item is published to the node the listener
|
||||
|
|
|
@ -46,7 +46,7 @@ public class SubscriptionProvider implements PacketExtensionProvider
|
|||
if ((tag == XmlPullParser.START_TAG) && parser.getName().equals("required"))
|
||||
isRequired = true;
|
||||
|
||||
while (parser.next() != XmlPullParser.END_TAG && parser.getName() != "subscribe-options");
|
||||
while (tag != XmlPullParser.END_TAG && parser.getName() != "subscribe-options") tag = parser.next();
|
||||
}
|
||||
while (parser.getEventType() != XmlPullParser.END_TAG) parser.next();
|
||||
return new Subscription(jid, nodeId, subId, (state == null ? null : Subscription.State.valueOf(state)), isRequired);
|
||||
|
|
|
@ -15,15 +15,15 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
package org.jivesoftware.smackx;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.jivesoftware.smack.util.StringUtils;
|
||||
import org.jivesoftware.smackx.vcardtemp.packet.VCard;
|
||||
import org.jivesoftware.smackx.vcardtemp.provider.VCardProvider;
|
||||
import org.junit.Test;
|
||||
|
||||
public class VCardUnitTest {
|
||||
|
||||
|
|
|
@ -16,14 +16,13 @@
|
|||
*/
|
||||
package org.jivesoftware.smackx.bytestreams.ibb;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
import static org.mockito.Mockito.*;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.verify;
|
||||
|
||||
import org.jivesoftware.smack.XMPPConnection;
|
||||
import org.jivesoftware.smack.packet.IQ;
|
||||
import org.jivesoftware.smack.packet.XMPPError;
|
||||
import org.jivesoftware.smackx.bytestreams.ibb.CloseListener;
|
||||
import org.jivesoftware.smackx.bytestreams.ibb.InBandBytestreamManager;
|
||||
import org.jivesoftware.smackx.bytestreams.ibb.packet.Close;
|
||||
import org.junit.Test;
|
||||
import org.mockito.ArgumentCaptor;
|
||||
|
|
|
@ -16,14 +16,13 @@
|
|||
*/
|
||||
package org.jivesoftware.smackx.bytestreams.ibb;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
import static org.mockito.Mockito.*;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.verify;
|
||||
|
||||
import org.jivesoftware.smack.XMPPConnection;
|
||||
import org.jivesoftware.smack.packet.IQ;
|
||||
import org.jivesoftware.smack.packet.XMPPError;
|
||||
import org.jivesoftware.smackx.bytestreams.ibb.DataListener;
|
||||
import org.jivesoftware.smackx.bytestreams.ibb.InBandBytestreamManager;
|
||||
import org.jivesoftware.smackx.bytestreams.ibb.packet.Data;
|
||||
import org.jivesoftware.smackx.bytestreams.ibb.packet.DataPacketExtension;
|
||||
import org.junit.Test;
|
||||
|
|
|
@ -16,8 +16,11 @@
|
|||
*/
|
||||
package org.jivesoftware.smackx.bytestreams.ibb;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
import static org.mockito.Mockito.*;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertNotSame;
|
||||
import static org.junit.Assert.fail;
|
||||
import static org.mockito.Mockito.mock;
|
||||
|
||||
import org.jivesoftware.smack.SmackException;
|
||||
import org.jivesoftware.smack.XMPPConnection;
|
||||
|
@ -25,8 +28,6 @@ import org.jivesoftware.smack.XMPPException;
|
|||
import org.jivesoftware.smack.XMPPException.XMPPErrorException;
|
||||
import org.jivesoftware.smack.packet.IQ;
|
||||
import org.jivesoftware.smack.packet.XMPPError;
|
||||
import org.jivesoftware.smackx.bytestreams.ibb.InBandBytestreamManager;
|
||||
import org.jivesoftware.smackx.bytestreams.ibb.InBandBytestreamSession;
|
||||
import org.jivesoftware.smackx.bytestreams.ibb.InBandBytestreamManager.StanzaType;
|
||||
import org.jivesoftware.smackx.bytestreams.ibb.packet.Open;
|
||||
import org.jivesoftware.util.ConnectionUtils;
|
||||
|
|
|
@ -16,16 +16,15 @@
|
|||
*/
|
||||
package org.jivesoftware.smackx.bytestreams.ibb;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
import static org.mockito.Mockito.*;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.verify;
|
||||
|
||||
import org.jivesoftware.smack.SmackException.NotConnectedException;
|
||||
import org.jivesoftware.smack.XMPPConnection;
|
||||
import org.jivesoftware.smack.packet.IQ;
|
||||
import org.jivesoftware.smack.packet.XMPPError;
|
||||
import org.jivesoftware.smackx.bytestreams.ibb.InBandBytestreamManager;
|
||||
import org.jivesoftware.smackx.bytestreams.ibb.InBandBytestreamRequest;
|
||||
import org.jivesoftware.smackx.bytestreams.ibb.InBandBytestreamSession;
|
||||
import org.jivesoftware.smackx.bytestreams.ibb.packet.Open;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
|
|
@ -16,22 +16,22 @@
|
|||
*/
|
||||
package org.jivesoftware.smackx.bytestreams.ibb;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.util.Random;
|
||||
|
||||
import org.jivesoftware.smack.PacketListener;
|
||||
import org.jivesoftware.smack.SmackException;
|
||||
import org.jivesoftware.smack.XMPPConnection;
|
||||
import org.jivesoftware.smack.PacketListener;
|
||||
import org.jivesoftware.smack.XMPPException;
|
||||
import org.jivesoftware.smack.packet.IQ;
|
||||
import org.jivesoftware.smack.packet.Message;
|
||||
import org.jivesoftware.smack.util.StringUtils;
|
||||
import org.jivesoftware.smackx.bytestreams.ibb.InBandBytestreamManager;
|
||||
import org.jivesoftware.smackx.bytestreams.ibb.InBandBytestreamSession;
|
||||
import org.jivesoftware.smackx.bytestreams.ibb.InBandBytestreamManager.StanzaType;
|
||||
import org.jivesoftware.smackx.bytestreams.ibb.packet.DataPacketExtension;
|
||||
import org.jivesoftware.smackx.bytestreams.ibb.packet.Open;
|
||||
|
|
|
@ -16,7 +16,9 @@
|
|||
*/
|
||||
package org.jivesoftware.smackx.bytestreams.ibb;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
@ -30,8 +32,6 @@ import org.jivesoftware.smack.XMPPException;
|
|||
import org.jivesoftware.smack.packet.IQ;
|
||||
import org.jivesoftware.smack.packet.XMPPError;
|
||||
import org.jivesoftware.smack.util.StringUtils;
|
||||
import org.jivesoftware.smackx.bytestreams.ibb.InBandBytestreamManager;
|
||||
import org.jivesoftware.smackx.bytestreams.ibb.InBandBytestreamSession;
|
||||
import org.jivesoftware.smackx.bytestreams.ibb.packet.Data;
|
||||
import org.jivesoftware.smackx.bytestreams.ibb.packet.DataPacketExtension;
|
||||
import org.jivesoftware.smackx.bytestreams.ibb.packet.Open;
|
||||
|
|
|
@ -16,16 +16,15 @@
|
|||
*/
|
||||
package org.jivesoftware.smackx.bytestreams.ibb;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
import static org.mockito.Mockito.*;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.never;
|
||||
import static org.mockito.Mockito.verify;
|
||||
|
||||
import org.jivesoftware.smack.XMPPConnection;
|
||||
import org.jivesoftware.smack.packet.IQ;
|
||||
import org.jivesoftware.smack.packet.XMPPError;
|
||||
import org.jivesoftware.smackx.bytestreams.BytestreamRequest;
|
||||
import org.jivesoftware.smackx.bytestreams.ibb.InBandBytestreamListener;
|
||||
import org.jivesoftware.smackx.bytestreams.ibb.InBandBytestreamManager;
|
||||
import org.jivesoftware.smackx.bytestreams.ibb.InitiationListener;
|
||||
import org.jivesoftware.smackx.bytestreams.ibb.packet.Open;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
|
|
@ -23,7 +23,6 @@ import static org.custommonkey.xmlunit.XMLAssert.assertXMLEqual;
|
|||
import java.util.Properties;
|
||||
|
||||
import org.jivesoftware.smack.packet.IQ;
|
||||
import org.jivesoftware.smackx.bytestreams.ibb.packet.Close;
|
||||
import org.junit.Test;
|
||||
|
||||
import com.jamesmurty.utils.XMLBuilder;
|
||||
|
|
|
@ -22,7 +22,6 @@ import static org.junit.Assert.assertNull;
|
|||
|
||||
import java.util.Properties;
|
||||
|
||||
import org.jivesoftware.smackx.bytestreams.ibb.packet.DataPacketExtension;
|
||||
import org.junit.Test;
|
||||
|
||||
import com.jamesmurty.utils.XMLBuilder;
|
||||
|
|
|
@ -18,15 +18,14 @@ package org.jivesoftware.smackx.bytestreams.ibb.packet;
|
|||
|
||||
import static org.custommonkey.xmlunit.XMLAssert.assertXMLEqual;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.mockito.Mockito.*;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
import java.util.Properties;
|
||||
|
||||
import org.jivesoftware.smack.packet.IQ;
|
||||
import org.jivesoftware.smack.util.StringUtils;
|
||||
import org.jivesoftware.smack.util.XmlStringBuilder;
|
||||
import org.jivesoftware.smackx.bytestreams.ibb.packet.Data;
|
||||
import org.jivesoftware.smackx.bytestreams.ibb.packet.DataPacketExtension;
|
||||
import org.junit.Test;
|
||||
|
||||
import com.jamesmurty.utils.XMLBuilder;
|
||||
|
|
|
@ -23,7 +23,6 @@ import java.util.Properties;
|
|||
|
||||
import org.jivesoftware.smack.packet.IQ;
|
||||
import org.jivesoftware.smackx.bytestreams.ibb.InBandBytestreamManager.StanzaType;
|
||||
import org.jivesoftware.smackx.bytestreams.ibb.packet.Open;
|
||||
import org.junit.Test;
|
||||
|
||||
import com.jamesmurty.utils.XMLBuilder;
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*/
|
||||
package org.jivesoftware.smackx.bytestreams.ibb.provider;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.StringReader;
|
||||
|
@ -24,7 +24,6 @@ import java.util.Properties;
|
|||
|
||||
import org.jivesoftware.smackx.bytestreams.ibb.InBandBytestreamManager.StanzaType;
|
||||
import org.jivesoftware.smackx.bytestreams.ibb.packet.Open;
|
||||
import org.jivesoftware.smackx.bytestreams.ibb.provider.OpenIQProvider;
|
||||
import org.junit.Test;
|
||||
import org.xmlpull.v1.XmlPullParserFactory;
|
||||
import org.xmlpull.v1.XmlPullParser;
|
||||
|
|
|
@ -16,16 +16,15 @@
|
|||
*/
|
||||
package org.jivesoftware.smackx.bytestreams.socks5;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
import static org.mockito.Mockito.*;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.never;
|
||||
import static org.mockito.Mockito.verify;
|
||||
|
||||
import org.jivesoftware.smack.XMPPConnection;
|
||||
import org.jivesoftware.smack.packet.IQ;
|
||||
import org.jivesoftware.smack.packet.XMPPError;
|
||||
import org.jivesoftware.smackx.bytestreams.BytestreamRequest;
|
||||
import org.jivesoftware.smackx.bytestreams.socks5.InitiationListener;
|
||||
import org.jivesoftware.smackx.bytestreams.socks5.Socks5BytestreamListener;
|
||||
import org.jivesoftware.smackx.bytestreams.socks5.Socks5BytestreamManager;
|
||||
import org.jivesoftware.smackx.bytestreams.socks5.packet.Bytestream;
|
||||
import org.jivesoftware.smackx.disco.ServiceDiscoveryManager;
|
||||
import org.junit.Before;
|
||||
|
|
|
@ -16,8 +16,13 @@
|
|||
*/
|
||||
package org.jivesoftware.smackx.bytestreams.socks5;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
import static org.mockito.Mockito.*;
|
||||
import static org.junit.Assert.assertArrayEquals;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertNotSame;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.fail;
|
||||
import static org.mockito.Mockito.mock;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
@ -32,10 +37,6 @@ import org.jivesoftware.smack.XMPPException.XMPPErrorException;
|
|||
import org.jivesoftware.smack.packet.IQ;
|
||||
import org.jivesoftware.smack.packet.XMPPError;
|
||||
import org.jivesoftware.smack.packet.IQ.Type;
|
||||
import org.jivesoftware.smackx.bytestreams.socks5.Socks5BytestreamManager;
|
||||
import org.jivesoftware.smackx.bytestreams.socks5.Socks5Client;
|
||||
import org.jivesoftware.smackx.bytestreams.socks5.Socks5Proxy;
|
||||
import org.jivesoftware.smackx.bytestreams.socks5.Socks5Utils;
|
||||
import org.jivesoftware.smackx.bytestreams.socks5.packet.Bytestream;
|
||||
import org.jivesoftware.smackx.bytestreams.socks5.packet.Bytestream.StreamHost;
|
||||
import org.jivesoftware.smackx.disco.ServiceDiscoveryManager;
|
||||
|
|
|
@ -16,7 +16,11 @@
|
|||
*/
|
||||
package org.jivesoftware.smackx.bytestreams.socks5;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
import static org.junit.Assert.assertArrayEquals;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
|
@ -30,9 +34,6 @@ import org.jivesoftware.smack.XMPPException.XMPPErrorException;
|
|||
import org.jivesoftware.smack.packet.IQ;
|
||||
import org.jivesoftware.smack.packet.Packet;
|
||||
import org.jivesoftware.smack.packet.XMPPError;
|
||||
import org.jivesoftware.smackx.bytestreams.socks5.Socks5BytestreamManager;
|
||||
import org.jivesoftware.smackx.bytestreams.socks5.Socks5BytestreamRequest;
|
||||
import org.jivesoftware.smackx.bytestreams.socks5.Socks5Utils;
|
||||
import org.jivesoftware.smackx.bytestreams.socks5.packet.Bytestream;
|
||||
import org.jivesoftware.util.ConnectionUtils;
|
||||
import org.jivesoftware.util.Protocol;
|
||||
|
|
|
@ -16,7 +16,11 @@
|
|||
*/
|
||||
package org.jivesoftware.smackx.bytestreams.socks5;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
|
@ -29,10 +33,6 @@ import org.jivesoftware.smack.XMPPException.XMPPErrorException;
|
|||
import org.jivesoftware.smack.packet.IQ;
|
||||
import org.jivesoftware.smack.packet.XMPPError;
|
||||
import org.jivesoftware.smack.packet.IQ.Type;
|
||||
import org.jivesoftware.smackx.bytestreams.socks5.Socks5Client;
|
||||
import org.jivesoftware.smackx.bytestreams.socks5.Socks5ClientForInitiator;
|
||||
import org.jivesoftware.smackx.bytestreams.socks5.Socks5Proxy;
|
||||
import org.jivesoftware.smackx.bytestreams.socks5.Socks5Utils;
|
||||
import org.jivesoftware.smackx.bytestreams.socks5.packet.Bytestream;
|
||||
import org.jivesoftware.smackx.bytestreams.socks5.packet.Bytestream.StreamHost;
|
||||
import org.jivesoftware.util.ConnectionUtils;
|
||||
|
|
|
@ -16,7 +16,11 @@
|
|||
*/
|
||||
package org.jivesoftware.smackx.bytestreams.socks5;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
|
@ -24,8 +28,6 @@ import java.net.ServerSocket;
|
|||
import java.net.Socket;
|
||||
|
||||
import org.jivesoftware.smack.SmackException;
|
||||
import org.jivesoftware.smackx.bytestreams.socks5.Socks5Client;
|
||||
import org.jivesoftware.smackx.bytestreams.socks5.Socks5Utils;
|
||||
import org.jivesoftware.smackx.bytestreams.socks5.packet.Bytestream.StreamHost;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
|
|
|
@ -28,7 +28,6 @@ import java.util.Map;
|
|||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import org.jivesoftware.smack.SmackException;
|
||||
import org.jivesoftware.smackx.bytestreams.socks5.Socks5Utils;
|
||||
|
||||
/**
|
||||
* Simple SOCKS5 proxy for testing purposes. It is almost the same as the Socks5Proxy class but the
|
||||
|
|
|
@ -30,7 +30,6 @@ import org.jivesoftware.smack.util.Base32Encoder;
|
|||
import org.jivesoftware.smack.util.Base64FileUrlEncoder;
|
||||
import org.jivesoftware.smack.util.StringEncoder;
|
||||
import org.jivesoftware.smackx.InitExtensions;
|
||||
import org.jivesoftware.smackx.caps.EntityCapsManager;
|
||||
import org.jivesoftware.smackx.caps.cache.EntityCapsPersistentCache;
|
||||
import org.jivesoftware.smackx.caps.cache.SimpleDirectoryPersistentCache;
|
||||
import org.jivesoftware.smackx.disco.packet.DiscoverInfo;
|
||||
|
|
|
@ -33,7 +33,6 @@ import org.jxmpp.util.XmppDateTime;
|
|||
import org.jivesoftware.smackx.InitExtensions;
|
||||
import org.jivesoftware.smackx.delay.DelayInformationManager;
|
||||
import org.jivesoftware.smackx.delay.packet.DelayInformation;
|
||||
import org.jivesoftware.smackx.delay.provider.DelayInformationProvider;
|
||||
import org.junit.Test;
|
||||
import org.xmlpull.v1.XmlPullParser;
|
||||
|
||||
|
|
|
@ -16,12 +16,11 @@
|
|||
*/
|
||||
package org.jivesoftware.smackx.forward;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import java.util.Properties;
|
||||
|
||||
import org.jivesoftware.smack.util.PacketParserUtils;
|
||||
import org.jivesoftware.smackx.forward.Forwarded;
|
||||
import org.jivesoftware.smackx.forward.provider.ForwardedProvider;
|
||||
import org.junit.Test;
|
||||
import org.xmlpull.v1.XmlPullParser;
|
||||
|
|
|
@ -45,7 +45,7 @@ public class LastActivityTest extends InitExtensions {
|
|||
IQ lastRequest = (IQ) PacketParserUtils.parseStanza(xml.asString());
|
||||
assertTrue(lastRequest instanceof LastActivity);
|
||||
|
||||
c.processPacket(lastRequest);;
|
||||
c.processPacket(lastRequest);
|
||||
Packet reply = c.getSentPacket();
|
||||
assertTrue(reply instanceof LastActivity);
|
||||
LastActivity l = (LastActivity) reply;
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
package org.jivesoftware.smackx.muc;
|
||||
|
||||
import org.jivesoftware.smackx.disco.packet.DiscoverInfo;
|
||||
import org.jivesoftware.smackx.muc.RoomInfo;
|
||||
import org.jivesoftware.smackx.xdata.FormField;
|
||||
import org.jivesoftware.smackx.xdata.packet.DataForm;
|
||||
|
||||
|
|
|
@ -16,8 +16,12 @@
|
|||
*/
|
||||
package org.jivesoftware.util;
|
||||
|
||||
import static org.mockito.Matchers.*;
|
||||
import static org.mockito.Mockito.*;
|
||||
import static org.mockito.Matchers.anyInt;
|
||||
import static org.mockito.Matchers.anyLong;
|
||||
import static org.mockito.Matchers.isA;
|
||||
import static org.mockito.Mockito.doAnswer;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
import org.jivesoftware.smack.PacketCollector;
|
||||
import org.jivesoftware.smack.SmackException;
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*/
|
||||
package org.jivesoftware.util;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import java.io.StringReader;
|
||||
import java.io.StringWriter;
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*/
|
||||
package org.jivesoftware.util;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import org.jivesoftware.smack.packet.IQ;
|
||||
import org.jivesoftware.smack.packet.Packet;
|
||||
|
|
|
@ -78,7 +78,7 @@ public class AudioChannel {
|
|||
private Format format;
|
||||
|
||||
private Processor processor = null;
|
||||
private RTPManager rtpMgrs[];
|
||||
private RTPManager[] rtpMgrs;
|
||||
private DataSource dataOutput = null;
|
||||
private AudioReceiver audioReceiver;
|
||||
|
||||
|
@ -230,7 +230,7 @@ public class AudioChannel {
|
|||
ContentDescriptor cd = new ContentDescriptor(ContentDescriptor.RAW_RTP);
|
||||
processor.setContentDescriptor(cd);
|
||||
|
||||
Format supported[];
|
||||
Format[] supported;
|
||||
Format chosen = null;
|
||||
boolean atLeastOneTrack = false;
|
||||
|
||||
|
@ -265,7 +265,7 @@ public class AudioChannel {
|
|||
}
|
||||
|
||||
if (tracks[i].getFormat().getEncoding().equals(AudioFormat.ULAW_RTP)) {
|
||||
Codec codec[] = new Codec[3];
|
||||
Codec[] codec = new Codec[3];
|
||||
|
||||
codec[0] = new com.ibm.media.codec.audio.rc.RCModule();
|
||||
codec[1] = new com.ibm.media.codec.audio.ulaw.JavaEncoder();
|
||||
|
@ -339,7 +339,7 @@ public class AudioChannel {
|
|||
|
||||
// Cheated. Should have checked the type.
|
||||
PushBufferDataSource pbds = (PushBufferDataSource) dataOutput;
|
||||
PushBufferStream pbss[] = pbds.getStreams();
|
||||
PushBufferStream[] pbss = pbds.getStreams();
|
||||
|
||||
rtpMgrs = new RTPManager[pbss.length];
|
||||
SessionAddress localAddr, destAddr;
|
||||
|
@ -498,7 +498,7 @@ public class AudioChannel {
|
|||
}
|
||||
}
|
||||
|
||||
public static void main(String args[]) {
|
||||
public static void main(String[] args) {
|
||||
|
||||
InetAddress localhost;
|
||||
try {
|
||||
|
|
|
@ -16,7 +16,8 @@
|
|||
*/
|
||||
package org.jivesoftware.smackx.jingle.mediaimpl.sshare.api;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.Rectangle;
|
||||
import java.awt.RenderingHints;
|
||||
import java.awt.geom.Point2D;
|
||||
import java.awt.geom.Rectangle2D;
|
||||
import java.awt.image.BufferedImage;
|
||||
|
|
|
@ -16,7 +16,8 @@
|
|||
*/
|
||||
package org.jivesoftware.smackx.jingle.mediaimpl.sshare.api;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.Canvas;
|
||||
import java.awt.Graphics;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.IOException;
|
||||
|
@ -36,7 +37,7 @@ public class ImageReceiver extends Canvas {
|
|||
private static final long serialVersionUID = -7000112305305269025L;
|
||||
private boolean on = true;
|
||||
private DatagramSocket socket;
|
||||
private BufferedImage tiles[][];
|
||||
private BufferedImage[][] tiles;
|
||||
private static final int tileWidth = ImageTransmitter.tileWidth;
|
||||
private InetAddress localHost;
|
||||
private InetAddress remoteHost;
|
||||
|
@ -58,7 +59,7 @@ public class ImageReceiver extends Canvas {
|
|||
|
||||
new Thread(new Runnable() {
|
||||
public void run() {
|
||||
byte buf[] = new byte[1024];
|
||||
byte[] buf = new byte[1024];
|
||||
DatagramPacket p = new DatagramPacket(buf, 1024);
|
||||
try {
|
||||
while (on) {
|
||||
|
@ -87,7 +88,7 @@ public class ImageReceiver extends Canvas {
|
|||
|
||||
new Thread(new Runnable() {
|
||||
public void run() {
|
||||
byte buf[] = new byte[1024];
|
||||
byte[] buf = new byte[1024];
|
||||
DatagramPacket p = new DatagramPacket(buf, 1024);
|
||||
try {
|
||||
while (on) {
|
||||
|
|
|
@ -49,7 +49,7 @@ public class ImageTransmitter implements Runnable {
|
|||
private boolean transmit = false;
|
||||
private DatagramSocket socket;
|
||||
private Rectangle area;
|
||||
private int tiles[][][];
|
||||
private int[][][] tiles;
|
||||
private int maxI;
|
||||
private int maxJ;
|
||||
private ImageEncoder encoder;
|
||||
|
@ -83,7 +83,7 @@ public class ImageTransmitter implements Runnable {
|
|||
}
|
||||
|
||||
public void start() {
|
||||
byte buf[] = new byte[1024];
|
||||
byte[] buf = new byte[1024];
|
||||
final DatagramPacket p = new DatagramPacket(buf, 1024);
|
||||
|
||||
int keyframe = 0;
|
||||
|
@ -108,7 +108,7 @@ public class ImageTransmitter implements Runnable {
|
|||
|
||||
final BufferedImage bufferedImage = capture.getSubimage(i * tileWidth, j * tileWidth, tileWidth, tileWidth);
|
||||
|
||||
int pixels[] = new int[tileWidth * tileWidth];
|
||||
int[] pixels = new int[tileWidth * tileWidth];
|
||||
|
||||
PixelGrabber pg = new PixelGrabber(bufferedImage, 0, 0, tileWidth, tileWidth, pixels, 0, tileWidth);
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ public class OctTreeQuantizer implements Quantizer {
|
|||
int children;
|
||||
int level;
|
||||
OctTreeNode parent;
|
||||
OctTreeNode leaf[] = new OctTreeNode[8];
|
||||
OctTreeNode[] leaf = new OctTreeNode[8];
|
||||
boolean isLeaf;
|
||||
int count;
|
||||
int totalRed;
|
||||
|
|
|
@ -16,9 +16,10 @@
|
|||
*/
|
||||
package org.jivesoftware.smackx.jingle.mediaimpl.sshare.api;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.Color;
|
||||
import java.util.Random;
|
||||
|
||||
|
||||
/**
|
||||
* Some more useful math functions for image processing.
|
||||
* These are becoming obsolete as we move to Java2D. Use MiscComposite instead.
|
||||
|
@ -81,8 +82,8 @@ public class PixelUtils {
|
|||
return Math.abs(r1-r2) <= tolerance && Math.abs(g1-g2) <= tolerance && Math.abs(b1-b2) <= tolerance;
|
||||
}
|
||||
|
||||
private final static float hsb1[] = new float[3];//FIXME-not thread safe
|
||||
private final static float hsb2[] = new float[3];//FIXME-not thread safe
|
||||
private final static float[] hsb1 = new float[3];//FIXME-not thread safe
|
||||
private final static float[] hsb2 = new float[3];//FIXME-not thread safe
|
||||
|
||||
// Return rgb1 painted onto rgb2
|
||||
public static int combinePixels(int rgb1, int rgb2, int op) {
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*/
|
||||
package org.jivesoftware.smackx.jingle.mediaimpl.sshare.api;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.Rectangle;
|
||||
|
||||
/**
|
||||
* A filter which quantizes an image to a set number of colors - useful for producing
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*/
|
||||
package org.jivesoftware.smackx.jingle.mediaimpl.sshare.api;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.Rectangle;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.awt.image.ColorModel;
|
||||
import java.awt.image.WritableRaster;
|
||||
|
|
|
@ -16,14 +16,15 @@
|
|||
*/
|
||||
package org.jivesoftware.smackx.jingle.mediaimpl.test;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.jivesoftware.smackx.jingle.JingleSession;
|
||||
import org.jivesoftware.smackx.jingle.media.JingleMediaManager;
|
||||
import org.jivesoftware.smackx.jingle.media.JingleMediaSession;
|
||||
import org.jivesoftware.smackx.jingle.media.PayloadType;
|
||||
import org.jivesoftware.smackx.jingle.nat.JingleTransportManager;
|
||||
import org.jivesoftware.smackx.jingle.nat.TransportCandidate;
|
||||
import org.jivesoftware.smackx.jingle.JingleSession;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* Implements a MediaManager for test purposes.
|
||||
|
|
|
@ -69,7 +69,7 @@ public class HttpServer {
|
|||
|
||||
}
|
||||
|
||||
public static void main(String args[]) {
|
||||
public static void main(String[] args) {
|
||||
HttpServer httpServer = new HttpServer(Integer.parseInt(args[0]));
|
||||
}
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@ public class TcpUdpBridgeClient {
|
|||
|
||||
while (true) {
|
||||
|
||||
byte b[] = new byte[500];
|
||||
byte[] b = new byte[500];
|
||||
DatagramPacket p = new DatagramPacket(b, 500);
|
||||
|
||||
localUdpSocket.receive(p);
|
||||
|
@ -104,7 +104,7 @@ public class TcpUdpBridgeClient {
|
|||
process.start();
|
||||
|
||||
while (true) {
|
||||
byte b[] = new byte[500];
|
||||
byte[] b = new byte[500];
|
||||
|
||||
int s = in.read(b);
|
||||
//if (s == -1) continue;
|
||||
|
|
|
@ -74,7 +74,7 @@ public class TcpUdpBridgeServer {
|
|||
|
||||
while (true) {
|
||||
|
||||
byte b[] = new byte[500];
|
||||
byte[] b = new byte[500];
|
||||
DatagramPacket p = new DatagramPacket(b, 500);
|
||||
|
||||
localUdpSocket.receive(p);
|
||||
|
@ -106,7 +106,7 @@ public class TcpUdpBridgeServer {
|
|||
InetAddress remoteHost = InetAddress.getByName(remoteUdpHost);
|
||||
|
||||
while (true) {
|
||||
byte b[] = new byte[500];
|
||||
byte[] b = new byte[500];
|
||||
|
||||
int s = in.read(b);
|
||||
//if (s == -1) continue;
|
||||
|
|
|
@ -611,8 +611,8 @@ public abstract class TransportCandidate {
|
|||
String localUser = null;
|
||||
String remoteUser = null;
|
||||
String id = null;
|
||||
byte send[] = null;
|
||||
byte receive[] = null;
|
||||
byte[] send = null;
|
||||
byte[] receive = null;
|
||||
DatagramPacket sendPacket = null;
|
||||
List<DatagramListener> listeners = new ArrayList<DatagramListener>();
|
||||
List<ResultListener> resultListeners = new ArrayList<ResultListener>();
|
||||
|
@ -677,9 +677,9 @@ public abstract class TransportCandidate {
|
|||
|
||||
long delay = 100 / replyTries;
|
||||
|
||||
String str[] = new String(packet.getData(), "UTF-8").split(";");
|
||||
String[] str = new String(packet.getData(), "UTF-8").split(";");
|
||||
String pass = str[0];
|
||||
String address[] = str[1].split(":");
|
||||
String[] address = str[1].split(":");
|
||||
String ip = address[0];
|
||||
String port = address[1];
|
||||
|
||||
|
@ -750,9 +750,9 @@ public abstract class TransportCandidate {
|
|||
|
||||
try {
|
||||
LOGGER.fine("ECHO Received to: " + candidate.getIp() + ":" + candidate.getPort() + " data: " + new String(datagramPacket.getData(), "UTF-8"));
|
||||
String str[] = new String(datagramPacket.getData(), "UTF-8").split(";");
|
||||
String[] str = new String(datagramPacket.getData(), "UTF-8").split(";");
|
||||
String pass = str[0];
|
||||
String addr[] = str[1].split(":");
|
||||
String[] addr = str[1].split(":");
|
||||
String ip = addr[0];
|
||||
String pt = addr[1];
|
||||
|
||||
|
|
|
@ -21,7 +21,11 @@ import org.jivesoftware.smack.SmackException;
|
|||
import org.jivesoftware.smack.packet.IQ;
|
||||
import org.jivesoftware.smack.provider.IQProvider;
|
||||
import org.jivesoftware.smackx.jingle.JingleActionEnum;
|
||||
import org.jivesoftware.smackx.jingle.packet.*;
|
||||
import org.jivesoftware.smackx.jingle.packet.Jingle;
|
||||
import org.jivesoftware.smackx.jingle.packet.JingleContent;
|
||||
import org.jivesoftware.smackx.jingle.packet.JingleContentInfo;
|
||||
import org.jivesoftware.smackx.jingle.packet.JingleDescription;
|
||||
import org.jivesoftware.smackx.jingle.packet.JingleTransport;
|
||||
import org.xmlpull.v1.XmlPullParser;
|
||||
|
||||
/**
|
||||
|
|
|
@ -18,6 +18,34 @@
|
|||
package org.jivesoftware.smackx.workgroup.agent;
|
||||
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.jivesoftware.smack.PacketCollector;
|
||||
import org.jivesoftware.smack.PacketListener;
|
||||
import org.jivesoftware.smack.SmackException;
|
||||
import org.jivesoftware.smack.SmackException.NoResponseException;
|
||||
import org.jivesoftware.smack.SmackException.NotConnectedException;
|
||||
import org.jivesoftware.smack.XMPPConnection;
|
||||
import org.jivesoftware.smack.XMPPException;
|
||||
import org.jivesoftware.smack.XMPPException.XMPPErrorException;
|
||||
import org.jivesoftware.smack.filter.AndFilter;
|
||||
import org.jivesoftware.smack.filter.FromMatchesFilter;
|
||||
import org.jivesoftware.smack.filter.OrFilter;
|
||||
import org.jivesoftware.smack.filter.PacketTypeFilter;
|
||||
import org.jivesoftware.smack.packet.DefaultPacketExtension;
|
||||
import org.jivesoftware.smack.packet.IQ;
|
||||
import org.jivesoftware.smack.packet.Message;
|
||||
import org.jivesoftware.smack.packet.Packet;
|
||||
import org.jivesoftware.smack.packet.Presence;
|
||||
import org.jivesoftware.smackx.muc.packet.MUCUser;
|
||||
import org.jivesoftware.smackx.search.ReportedData;
|
||||
import org.jivesoftware.smackx.workgroup.MetaData;
|
||||
|
@ -29,22 +57,24 @@ import org.jivesoftware.smackx.workgroup.ext.history.ChatMetadata;
|
|||
import org.jivesoftware.smackx.workgroup.ext.macros.MacroGroup;
|
||||
import org.jivesoftware.smackx.workgroup.ext.macros.Macros;
|
||||
import org.jivesoftware.smackx.workgroup.ext.notes.ChatNotes;
|
||||
import org.jivesoftware.smackx.workgroup.packet.*;
|
||||
import org.jivesoftware.smackx.workgroup.packet.AgentStatus;
|
||||
import org.jivesoftware.smackx.workgroup.packet.DepartQueuePacket;
|
||||
import org.jivesoftware.smackx.workgroup.packet.MonitorPacket;
|
||||
import org.jivesoftware.smackx.workgroup.packet.OccupantsInfo;
|
||||
import org.jivesoftware.smackx.workgroup.packet.OfferRequestProvider;
|
||||
import org.jivesoftware.smackx.workgroup.packet.OfferRevokeProvider;
|
||||
import org.jivesoftware.smackx.workgroup.packet.QueueDetails;
|
||||
import org.jivesoftware.smackx.workgroup.packet.QueueOverview;
|
||||
import org.jivesoftware.smackx.workgroup.packet.RoomInvitation;
|
||||
import org.jivesoftware.smackx.workgroup.packet.RoomTransfer;
|
||||
import org.jivesoftware.smackx.workgroup.packet.SessionID;
|
||||
import org.jivesoftware.smackx.workgroup.packet.Transcript;
|
||||
import org.jivesoftware.smackx.workgroup.packet.Transcripts;
|
||||
import org.jivesoftware.smackx.workgroup.settings.GenericSettings;
|
||||
import org.jivesoftware.smackx.workgroup.settings.SearchSettings;
|
||||
import org.jivesoftware.smackx.xdata.Form;
|
||||
import org.jivesoftware.smack.*;
|
||||
import org.jivesoftware.smack.SmackException.NoResponseException;
|
||||
import org.jivesoftware.smack.SmackException.NotConnectedException;
|
||||
import org.jivesoftware.smack.XMPPException.XMPPErrorException;
|
||||
import org.jivesoftware.smack.filter.*;
|
||||
import org.jivesoftware.smack.packet.*;
|
||||
import org.jxmpp.util.XmppStringUtils;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
/**
|
||||
* This class embodies the agent's active presence within a given workgroup. The application
|
||||
* should have N instances of this class, where N is the number of workgroups to which the
|
||||
|
|
|
@ -17,7 +17,12 @@
|
|||
|
||||
package org.jivesoftware.smackx.workgroup.agent;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.Locale;
|
||||
import java.util.Set;
|
||||
|
||||
import org.jivesoftware.smackx.workgroup.QueueUser;
|
||||
|
||||
|
|
|
@ -16,14 +16,19 @@
|
|||
*/
|
||||
package org.jivesoftware.smackx.workgroup.packet;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.TimeZone;
|
||||
|
||||
import org.jivesoftware.smack.packet.PacketExtension;
|
||||
import org.jivesoftware.smack.provider.PacketExtensionProvider;
|
||||
import org.xmlpull.v1.XmlPullParser;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* Agent status packet.
|
||||
*
|
||||
|
|
|
@ -17,13 +17,17 @@
|
|||
|
||||
package org.jivesoftware.smackx.workgroup.packet;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.TimeZone;
|
||||
|
||||
import org.jivesoftware.smack.packet.IQ;
|
||||
import org.jivesoftware.smack.provider.IQProvider;
|
||||
import org.xmlpull.v1.XmlPullParser;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* Packet used for requesting information about occupants of a room or for retrieving information
|
||||
* such information.
|
||||
|
|
|
@ -17,10 +17,14 @@
|
|||
|
||||
package org.jivesoftware.smackx.workgroup.packet;
|
||||
|
||||
import org.jivesoftware.smack.packet.IQ;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.TimeZone;
|
||||
|
||||
import org.jivesoftware.smack.packet.IQ;
|
||||
|
||||
/**
|
||||
* Represents a list of conversation transcripts that a user had in all his history. Each
|
||||
|
|
|
@ -16,6 +16,32 @@
|
|||
*/
|
||||
package org.jivesoftware.smackx.workgroup.user;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.jivesoftware.smack.PacketCollector;
|
||||
import org.jivesoftware.smack.PacketListener;
|
||||
import org.jivesoftware.smack.SmackException;
|
||||
import org.jivesoftware.smack.SmackException.NoResponseException;
|
||||
import org.jivesoftware.smack.SmackException.NotConnectedException;
|
||||
import org.jivesoftware.smack.XMPPConnection;
|
||||
import org.jivesoftware.smack.XMPPException;
|
||||
import org.jivesoftware.smack.XMPPException.XMPPErrorException;
|
||||
import org.jivesoftware.smack.filter.AndFilter;
|
||||
import org.jivesoftware.smack.filter.FromMatchesFilter;
|
||||
import org.jivesoftware.smack.filter.PacketFilter;
|
||||
import org.jivesoftware.smack.filter.PacketTypeFilter;
|
||||
import org.jivesoftware.smack.packet.IQ;
|
||||
import org.jivesoftware.smack.packet.Message;
|
||||
import org.jivesoftware.smack.packet.Packet;
|
||||
import org.jivesoftware.smack.packet.PacketExtension;
|
||||
import org.jivesoftware.smack.packet.Presence;
|
||||
import org.jivesoftware.smackx.disco.ServiceDiscoveryManager;
|
||||
import org.jivesoftware.smackx.disco.packet.DiscoverInfo;
|
||||
import org.jivesoftware.smackx.muc.MultiUserChat;
|
||||
import org.jivesoftware.smackx.muc.packet.MUCUser;
|
||||
import org.jivesoftware.smackx.workgroup.MetaData;
|
||||
import org.jivesoftware.smackx.workgroup.WorkgroupInvitation;
|
||||
import org.jivesoftware.smackx.workgroup.WorkgroupInvitationListener;
|
||||
|
@ -24,27 +50,16 @@ import org.jivesoftware.smackx.workgroup.packet.DepartQueuePacket;
|
|||
import org.jivesoftware.smackx.workgroup.packet.QueueUpdate;
|
||||
import org.jivesoftware.smackx.workgroup.packet.SessionID;
|
||||
import org.jivesoftware.smackx.workgroup.packet.UserID;
|
||||
import org.jivesoftware.smackx.workgroup.settings.*;
|
||||
import org.jivesoftware.smackx.workgroup.settings.ChatSetting;
|
||||
import org.jivesoftware.smackx.workgroup.settings.ChatSettings;
|
||||
import org.jivesoftware.smackx.workgroup.settings.OfflineSettings;
|
||||
import org.jivesoftware.smackx.workgroup.settings.SoundSettings;
|
||||
import org.jivesoftware.smackx.workgroup.settings.WorkgroupProperties;
|
||||
import org.jivesoftware.smackx.xdata.Form;
|
||||
import org.jivesoftware.smackx.xdata.FormField;
|
||||
import org.jivesoftware.smackx.xdata.packet.DataForm;
|
||||
import org.jivesoftware.smack.*;
|
||||
import org.jivesoftware.smack.SmackException.NoResponseException;
|
||||
import org.jivesoftware.smack.SmackException.NotConnectedException;
|
||||
import org.jivesoftware.smack.XMPPException.XMPPErrorException;
|
||||
import org.jivesoftware.smack.filter.*;
|
||||
import org.jivesoftware.smack.packet.*;
|
||||
import org.jivesoftware.smackx.disco.ServiceDiscoveryManager;
|
||||
import org.jivesoftware.smackx.disco.packet.DiscoverInfo;
|
||||
import org.jivesoftware.smackx.muc.MultiUserChat;
|
||||
import org.jivesoftware.smackx.muc.packet.MUCUser;
|
||||
import org.jxmpp.util.XmppStringUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Provides workgroup services for users. Users can join the workgroup queue, depart the
|
||||
* queue, find status information about their placement in the queue, and register to
|
||||
|
|
|
@ -16,14 +16,19 @@
|
|||
*/
|
||||
package org.jivesoftware.smackx.workgroup.util;
|
||||
|
||||
import org.jivesoftware.smackx.workgroup.MetaData;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Hashtable;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.jivesoftware.smack.util.StringUtils;
|
||||
import org.jivesoftware.smackx.workgroup.MetaData;
|
||||
import org.xmlpull.v1.XmlPullParser;
|
||||
import org.xmlpull.v1.XmlPullParserException;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* Utility class for meta-data parsing and writing.
|
||||
*
|
||||
|
|
|
@ -16,7 +16,10 @@
|
|||
*/
|
||||
package org.jivesoftware.smackx.workgroup.util;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.ListIterator;
|
||||
|
||||
/**
|
||||
* Utility methods frequently used by data classes and design-time
|
||||
|
|
|
@ -17,7 +17,11 @@
|
|||
|
||||
package org.jivesoftware.smackx.xroster;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Represents a roster item, which consists of a JID and , their name and
|
||||
|
|
|
@ -45,7 +45,7 @@ public class DNSJavaResolver extends SmackAndOsgiInitializer implements DNSResol
|
|||
List<SRVRecord> res = new ArrayList<SRVRecord>();
|
||||
|
||||
Lookup lookup = new Lookup(name, Type.SRV);
|
||||
Record recs[] = lookup.run();
|
||||
Record[] recs = lookup.run();
|
||||
if (recs == null)
|
||||
return res;
|
||||
|
||||
|
|
|
@ -19,7 +19,6 @@ package org.jivesoftware.smack.sasl.provided;
|
|||
import org.jivesoftware.smack.SmackException;
|
||||
import org.jivesoftware.smack.SmackException.NotConnectedException;
|
||||
import org.jivesoftware.smack.sasl.DigestMd5SaslTest;
|
||||
import org.jivesoftware.smack.sasl.provided.SASLDigestMD5Mechanism;
|
||||
import org.junit.Test;
|
||||
|
||||
public class SASLDigestMD5Test extends DigestMd5SaslTest {
|
||||
|
|
|
@ -16,7 +16,8 @@
|
|||
*/
|
||||
package org.jivesoftware.smack.tcp;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
|
||||
import org.jivesoftware.smack.Roster;
|
||||
import org.jivesoftware.smack.SmackException;
|
||||
|
|
Loading…
Reference in a new issue