Search Options

Results per page
Sort
Preferred Languages
Advance

Results 211 - 220 of 2,976 for throw (0.11 sec)

  1. guava/src/com/google/common/util/concurrent/FuturesGetChecked.java

      private static <X extends Exception> void wrapAndThrowExceptionOrError(
          Throwable cause, Class<X> exceptionClass) throws X {
        if (cause instanceof Error) {
          throw new ExecutionError((Error) cause);
        }
        if (cause instanceof RuntimeException) {
          throw new UncheckedExecutionException(cause);
        }
        throw newWithCause(exceptionClass, cause);
      }
    
      /*
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sat Aug 09 01:14:59 UTC 2025
    - 11.8K bytes
    - Viewed (0)
  2. guava-testlib/test/com/google/common/testing/NullPointerTesterTest.java

        }
    
        public static void staticOneArgCheckForNullCorrectlyThrowsOtherThanNpe(@CheckForNull String s) {
          throw new FooException(); // ok, as long as it's not NullPointerException
        }
    
        public static void staticOneArgNullableCorrectlyThrowsOtherThanNpe(@Nullable String s) {
          throw new FooException(); // ok, as long as it's not NullPointerException
        }
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Jul 14 14:44:08 UTC 2025
    - 47.7K bytes
    - Viewed (0)
  3. okhttp/src/jvmTest/kotlin/okhttp3/SocksProxy.kt

            fromSink.emit()
          }
          else -> throw ProtocolException("unsupported method: $selectedMethod")
        }
      }
    
      private fun acceptCommand(
        fromAddress: InetAddress,
        fromSource: BufferedSource,
        fromSink: BufferedSink,
      ) {
        // Read the command.
        val version = fromSource.readByte() and 0xff
        if (version != VERSION_5) throw ProtocolException("unexpected version: $version")
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon May 05 16:01:00 UTC 2025
    - 7.6K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/util/concurrent/TestThread.java

      /**
       * Sends the given method call to this thread.
       *
       * @throws TimeoutException if this thread does not accept the request within a reasonable amount
       *     of time
       */
      private void sendRequest(String methodName, Object... arguments) throws Exception {
        if (!requestQueue.offer(new Request(methodName, arguments), TIMEOUT_MILLIS, MILLISECONDS)) {
          throw new TimeoutException();
        }
      }
    
      /**
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sun Dec 22 03:38:46 UTC 2024
    - 10.8K bytes
    - Viewed (0)
  5. src/test/java/jcifs/pac/kerberos/KerberosAuthDataTest.java

        private Map<Integer, KerberosKey> mockKeys;
    
        /**
         * Test parsing with an unknown auth type.
         * Expects an empty list of authorizations.
         * @throws PACDecodingException should not be thrown
         */
        @Test
        void testParseUnknownAuthType() throws PACDecodingException {
            // GIVEN an unknown auth type
            int unknownAuthType = -1;
            byte[] emptyToken = new byte[0];
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 2.7K bytes
    - Viewed (0)
  6. guava/src/com/google/common/util/concurrent/Monitor.java

      }
    
      /**
       * Enters this monitor when the guard is satisfied. Blocks indefinitely, but may be interrupted.
       *
       * @throws InterruptedException if interrupted while waiting
       */
      public void enterWhen(Guard guard) throws InterruptedException {
        if (guard.monitor != this) {
          throw new IllegalMonitorStateException();
        }
        ReentrantLock lock = this.lock;
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Mar 17 20:26:29 UTC 2025
    - 42.8K bytes
    - Viewed (0)
  7. src/main/java/jcifs/util/SimpleCircuitBreaker.java

            if (failureThreshold < 1) {
                throw new IllegalArgumentException("Failure threshold must be at least 1");
            }
            if (successThreshold < 1) {
                throw new IllegalArgumentException("Success threshold must be at least 1");
            }
            if (timeoutMillis < 0) {
                throw new IllegalArgumentException("Timeout must be non-negative");
            }
        }
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 11.3K bytes
    - Viewed (0)
  8. guava/src/com/google/common/util/concurrent/FakeTimeLimiter.java

          Callable<T> callable, long timeoutDuration, TimeUnit timeoutUnit) throws ExecutionException {
        checkNotNull(callable);
        checkNotNull(timeoutUnit);
        try {
          return callable.call();
        } catch (RuntimeException e) {
          throw new UncheckedExecutionException(e);
        } catch (Exception e) {
          restoreInterruptIfIsInterruptedException(e);
          throw new ExecutionException(e);
        } catch (Error e) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sun Dec 22 03:38:46 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java

            return i;
          }
        }
        throw new AssertionError(
            "Expected element " + clazz + "." + method + " not found in stack trace", e);
      }
    
      private ExecutionException getExpectingExecutionException(AbstractFuture<String> future)
          throws InterruptedException {
        try {
          String got = future.get();
          throw new AssertionError("Expected exception but got " + got);
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Fri Jul 11 18:52:30 UTC 2025
    - 46.8K bytes
    - Viewed (0)
  10. src/test/java/jcifs/util/SecureCredentialStorageTest.java

            }, "Should throw IllegalStateException after destroy");
    
            assertThrows(IllegalStateException.class, () -> {
                storage.decryptCredentials(encrypted);
            }, "Should throw IllegalStateException after destroy");
    
            // Clean up
            Arrays.fill(plaintext, '\0');
        }
    
        @Test
        public void testAutoCloseable() throws Exception {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 12.7K bytes
    - Viewed (0)
Back to top