Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 832 for patch (0.21 sec)

  1. android/guava/src/com/google/common/math/DoubleUtils.java

        return longBitsToDouble(significand | ONE_BITS);
      }
    
      static double bigToDouble(BigInteger x) {
        // This is an extremely fast implementation of BigInteger.doubleValue(). JDK patch pending.
        BigInteger absX = x.abs();
        int exponent = absX.bitLength() - 1;
        // exponent == floor(log2(abs(x)))
        if (exponent < Long.SIZE - 1) {
          return x.longValue();
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Apr 28 15:37:52 GMT 2021
    - 5.1K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/net/HostAndPort.java

      /**
       * Split a freeform string into a host and port, without strict validation.
       *
       * <p>Note that the host-only formats will leave the port field undefined. You can use {@link
       * #withDefaultPort(int)} to patch in a default value.
       *
       * @param hostPortString the input string to parse.
       * @return if parsing was successful, a populated HostAndPort object.
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Aug 22 20:55:57 GMT 2023
    - 11.3K bytes
    - Viewed (0)
  3. guava/src/com/google/common/base/FinalizableReferenceQueue.java

        boolean threadStarted = false;
        try {
          startFinalizer.invoke(null, FinalizableReference.class, queue, frqRef);
          threadStarted = true;
        } catch (IllegalAccessException impossible) {
          throw new AssertionError(impossible); // startFinalizer() is public
        } catch (Throwable t) {
          logger.log(
              Level.INFO,
              "Failed to start reference finalizer thread."
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Wed Apr 26 20:07:17 GMT 2023
    - 13.1K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/base/FinalizableReferenceQueue.java

        boolean threadStarted = false;
        try {
          startFinalizer.invoke(null, FinalizableReference.class, queue, frqRef);
          threadStarted = true;
        } catch (IllegalAccessException impossible) {
          throw new AssertionError(impossible); // startFinalizer() is public
        } catch (Throwable t) {
          logger.log(
              Level.INFO,
              "Failed to start reference finalizer thread."
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 26 20:07:17 GMT 2023
    - 13.1K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/util/concurrent/AbstractFutureInnocuousThreadTest.java

                  try {
                    settableFutureClass.getMethod("create").invoke(null);
                    latch.countDown();
                  } catch (Exception e) {
                    throw new RuntimeException(e);
                  }
                });
        // In the failure case, await() will timeout.
        assertTrue(latch.await(2, TimeUnit.SECONDS));
      }
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Dec 16 19:54:45 GMT 2020
    - 5.1K bytes
    - Viewed (0)
  6. guava-testlib/src/com/google/common/util/concurrent/testing/MockFutureListener.java

       *     result doesn't match the expected value.
       */
      public void assertSuccess(Object expectedData) throws Throwable {
        // Verify that the listener executed in a reasonable amount of time.
        Assert.assertTrue(countDownLatch.await(1L, SECONDS));
    
        try {
          Assert.assertEquals(expectedData, future.get());
        } catch (ExecutionException e) {
          throw e.getCause();
        }
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri May 12 18:12:42 GMT 2023
    - 3K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/util/concurrent/FuturesGetChecked.java

        bestGetCheckedTypeValidator().validateClass(exceptionClass);
        try {
          return future.get(timeout, unit);
        } catch (InterruptedException e) {
          currentThread().interrupt();
          throw newWithCause(exceptionClass, e);
        } catch (TimeoutException e) {
          throw newWithCause(exceptionClass, e);
        } catch (ExecutionException e) {
          wrapAndThrowExceptionOrError(e.getCause(), exceptionClass);
          throw new AssertionError();
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Dec 14 20:35:03 GMT 2023
    - 10.3K bytes
    - Viewed (0)
  8. guava-testlib/src/com/google/common/testing/AbstractPackageSanityTests.java

          try {
            testClass.getMethod(testName);
            return true;
          } catch (NoSuchMethodException e) {
            continue;
          }
        }
        return false;
      }
    
      private static boolean isEqualsDefined(Class<?> cls) {
        try {
          return !cls.getDeclaredMethod("equals", Object.class).isSynthetic();
        } catch (NoSuchMethodException e) {
          return false;
        }
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri May 12 19:22:18 GMT 2023
    - 17.5K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/cache/CacheBuilderSpec.java

                durationInNanos(that.refreshDuration, that.refreshTimeUnit));
      }
    
      /**
       * Converts an expiration duration/unit pair into a single Long for hashing and equality. Uses
       * nanos to match CacheBuilder implementation.
       */
      @CheckForNull
      private static Long durationInNanos(long duration, @CheckForNull TimeUnit unit) {
        return (unit == null) ? null : unit.toNanos(duration);
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Aug 22 14:27:44 GMT 2022
    - 18.1K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/math/MathPreconditionsTest.java

          fail();
        } catch (IllegalArgumentException expected) {
        }
      }
    
      public void testCheckPositive_maxInt() {
        MathPreconditions.checkPositive("int", Integer.MAX_VALUE);
      }
    
      public void testCheckPositive_minInt() {
        try {
          MathPreconditions.checkPositive("int", Integer.MIN_VALUE);
          fail();
        } catch (IllegalArgumentException expected) {
        }
      }
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 8.2K bytes
    - Viewed (0)
Back to top