- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 1,792 for Withrow (0.19 sec)
-
guava-tests/test/com/google/common/io/CloserTest.java
TestCloseable c2 = closer.register(TestCloseable.normal()); IOException exception = new IOException(); try { try { throw exception; } catch (Throwable e) { throw closer.rethrow(e); } finally { closer.close(); } } catch (Throwable expected) { assertSame(exception, expected); } assertTrue(c1.isClosed());
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Wed Mar 06 15:15:46 GMT 2024 - 13.6K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/CloserTest.java
TestCloseable c2 = closer.register(TestCloseable.normal()); IOException exception = new IOException(); try { try { throw exception; } catch (Throwable e) { throw closer.rethrow(e); } finally { closer.close(); } } catch (Throwable expected) { assertSame(exception, expected); } assertTrue(c1.isClosed());
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Wed Mar 06 15:15:46 GMT 2024 - 13.6K bytes - Viewed (0) -
android/guava/src/com/google/common/io/Closer.java
* // do stuff * } catch (Throwable e) { * // ensure that any checked exception types other than IOException that could be thrown are * // provided here, e.g. throw closer.rethrow(e, CheckedException.class); * throw closer.rethrow(e); * } finally { * closer.close(); * } * }</pre> * * <p>Note that this try-catch-finally block is not equivalent to a try-catch-finally block using
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Wed Mar 06 15:15:46 GMT 2024 - 11.9K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/UncheckedThrowingFuture.java
} catch (ExecutionException e) { rethrow(e); } throw new AssertionError("Unreachable"); } @Override public V get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException { try { super.get(timeout, unit); } catch (ExecutionException e) { rethrow(e); } throw new AssertionError("Unreachable"); }
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Wed Sep 12 20:02:10 GMT 2018 - 3.2K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/FlushablesTest.java
} // Set up a flushable to expect to be flushed, and optionally to // throw an exception. private void setupFlushable(boolean shouldThrowOnFlush) throws IOException { mockFlushable = mock(Flushable.class); if (shouldThrowOnFlush) { doThrow( new IOException( "This should only appear in the " + "logs. It should not be rethrown.")) .when(mockFlushable) .flush(); }
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Mon Dec 04 17:37:03 GMT 2017 - 3.3K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/UncheckedThrowingFuture.java
} catch (ExecutionException e) { rethrow(e); } throw new AssertionError("Unreachable"); } @Override public V get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException { try { super.get(timeout, unit); } catch (ExecutionException e) { rethrow(e); } throw new AssertionError("Unreachable"); }
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Wed Sep 12 20:02:10 GMT 2018 - 3.2K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/FlushablesTest.java
} // Set up a flushable to expect to be flushed, and optionally to // throw an exception. private void setupFlushable(boolean shouldThrowOnFlush) throws IOException { mockFlushable = mock(Flushable.class); if (shouldThrowOnFlush) { doThrow( new IOException( "This should only appear in the " + "logs. It should not be rethrown.")) .when(mockFlushable) .flush(); }
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Mon Dec 04 17:37:03 GMT 2017 - 3.3K bytes - Viewed (0) -
android/guava/src/com/google/common/io/CharSink.java
try { Writer out = closer.register(openStream()); out.append(charSequence); out.flush(); // https://code.google.com/p/guava-libraries/issues/detail?id=1330 } catch (Throwable e) { throw closer.rethrow(e); } finally { closer.close(); } } /** * Writes the given lines of text to this sink with each line (including the last) terminated with
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Tue Feb 28 20:13:02 GMT 2023 - 6.1K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/CloseablesTest.java
Closeables.closeQuietly((Reader) null); } // Set up a closeable to expect to be closed, and optionally to throw an // exception. private void setupCloseable(boolean shouldThrow) throws IOException { mockCloseable = mock(Closeable.class); if (shouldThrow) { doThrow(new IOException("This should only appear in the logs. It should not be rethrown.")) .when(mockCloseable) .close();
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Mon Dec 04 17:37:03 GMT 2017 - 4K bytes - Viewed (0) -
android/guava/src/com/google/common/io/CharSource.java
} Closer closer = Closer.create(); try { Reader reader = closer.register(openStream()); return countBySkipping(reader); } catch (Throwable e) { throw closer.rethrow(e); } finally { closer.close(); } } private long countBySkipping(Reader reader) throws IOException { long count = 0; long read;
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Wed May 17 14:35:11 GMT 2023 - 22.4K bytes - Viewed (0)