mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-12-14 06:51:08 +01:00
Lint fixes: Remove dead code, etc.
- make method static when possible - remove never thrown Exception declarations - other fixes
This commit is contained in:
parent
83b84c5bd3
commit
c6594aec2f
18 changed files with 48 additions and 65 deletions
|
|
@ -31,6 +31,7 @@ import java.util.logging.Level;
|
|||
import java.util.logging.Logger;
|
||||
|
||||
import org.jivesoftware.smack.SmackException;
|
||||
import org.jivesoftware.smack.SmackException.NoResponseException;
|
||||
import org.jivesoftware.smack.XMPPException.XMPPErrorException;
|
||||
|
||||
|
||||
|
|
@ -193,10 +194,20 @@ public class IncomingFileTransfer extends FileTransfer {
|
|||
try {
|
||||
inputStream = streamNegotiatorTask.get(15, TimeUnit.SECONDS);
|
||||
}
|
||||
catch (InterruptedException e) {
|
||||
throw new SmackException("Interruption while executing", e);
|
||||
}
|
||||
catch (ExecutionException e) {
|
||||
final Throwable cause = e.getCause();
|
||||
if (cause instanceof XMPPErrorException) {
|
||||
throw (XMPPErrorException) cause;
|
||||
}
|
||||
if (cause instanceof InterruptedException) {
|
||||
throw (InterruptedException) cause;
|
||||
}
|
||||
if (cause instanceof NoResponseException) {
|
||||
throw (NoResponseException) cause;
|
||||
}
|
||||
if (cause instanceof SmackException) {
|
||||
throw (SmackException) cause;
|
||||
}
|
||||
throw new SmackException("Error in execution", e);
|
||||
}
|
||||
catch (TimeoutException e) {
|
||||
|
|
|
|||
|
|
@ -87,9 +87,7 @@ public abstract class StreamNegotiator {
|
|||
}
|
||||
|
||||
protected final IQ initiateIncomingStream(final XMPPConnection connection, StreamInitiation initiation)
|
||||
// CHECKSTYLE:OFF
|
||||
throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
|
||||
// CHECKSTYLE:ON
|
||||
throws NoResponseException, XMPPErrorException, NotConnectedException {
|
||||
final StreamInitiation response = createInitiationAccept(initiation,
|
||||
getNamespaces());
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue