public static void closeQuietly(JarFile jarFile) { if (jarFile == null) { return; } try { jarFile.close(); } catch (IOException ignore) { ignore(ignore); } }
public static void closeQuietly(XMLStreamWriter writer) { if (writer == null) { return; } try { writer.close(); } catch (XMLStreamException ignore) { ignore(ignore); } }
public static void closeQuietly(Socket socket) { if (socket == null) { return; } try { socket.close(); } catch (IOException ignore) { ignore(ignore); } }
public static void closeQuietly(Socket socket) { if (socket == null) { return; } try { socket.close(); } catch (IOException ignore) { ignore(ignore); } }
public static void sleepTimeUnit(TimeUnit timeUnit, long timeout) { try { timeUnit.sleep(timeout); } catch (InterruptedException e) { ignore(e); } }
public static void closeQuietly(XMLStreamWriter writer) { if (writer == null) { return; } try { writer.close(); } catch (XMLStreamException ignore) { ignore(ignore); } }
public static void sleepSeconds(int seconds) { try { TimeUnit.SECONDS.sleep(seconds); } catch (InterruptedException ignore) { ignore(ignore); } }
public static void closeQuietly(Closeable closeable) { if (closeable == null) { return; } try { closeable.close(); } catch (IOException ignore) { ignore(ignore); } }
public static void closeQuietly(Closeable closeable) { if (closeable == null) { return; } try { closeable.close(); } catch (IOException ignore) { ignore(ignore); } }
public static void sleepSeconds(int seconds) { try { TimeUnit.SECONDS.sleep(seconds); } catch (InterruptedException ignore) { ignore(ignore); } }
public static void sleepMillis(int millis) { try { TimeUnit.MILLISECONDS.sleep(millis); } catch (InterruptedException ignore) { ignore(ignore); } }
public static void closeQuietly(JarFile jarFile) { if (jarFile == null) { return; } try { jarFile.close(); } catch (IOException ignore) { ignore(ignore); } }
public static void sleepMillis(long millis) { try { MILLISECONDS.sleep(millis); } catch (InterruptedException ignore) { ignore(ignore); } }
public static void sleepTimeUnit(TimeUnit timeUnit, long timeout) { try { timeUnit.sleep(timeout); } catch (InterruptedException e) { ignore(e); } }
public static void deleteQuiet(File file) { if (file == null) { return; } try { delete(file); } catch (Exception ignored) { ignore(ignored); } }
public static void deleteQuiet(File file) { if (file == null) { return; } try { delete(file); } catch (Exception ignored) { ignore(ignored); } }
private void createOOME() { List<byte[]> list = new LinkedList<byte[]>(); for (; ; ) { try { list.add(new byte[100 * 1000 * 1000]); } catch (OutOfMemoryError ignored) { EmptyStatement.ignore(ignored); break; } } logger.severe("We should never reach this code! List size: " + list.size()); }
@Override public void run() { try { String line; while ((line = reader.readLine()) != null) { LOGGER.trace(line); stringBuilder.append(line).append(NEW_LINE); } } catch (IOException ignored) { EmptyStatement.ignore(ignored); } finally { closeQuietly(reader); closeQuietly(inputStreamReader); } } }
@Override public void run() { try { String line; while ((line = reader.readLine()) != null) { stringBuilder.append(line).append(NEW_LINE); } } catch (IOException ignored) { EmptyStatement.ignore(ignored); } finally { closeQuietly(reader); closeQuietly(inputStreamReader); } } }
static String getHazelcastVersionFromJarOrNull(String classPath) { try { List<File> jarFiles = getFilesFromClassPath(classPath); for (File jarFile : jarFiles) { String version = getVersion(jarFile); if (version != null) { return version; } } } catch (UncheckedIOException ignored) { ignore(ignored); } return null; }