Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 331 - 340 of 2,240 for throwIf (0.07 seconds)

  1. src/test/java/org/codelibs/core/io/CloseableUtilTest.java

    public class CloseableUtilTest {
    
        /**
         * @throws Exception
         */
        @Test
        public void testClose() throws Exception {
            final NotifyOutputStream out = new NotifyOutputStream();
            CloseableUtil.close(out);
            assertThat(out.getNotify(), is("closed"));
        }
    
        /**
         * @throws Exception
         */
        @Test
        public void testCloseNull() throws Exception {
    Created: Fri Apr 03 20:58:12 GMT 2026
    - Last Modified: Sat May 10 01:32:17 GMT 2025
    - 2.2K bytes
    - Click Count (0)
  2. android/guava/src/com/google/common/collect/UnmodifiableIterator.java

      protected UnmodifiableIterator() {}
    
      /**
       * Guaranteed to throw an exception and leave the underlying data unmodified.
       *
       * @throws UnsupportedOperationException always
       * @deprecated Unsupported operation.
       */
      @Deprecated
      @Override
      @DoNotCall("Always throws UnsupportedOperationException")
      public final void remove() {
        throw new UnsupportedOperationException();
      }
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Sun Dec 22 03:38:46 GMT 2024
    - 1.7K bytes
    - Click Count (0)
  3. samples/guide/src/main/java/okhttp3/recipes/CacheResponse.java

      private final OkHttpClient client;
    
      public CacheResponse(File cacheDirectory) throws Exception {
        int cacheSize = 10 * 1024 * 1024; // 10 MiB
        Cache cache = new Cache(cacheDirectory, cacheSize);
    
        client = new OkHttpClient.Builder()
            .cache(cache)
            .build();
      }
    
      public void run() throws Exception {
        Request request = new Request.Builder()
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Sun May 22 01:29:42 GMT 2016
    - 2.4K bytes
    - Click Count (0)
  4. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http2/Http2Connection.kt

       *     Corresponds to `FLAG_FIN`.
       */
      @Throws(IOException::class)
      fun newStream(
        requestHeaders: List<Header>,
        out: Boolean,
      ): Http2Stream = newStream(0, requestHeaders, out)
    
      @Throws(IOException::class)
      private fun newStream(
        associatedStreamId: Int,
        requestHeaders: List<Header>,
        out: Boolean,
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Jan 27 09:00:39 GMT 2026
    - 31.9K bytes
    - Click Count (0)
  5. guava-tests/test/com/google/common/util/concurrent/ExecutionListTest.java

      }
    
      public void testExecute_idempotentConcurrently() throws InterruptedException {
        CountDownLatch okayToRun = new CountDownLatch(1);
        AtomicInteger runCalled = new AtomicInteger();
        list.add(
            () -> {
              try {
                okayToRun.await();
              } catch (InterruptedException e) {
                Thread.currentThread().interrupt();
                throw new RuntimeException(e);
              }
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 4.4K bytes
    - Click Count (0)
  6. src/test/java/org/codelibs/fess/dict/stopwords/StopwordsFileTest.java

            InputStream failingStream = new InputStream() {
                @Override
                public int read() throws IOException {
                    throw new IOException("Test exception");
                }
            };
    
            try {
                stopwordsFile.reload(null, failingStream);
                fail("Should throw DictionaryException");
            } catch (DictionaryException e) {
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Fri Mar 13 23:01:26 GMT 2026
    - 18K bytes
    - Click Count (0)
  7. guava/src/com/google/common/collect/HashBiMap.java

       */
      @GwtIncompatible
      @J2ktIncompatible
        private void writeObject(ObjectOutputStream stream) throws IOException {
        stream.defaultWriteObject();
        Serialization.writeMap(this, stream);
      }
    
      @GwtIncompatible
      @J2ktIncompatible
        private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException {
        stream.defaultReadObject();
        int size = stream.readInt();
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Fri Dec 26 20:08:09 GMT 2025
    - 25.7K bytes
    - Click Count (0)
  8. android/guava-testlib/test/com/google/common/util/concurrent/testing/TestingExecutorsTest.java

        assertTrue("Should run callable immediately", taskDone);
        assertEquals(6, (int) future.get());
      }
    
      public void testSameThreadScheduledExecutorWithException() throws InterruptedException {
        Runnable runnable =
            () -> {
              throw new RuntimeException("Oh no!");
            };
    
        Future<?> future = TestingExecutors.sameThreadScheduledExecutor().submit(runnable);
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 3.3K bytes
    - Click Count (0)
  9. guava-testlib/test/com/google/common/util/concurrent/testing/TestingExecutorsTest.java

        assertTrue("Should run callable immediately", taskDone);
        assertEquals(6, (int) future.get());
      }
    
      public void testSameThreadScheduledExecutorWithException() throws InterruptedException {
        Runnable runnable =
            () -> {
              throw new RuntimeException("Oh no!");
            };
    
        Future<?> future = TestingExecutors.sameThreadScheduledExecutor().submit(runnable);
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 3.3K bytes
    - Click Count (0)
  10. samples/guide/src/main/java/okhttp3/recipes/PreemptiveAuth.java

            .build();
      }
    
      public void run() throws Exception {
        Request request = new Request.Builder()
            .url("https://publicobject.com/secrets/hellosecret.txt")
            .build();
    
        try (Response response = client.newCall(request).execute()) {
          if (!response.isSuccessful()) throw new IOException("Unexpected code " + response);
    
          System.out.println(response.body().string());
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Mon Nov 05 07:46:46 GMT 2018
    - 2.1K bytes
    - Click Count (0)
Back to Top