diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/jingle_filetransfer/JingleFileTransferManager.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/jingle_filetransfer/JingleFileTransferManager.java index a0d845ffa..da289cce9 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/jingle_filetransfer/JingleFileTransferManager.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/jingle_filetransfer/JingleFileTransferManager.java @@ -168,7 +168,7 @@ public final class JingleFileTransferManager extends Manager implements JingleDe } public void notifyIncomingFileOfferListeners(JingleIncomingFileOffer offer) { - LOGGER.log(Level.INFO, "Incoming File transfer: [" + offer.getNamespace() + ", " + LOGGER.log(Level.FINE, "Incoming File transfer: [" + offer.getNamespace() + ", " + offer.getParent().getTransport().getNamespace() + ", " + (offer.getParent().getSecurity() != null ? offer.getParent().getSecurity().getNamespace() : "") + "]"); for (IncomingFileOfferListener l : offerListeners) { diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/jingle_filetransfer/component/JingleFileTransfer.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/jingle_filetransfer/component/JingleFileTransfer.java index 0497ec084..817ffe257 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/jingle_filetransfer/component/JingleFileTransfer.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/jingle_filetransfer/component/JingleFileTransfer.java @@ -19,14 +19,10 @@ package org.jivesoftware.smackx.jingle_filetransfer.component; import java.util.ArrayList; import java.util.Collections; import java.util.List; -import java.util.logging.Level; -import java.util.logging.Logger; import org.jivesoftware.smack.SmackException; import org.jivesoftware.smack.XMPPConnection; import org.jivesoftware.smackx.jingle.component.JingleDescription; -import org.jivesoftware.smackx.jingle.component.JingleSession; -import org.jivesoftware.smackx.jingle.element.JingleElement; import org.jivesoftware.smackx.jingle.element.JingleReasonElement; import org.jivesoftware.smackx.jingle_filetransfer.controller.JingleFileTransferController; import org.jivesoftware.smackx.jingle_filetransfer.element.JingleFileTransferElement; @@ -37,8 +33,6 @@ import org.jivesoftware.smackx.jingle_filetransfer.listener.ProgressListener; */ public abstract class JingleFileTransfer extends JingleDescription implements JingleFileTransferController { - private static final Logger LOGGER = Logger.getLogger(JingleFileTransfer.class.getName()); - public static final String NAMESPACE_V5 = "urn:xmpp:jingle:apps:file-transfer:5"; public static final String NAMESPACE = NAMESPACE_V5; @@ -81,25 +75,6 @@ public abstract class JingleFileTransfer extends JingleDescription { - private static HashElementProvider hashProvider = new HashElementProvider(); + private static final HashElementProvider hashProvider = new HashElementProvider(); @Override public ChecksumElement parse(XmlPullParser parser, int initialDepth) throws Exception { diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/jingle_filetransfer/provider/JingleFileTransferProvider.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/jingle_filetransfer/provider/JingleFileTransferProvider.java index 8db762b7b..1076b8d38 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/jingle_filetransfer/provider/JingleFileTransferProvider.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/jingle_filetransfer/provider/JingleFileTransferProvider.java @@ -31,6 +31,7 @@ import org.jivesoftware.smackx.jingle_filetransfer.element.JingleFileTransferChi import org.jivesoftware.smackx.jingle_filetransfer.element.JingleFileTransferElement; import org.jivesoftware.smackx.jingle_filetransfer.element.Range; +import org.jxmpp.util.XmppDateTime; import org.xmlpull.v1.XmlPullParser; /** @@ -54,8 +55,7 @@ public class JingleFileTransferProvider if (tag == START_TAG) { switch (elem) { case JingleFileTransferChildElement.ELEM_DATE: - //builder.setDate(XmppDateTime.parseXEP0082Date(parser.nextText())); - parser.nextText(); + builder.setDate(XmppDateTime.parseXEP0082Date(parser.nextText())); break; case JingleFileTransferChildElement.ELEM_DESC: diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/jingle/JingleManager.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/jingle/JingleManager.java index 1fca5b636..6f2416989 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/jingle/JingleManager.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/jingle/JingleManager.java @@ -136,7 +136,7 @@ public final class JingleManager extends Manager { if (jingle.getAction() == JingleAction.session_initiate) { //fresh. phew! try { - LOGGER.log(Level.INFO, "Create new session with " + jingle.getFrom() + ": " + jingle.getSid()); + LOGGER.log(Level.FINE, "Create new session with " + jingle.getFrom() + ": " + jingle.getSid()); session = JingleSession.fromSessionInitiate(JingleManager.this, jingle); jingleSessions.put(fullJidAndSessionId, session); } catch (UnsupportedDescriptionException e) { @@ -306,7 +306,7 @@ public final class JingleManager extends Manager { /** * Add a {@link JingleDescriptionManager}. - * @param manager + * @param manager manager */ public void addJingleDescriptionManager(JingleDescriptionManager manager) { descriptionManagers.put(manager.getNamespace(), manager); @@ -323,7 +323,7 @@ public final class JingleManager extends Manager { /** * Add a {@link JingleTransportManager}. - * @param manager + * @param manager manager */ public void addJingleTransportManager(JingleTransportManager manager) { transportManagers.put(manager.getNamespace(), manager); @@ -340,7 +340,7 @@ public final class JingleManager extends Manager { /** * Add a {@link JingleSecurityManager}. - * @param manager + * @param manager manager */ public void addJingleSecurityManager(JingleSecurityManager manager) { securityManagers.put(manager.getNamespace(), manager); diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/jingle/component/JingleContent.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/jingle/component/JingleContent.java index 66bfdc4a9..64d3d76dc 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/jingle/component/JingleContent.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/jingle/component/JingleContent.java @@ -182,6 +182,7 @@ public class JingleContent implements JingleTransportCallback, JingleSecurityCal * @param connection connection. */ void handleContentAccept(JingleElement request, XMPPConnection connection) { + LOGGER.log(Level.FINE, "Received content-accept from " + request.getFrom() + " for session " + request.getSid() + " and content " + getName()); start(connection); } @@ -192,7 +193,7 @@ public class JingleContent implements JingleTransportCallback, JingleSecurityCal * @return result. */ IQ handleSessionAccept(JingleElement request, XMPPConnection connection) { - LOGGER.log(Level.INFO, "RECEIVED SESSION ACCEPT!"); + LOGGER.log(Level.FINE, "Received session-accept from " + request.getResponder() + " for session " + request.getSid()); JingleContentElement contentElement = null; for (JingleContentElement c : request.getContents()) { if (c.getName().equals(getName())) { @@ -310,9 +311,10 @@ public class JingleContent implements JingleTransportCallback, JingleSecurityCal */ private IQ handleTransportReject(JingleElement request, final XMPPConnection connection) { if (pendingReplacingTransport == null) { - // TODO: Throw other exception? - throw new AssertionError("We didn't try to replace the transport."); + LOGGER.log(Level.WARNING, "Received transport-reject, but apparently we did not try to replace the transport."); + return JingleElement.createJingleErrorOutOfOrder(request); } + Async.go(new Runnable() { @Override public void run() { @@ -321,10 +323,11 @@ public class JingleContent implements JingleTransportCallback, JingleSecurityCal try { replaceTransport(transportBlacklist, connection); } catch (SmackException.NotConnectedException | SmackException.NoResponseException | XMPPException.XMPPErrorException | InterruptedException e) { - LOGGER.log(Level.SEVERE, "Could not replace transport: " + e, e); + LOGGER.log(Level.SEVERE, "Could not replace transport.", e); } } }); + return IQ.createResultIQ(request); } @@ -343,9 +346,11 @@ public class JingleContent implements JingleTransportCallback, JingleSecurityCal @Override public void run() { try { - connection.createStanzaCollectorAndSend(JingleElement.createJingleErrorTieBreak(request)).nextResultOrThrow(); - } catch (SmackException.NoResponseException | SmackException.NotConnectedException | InterruptedException | XMPPException.XMPPErrorException e) { - LOGGER.log(Level.SEVERE, "Could not send tie-break: " + e, e); + connection.createStanzaCollectorAndSend(JingleElement.createJingleErrorTieBreak(request)) + .nextResultOrThrow(); + } catch (SmackException.NoResponseException | SmackException.NotConnectedException | + InterruptedException | XMPPException.XMPPErrorException e) { + LOGGER.log(Level.SEVERE, "Could not send tie-break.", e); } } }); @@ -374,10 +379,13 @@ public class JingleContent implements JingleTransportCallback, JingleSecurityCal Async.go(new Runnable() { @Override public void run() { + JingleElement reject = JingleElement.createTransportReject(session.getOurJid(), + session.getPeer(), session.getSessionId(), getCreator(), getName(), transportElement); try { - getParent().getJingleManager().getConnection().createStanzaCollectorAndSend(JingleElement.createTransportReject(session.getOurJid(), session.getPeer(), session.getSessionId(), getCreator(), getName(), transportElement)); - } catch (SmackException.NotConnectedException | InterruptedException e) { - LOGGER.log(Level.SEVERE, "Could not send transport-reject: " + e, e); + connection.createStanzaCollectorAndSend(reject).nextResultOrThrow(); + } catch (SmackException.NotConnectedException | InterruptedException | + XMPPException.XMPPErrorException | SmackException.NoResponseException e) { + LOGGER.log(Level.SEVERE, "Could not send transport-reject.", e); } } }); @@ -390,10 +398,11 @@ public class JingleContent implements JingleTransportCallback, JingleSecurityCal Async.go(new Runnable() { @Override public void run() { + JingleElement accept = JingleElement.createTransportAccept(session.getOurJid(), session.getPeer(), session.getSessionId(), getCreator(), getName(), transport.getElement()); try { - getParent().getJingleManager().getConnection().createStanzaCollectorAndSend(JingleElement.createTransportAccept(session.getOurJid(), session.getPeer(), session.getSessionId(), getCreator(), getName(), transport.getElement())); - } catch (SmackException.NotConnectedException | InterruptedException e) { - LOGGER.log(Level.SEVERE, "Could not send transport-accept: " + e, e); + getParent().getJingleManager().getConnection().createStanzaCollectorAndSend(accept).nextResultOrThrow(); + } catch (SmackException.NotConnectedException | InterruptedException | XMPPException.XMPPErrorException | SmackException.NoResponseException e) { + LOGGER.log(Level.SEVERE, "Could not send transport-accept.", e); } } }); @@ -579,17 +588,17 @@ public class JingleContent implements JingleTransportCallback, JingleSecurityCal public void run() { try { if (isReceiving()) { - LOGGER.log(Level.INFO, "Establish incoming bytestream."); + LOGGER.log(Level.FINE, "Establish incoming bytestream."); getTransport().establishIncomingBytestreamSession(connection, JingleContent.this, getParent()); } else if (isSending()) { - LOGGER.log(Level.INFO, "Establish outgoing bytestream."); + LOGGER.log(Level.FINE, "Establish outgoing bytestream."); getTransport().establishOutgoingBytestreamSession(connection, JingleContent.this, getParent()); } else { - LOGGER.log(Level.INFO, "Neither receiving, nor sending. Assume receiving."); + LOGGER.log(Level.FINE, "Neither receiving, nor sending. Assume receiving."); getTransport().establishIncomingBytestreamSession(connection, JingleContent.this, getParent()); } } catch (SmackException.NotConnectedException | InterruptedException e) { - LOGGER.log(Level.SEVERE, "Error establishing connection: " + e, e); + LOGGER.log(Level.SEVERE, "Error establishing connection.", e); } } }); @@ -597,17 +606,17 @@ public class JingleContent implements JingleTransportCallback, JingleSecurityCal @Override public void onTransportReady(BytestreamSession bytestreamSession) { - LOGGER.log(Level.INFO, "TransportReady: " + (isReceiving() ? "Receive" : "Send")); + LOGGER.log(Level.FINE, "TransportReady: " + (isReceiving() ? "Receive" : "Send")); if (bytestreamSession == null) { throw new AssertionError("bytestreamSession MUST NOT be null at this point."); } if (security != null) { if (isReceiving()) { - LOGGER.log(Level.INFO, "Decrypt incoming Bytestream."); + LOGGER.log(Level.FINE, "Decrypt incoming Bytestream."); getSecurity().decryptIncomingBytestream(bytestreamSession, this); } else if (isSending()) { - LOGGER.log(Level.INFO, "Encrypt outgoing Bytestream."); + LOGGER.log(Level.FINE, "Encrypt outgoing Bytestream."); getSecurity().encryptOutgoingBytestream(bytestreamSession, this); } } else { @@ -625,7 +634,7 @@ public class JingleContent implements JingleTransportCallback, JingleSecurityCal try { replaceTransport(getTransportBlacklist(), getParent().getJingleManager().getConnection()); } catch (SmackException.NotConnectedException | InterruptedException | SmackException.NoResponseException | XMPPException.XMPPErrorException e1) { - LOGGER.log(Level.SEVERE, "Could not send transport-replace: " + e, e); + LOGGER.log(Level.SEVERE, "Could not send transport-replace.", e); } } } @@ -637,7 +646,7 @@ public class JingleContent implements JingleTransportCallback, JingleSecurityCal @Override public void onSecurityFailed(Exception e) { - LOGGER.log(Level.SEVERE, "Security failed: " + e, e); + LOGGER.log(Level.SEVERE, "Security failed.", e); } /** diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/jingle/component/JingleSession.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/jingle/component/JingleSession.java index 96c35dd40..df6056857 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/jingle/component/JingleSession.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/jingle/component/JingleSession.java @@ -163,7 +163,7 @@ public class JingleSession { * @throws SmackException.NoResponseException */ public void sendAccept(XMPPConnection connection) throws SmackException.NotConnectedException, InterruptedException, XMPPException.XMPPErrorException, SmackException.NoResponseException { - LOGGER.log(Level.INFO, "Accepted session."); + LOGGER.log(Level.FINE, "Accepted session."); if (this.sessionState != SessionState.pending) { throw new IllegalStateException("Session is not in pending state."); } @@ -233,17 +233,6 @@ public class JingleSession { terminateSession(JingleReasonElement.Reason.success); return; } - - // Session has still active contents left. - /* - try { - jingleManager.getConnection().createStanzaCollectorAndSend(JingleElement.createSessionTerminateContentCancel( - getPeer(), getSessionId(), jingleContent.getCreator(), jingleContent.getName())); - } catch (SmackException.NotConnectedException | InterruptedException e) { - LOGGER.log(Level.SEVERE, "Could not send content-cancel: " + e, e); - } - contents.remove(jingleContent.getName()); - */ } /** @@ -253,7 +242,8 @@ public class JingleSession { */ void onContentCancel(JingleContent jingleContent) { if (contents.get(jingleContent.getName()) == null) { - LOGGER.log(Level.WARNING, "Session does not contain content " + jingleContent.getName() + ". Ignore onContentCancel."); + LOGGER.log(Level.WARNING, "Session does not contain content " + jingleContent.getName() + + ". Ignore onContentCancel."); return; } @@ -261,10 +251,13 @@ public class JingleSession { terminateSession(JingleReasonElement.Reason.cancel); jingleManager.removeSession(this); } else { + JingleElement cancel = JingleElement.createSessionTerminateContentCancel( + getPeer(), getSessionId(), jingleContent.getCreator(), jingleContent.getName()); try { - jingleManager.getConnection().createStanzaCollectorAndSend(JingleElement.createSessionTerminateContentCancel(getPeer(), getSessionId(), jingleContent.getCreator(), jingleContent.getName())); - } catch (SmackException.NotConnectedException | InterruptedException e) { - LOGGER.log(Level.SEVERE, "Could not send content-cancel: " + e, e); + jingleManager.getConnection().createStanzaCollectorAndSend(cancel).nextResultOrThrow(); + } catch (SmackException.NotConnectedException | InterruptedException | XMPPException.XMPPErrorException | + SmackException.NoResponseException e) { + LOGGER.log(Level.SEVERE, "Could not send content-cancel.", e); } contents.remove(jingleContent.getName()); } @@ -275,10 +268,11 @@ public class JingleSession { * @param reason reason of termination. */ public void terminateSession(JingleReasonElement.Reason reason) { + JingleElement terminate = JingleElement.createSessionTerminate(getPeer(), getSessionId(), reason); try { - jingleManager.getConnection().createStanzaCollectorAndSend(JingleElement.createSessionTerminate(getPeer(), getSessionId(), reason)); + jingleManager.getConnection().sendStanza(terminate); } catch (SmackException.NotConnectedException | InterruptedException e) { - LOGGER.log(Level.SEVERE, "Could not send session-terminate: " + e, e); + LOGGER.log(Level.SEVERE, "Could not send session-terminate.", e); } this.sessionState = SessionState.ended; jingleManager.removeSession(this); @@ -360,10 +354,13 @@ public class JingleSession { if (descriptionManager == null) { LOGGER.log(Level.WARNING, "Unsupported description type: " + description.getNamespace()); + JingleElement terminate = JingleElement.createSessionTerminate(getPeer(), getSessionId(), + JingleReasonElement.Reason.unsupported_applications); try { - jingleManager.getConnection().createStanzaCollectorAndSend(JingleElement.createSessionTerminate(getPeer(), getSessionId(), JingleReasonElement.Reason.unsupported_applications)); - } catch (SmackException.NotConnectedException | InterruptedException e) { - LOGGER.log(Level.SEVERE, "Could not send session-terminate: " + e, e); + jingleManager.getConnection().createStanzaCollectorAndSend(terminate).nextResultOrThrow(); + } catch (SmackException.NotConnectedException | InterruptedException | XMPPException.XMPPErrorException | + SmackException.NoResponseException e) { + LOGGER.log(Level.SEVERE, "Could not send session-terminate.", e); } } else { @@ -440,7 +437,8 @@ public class JingleSession { private IQ handleContentAdd(JingleElement request) { final JingleContent proposed = getSoleProposedContentOrThrow(request); - final JingleDescriptionManager descriptionManager = jingleManager.getDescriptionManager(proposed.getDescription().getNamespace()); + final JingleDescriptionManager descriptionManager = jingleManager.getDescriptionManager(proposed.getDescription() + .getNamespace()); if (descriptionManager == null) { throw new AssertionError("DescriptionManager is null: " + proposed.getDescription().getNamespace()); @@ -493,26 +491,6 @@ public class JingleSession { */ private IQ handleContentRemove(final JingleElement request) { return IQ.createErrorResponse(request, XMPPError.Condition.feature_not_implemented); - /* - for (JingleContentElement r : request.getContents()) { - final JingleContent removed = contents.get(r.getName()); - - if (removed == null) { - throw new AssertionError("Illegal content name!"); - } - - contents.remove(removed.getName()); - - Async.go(new Runnable() { - @Override - public void run() { - removed.handleContentRemove(JingleSession.this, jingleManager.getConnection()); - } - }); - } - - return IQ.createResultIQ(request); - */ } /** diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/jingle/element/JingleContentDescriptionChildElement.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/jingle/element/JingleContentDescriptionChildElement.java index 9a262b72c..10c3a2014 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/jingle/element/JingleContentDescriptionChildElement.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/jingle/element/JingleContentDescriptionChildElement.java @@ -20,6 +20,8 @@ import org.jivesoftware.smack.packet.NamedElement; /** * An element found usually in 'description' elements. + *
 {@code
+ *
  * 
  *     
  *         
@@ -29,7 +31,6 @@ import org.jivesoftware.smack.packet.NamedElement;
  *         
  *     
  * 
- *
  */
 public abstract class JingleContentDescriptionChildElement implements NamedElement {
 
diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/jingle/element/JingleContentDescriptionElement.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/jingle/element/JingleContentDescriptionElement.java
index 444c9c52c..cba8d148c 100644
--- a/smack-extensions/src/main/java/org/jivesoftware/smackx/jingle/element/JingleContentDescriptionElement.java
+++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/jingle/element/JingleContentDescriptionElement.java
@@ -26,6 +26,8 @@ import org.jivesoftware.smackx.jingle.component.JingleDescription;
 
 /**
  * {@link ExtensionElement} representing a {@link JingleDescription}.
+ * 
 {@code
+ *
  * 
  *     
  *          <- This element is us.
@@ -34,6 +36,7 @@ import org.jivesoftware.smackx.jingle.component.JingleDescription;
  *     
  * 
  *
+ * } 
*/ public abstract class JingleContentDescriptionElement implements ExtensionElement { diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/jingle/element/JingleContentElement.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/jingle/element/JingleContentElement.java index a49a3b5e3..20faf4a40 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/jingle/element/JingleContentElement.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/jingle/element/JingleContentElement.java @@ -24,11 +24,15 @@ import org.jivesoftware.smackx.jingle.component.JingleContent; /** * {@link NamedElement} representing a {@link JingleContent}. + *
 {@code
+ *
  * 
  *      <- Me.
  *         ...
  *     
  * 
+ *
+ * } 
*/ public final class JingleContentElement implements NamedElement { diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/jingle/element/JingleContentSecurityElement.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/jingle/element/JingleContentSecurityElement.java index 1e8142b25..8418d68e0 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/jingle/element/JingleContentSecurityElement.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/jingle/element/JingleContentSecurityElement.java @@ -21,6 +21,8 @@ import org.jivesoftware.smackx.jingle.component.JingleSecurity; /** * {@link ExtensionElement} representing a {@link JingleSecurity}. + *
 {@code
+ *
  * 
  *     
  *         
@@ -28,6 +30,9 @@ import org.jivesoftware.smackx.jingle.component.JingleSecurity;
  *          <- That's me :)
  *     
  * 
+ *
+ * } 
+ * */ public abstract class JingleContentSecurityElement implements ExtensionElement { diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/jingle/element/JingleContentTransportCandidateElement.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/jingle/element/JingleContentTransportCandidateElement.java index 4680c03ed..1998223aa 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/jingle/element/JingleContentTransportCandidateElement.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/jingle/element/JingleContentTransportCandidateElement.java @@ -21,6 +21,8 @@ import org.jivesoftware.smackx.jingle.component.JingleTransportCandidate; /** * {@link NamedElement} representing a {@link JingleTransportCandidate} + * + *
 {@code
  * 
  *     
  *         
@@ -30,6 +32,7 @@ import org.jivesoftware.smackx.jingle.component.JingleTransportCandidate;
  *         
  *     
  * 
+ * } 
* */ public abstract class JingleContentTransportCandidateElement implements NamedElement { diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/jingle/element/JingleContentTransportElement.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/jingle/element/JingleContentTransportElement.java index 0b7469524..24d6e9db6 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/jingle/element/JingleContentTransportElement.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/jingle/element/JingleContentTransportElement.java @@ -25,6 +25,8 @@ import org.jivesoftware.smackx.jingle.component.JingleTransport; /** * {@link ExtensionElement} representing a {@link JingleTransport}. + * + *
 {@code
  * 
  *     
  *         
@@ -32,6 +34,7 @@ import org.jivesoftware.smackx.jingle.component.JingleTransport;
  *         
  *     
  * 
+ * } 
* */ public abstract class JingleContentTransportElement implements ExtensionElement { diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/jingle/element/JingleContentTransportInfoElement.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/jingle/element/JingleContentTransportInfoElement.java index c866e2bcf..87452089c 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/jingle/element/JingleContentTransportInfoElement.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/jingle/element/JingleContentTransportInfoElement.java @@ -22,6 +22,8 @@ import org.jivesoftware.smack.packet.NamedElement; * Abstract JingleContentTransportInfo element. * The JingleContentTransportInfo element can have certain states defined by the respective Transport XEP. * Examples are Jingle Socks5Bytestream's (Example 5), (Example 7) etc. + * + *
 {@code
  * 
  *     
  *         
@@ -31,6 +33,7 @@ import org.jivesoftware.smack.packet.NamedElement;
  *         
  *     
  * 
+ * } 
*/ public abstract class JingleContentTransportInfoElement implements NamedElement { diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/jingle/transport/jingle_ibb/JingleIBBTransport.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/jingle/transport/jingle_ibb/JingleIBBTransport.java index 086effee9..23114a6f7 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/jingle/transport/jingle_ibb/JingleIBBTransport.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/jingle/transport/jingle_ibb/JingleIBBTransport.java @@ -88,11 +88,11 @@ public class JingleIBBTransport extends JingleTransport> receiveFuture = new ArrayList<>(); //Uglaay - bftm.addIncomingFileOfferListener(new IncomingFileOfferListener() { @Override public void onIncomingFileOffer(IncomingFileOfferController offer) { - LOGGER.log(Level.INFO, "INCOMING FILE TRANSFER!"); offer.addProgressListener(new ProgressListener() { @Override @@ -140,12 +134,10 @@ public class JingleFileTransferIntegrationTest extends AbstractSmackIntegrationT fi = new FileInputStream(target); fi.read(tBytes); } catch (IOException e) { - LOGGER.log(Level.SEVERE, "Could not read files."); - fail(); + fail("Could not read files: " + e.toString() + " " + e.getMessage()); } assertArrayEquals(sBytes, tBytes); - LOGGER.log(Level.INFO, "SUCCESSFULLY SENT AND RECEIVED"); } diff --git a/smack-integration-test/src/main/java/org/jivesoftware/smackx/jingle_filetransfer/JingleFileTransferTransportFallbackIntegrationTest.java b/smack-integration-test/src/main/java/org/jivesoftware/smackx/jingle_filetransfer/JingleFileTransferTransportFallbackIntegrationTest.java index 882df716b..76a7479d3 100644 --- a/smack-integration-test/src/main/java/org/jivesoftware/smackx/jingle_filetransfer/JingleFileTransferTransportFallbackIntegrationTest.java +++ b/smack-integration-test/src/main/java/org/jivesoftware/smackx/jingle_filetransfer/JingleFileTransferTransportFallbackIntegrationTest.java @@ -23,7 +23,6 @@ import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; -import java.util.logging.Level; import org.jivesoftware.smack.SmackException; import org.jivesoftware.smack.XMPPException; @@ -97,8 +96,6 @@ public class JingleFileTransferTransportFallbackIntegrationTest extends Abstract bftm.addIncomingFileOfferListener(new IncomingFileOfferListener() { @Override public void onIncomingFileOffer(IncomingFileOfferController offer) { - LOGGER.log(Level.INFO, "INCOMING FILE TRANSFER!"); - offer.addProgressListener(new ProgressListener() { @Override public void started() { @@ -149,12 +146,10 @@ public class JingleFileTransferTransportFallbackIntegrationTest extends Abstract fi = new FileInputStream(target); fi.read(tBytes); } catch (IOException e) { - LOGGER.log(Level.SEVERE, "Could not read files."); - fail(); + fail("Could not read files: " + e.toString() + " " + e.getMessage()); } assertArrayEquals(sBytes, tBytes); - LOGGER.log(Level.INFO, "SUCCESSFULLY SENT AND RECEIVED"); } @After