Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 1,793 for Withrow (0.36 sec)

  1. guava-testlib/test/com/google/common/testing/NullPointerTesterTest.java

      public static class TwoArg {
        /** Action to take on a null param. */
        public enum Action {
          THROW_A_NPE {
            @Override
            public void act() {
              throw new NullPointerException();
            }
          },
          THROW_OTHER {
            @Override
            public void act() {
              throw new FooException();
            }
          },
          JUST_RETURN {
            @Override
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Nov 16 15:12:31 GMT 2023
    - 47.9K bytes
    - Viewed (0)
  2. 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)
  3. android/guava/src/com/google/common/io/ByteSource.java

        }
        Closer closer = Closer.create();
        try {
          InputStream in = closer.register(openStream());
          return in.read() == -1;
        } catch (Throwable e) {
          throw closer.rethrow(e);
        } finally {
          closer.close();
        }
      }
    
      /**
       * Returns the size of this source in bytes, if the size can be easily determined without actually
       * opening the data stream.
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed May 17 14:35:11 GMT 2023
    - 26.2K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/io/ByteSink.java

        try {
          OutputStream out = closer.register(openStream());
          out.write(bytes);
          out.flush(); // https://code.google.com/p/guava-libraries/issues/detail?id=1330
        } catch (Throwable e) {
          throw closer.rethrow(e);
        } finally {
          closer.close();
        }
      }
    
      /**
       * Writes all the bytes from the given {@code InputStream} to this sink. Does not close {@code
       * input}.
       *
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 28 20:13:02 GMT 2023
    - 5.5K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/io/Closeables.java

       *   try {
       *     // ... code which does something with the stream ...
       *     threw = false;
       *   } finally {
       *     // If an exception occurs, rethrow it only if threw==false:
       *     Closeables.close(stream, threw);
       *   }
       * }
       * }</pre>
       *
       * @param closeable the {@code Closeable} object to be closed, or null, in which case this method
       *     does nothing
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed May 17 14:35:11 GMT 2023
    - 4.7K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/io/Flushables.java

      private Flushables() {}
    
      /**
       * Flush a {@link Flushable}, with control over whether an {@code IOException} may be thrown.
       *
       * <p>If {@code swallowIOException} is true, then we don't rethrow {@code IOException}, but merely
       * log it.
       *
       * @param flushable the {@code Flushable} object to be flushed.
       * @param swallowIOException if true, don't propagate IO exceptions thrown by the {@code flush}
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed May 17 14:35:11 GMT 2023
    - 2.5K bytes
    - Viewed (0)
  7. maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleModuleBuilder.java

                        new ProjectExecutionEvent(session, currentProject, t));
    
                // rethrow original errors and runtime exceptions
                if (t instanceof RuntimeException) {
                    throw (RuntimeException) t;
                }
                if (t instanceof Error) {
                    throw (Error) t;
                }
            } finally {
                session.setCurrentProject(null);
    
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Wed Feb 28 23:31:09 GMT 2024
    - 5.4K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/util/concurrent/AbstractClosingFutureTest.java

    import static java.util.concurrent.Executors.newSingleThreadExecutor;
    import static java.util.concurrent.TimeUnit.SECONDS;
    import static org.junit.Assert.assertThrows;
    import static org.mockito.Mockito.doThrow;
    import static org.mockito.Mockito.timeout;
    import static org.mockito.Mockito.verify;
    
    import com.google.common.collect.ImmutableList;
    import com.google.common.reflect.Reflection;
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 17:15:24 GMT 2024
    - 75.3K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/util/concurrent/AbstractClosingFutureTest.java

    import static java.util.concurrent.Executors.newSingleThreadExecutor;
    import static java.util.concurrent.TimeUnit.SECONDS;
    import static org.junit.Assert.assertThrows;
    import static org.mockito.Mockito.doThrow;
    import static org.mockito.Mockito.timeout;
    import static org.mockito.Mockito.verify;
    
    import com.google.common.collect.ImmutableList;
    import com.google.common.reflect.Reflection;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 17:15:24 GMT 2024
    - 74.7K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/collect/StreamsTest.java

        RuntimeException exception3 = new ArithmeticException("exception from stream 3");
        Stream<String> stream1 = Stream.of("foo", "bar").onClose(doThrow(exception1));
        Stream<String> stream2 = Stream.of("baz", "buh").onClose(doThrow(exception2));
        Stream<String> stream3 = Stream.of("quux").onClose(doThrow(exception3));
        RuntimeException exception = null;
        try (Stream<String> concatenated = Streams.concat(stream1, stream2, stream3)) {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 20K bytes
    - Viewed (0)
Back to top