From cc026a7e85698981e859a7ca726956fe31082a49 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Sun, 23 Mar 2014 23:12:15 +0100 Subject: [PATCH] Raise source compatibility to 1.7 (Java7) Now that Java 8 is released, it's time to raise Smack's source compatibility. Let's also use some of the "new" Java 7 features like "catch multiple". --- build.gradle | 2 +- .../smackx/bytestreams/socks5/Socks5BytestreamManager.java | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/build.gradle b/build.gradle index d66bc4788..1dc2ec199 100644 --- a/build.gradle +++ b/build.gradle @@ -22,7 +22,7 @@ allprojects { oneLineDesc = 'An Open Source XMPP (Jabber) client library' } group = 'org.igniterealtime.smack' - sourceCompatibility = 1.6 + sourceCompatibility = 1.7 version = shortVersion if (isSnapshot) { version += '-SNAPSHOT' diff --git a/extensions/src/main/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5BytestreamManager.java b/extensions/src/main/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5BytestreamManager.java index 247abd192..6a51acb4a 100644 --- a/extensions/src/main/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5BytestreamManager.java +++ b/extensions/src/main/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5BytestreamManager.java @@ -574,11 +574,7 @@ public final class Socks5BytestreamManager implements BytestreamManager { try { proxyInfo = serviceDiscoveryManager.discoverInfo(item.getEntityID()); } - catch (NoResponseException e) { - // blacklist errornous server - proxyBlacklist.add(item.getEntityID()); - continue; } - catch (XMPPErrorException e) { + catch (NoResponseException|XMPPErrorException e) { // blacklist errornous server proxyBlacklist.add(item.getEntityID()); continue;