[java] Bringing back catch clause as should be enough
import java.nio.charset.Charset;
import java.util.Enumeration;
import java.util.concurrent.TimeUnit;
-import java.util.logging.Level;
import java.util.logging.Logger;
public class HostIdentifier {
@@ -61,6 +60,10 @@ private static String resolveHostName() {
host = reader.readLine();
}
}
+ } catch (InterruptedException e) {
+ log.log(WARNING, "Failed to resolve host name", e);
+ Thread.currentThread().interrupt();
+ throw new RuntimeException(e);
} catch (Throwable e) {
// fall through
log.log(WARNING, "Failed to resolve host name", e);
