Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for unsafe (0.22 sec)

  1. android/guava/src/com/google/common/util/concurrent/AbstractFuture.java

        static final long WAITER_NEXT_OFFSET;
    
        static {
          sun.misc.Unsafe unsafe = null;
          try {
            unsafe = sun.misc.Unsafe.getUnsafe();
          } catch (SecurityException tryReflectionInstead) {
            try {
              unsafe =
                  AccessController.doPrivileged(
                      new PrivilegedExceptionAction<sun.misc.Unsafe>() {
                        @Override
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 22 21:17:24 GMT 2024
    - 63K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/collect/ImmutableSortedMap.java

        }
      }
    
      /**
       * Returns the empty sorted map.
       *
       * <p><b>Performance note:</b> the instance returned is a singleton.
       */
      @SuppressWarnings("unchecked")
      // unsafe, comparator() returns a comparator on the specified type
      // TODO(kevinb): evaluate whether or not of().comparator() should return null
      public static <K, V> ImmutableSortedMap<K, V> of() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 53.2K bytes
    - Viewed (0)
  3. guava/src/com/google/common/collect/ImmutableSortedMap.java

        }
      }
    
      /**
       * Returns the empty sorted map.
       *
       * <p><b>Performance note:</b> the instance returned is a singleton.
       */
      @SuppressWarnings("unchecked")
      // unsafe, comparator() returns a comparator on the specified type
      // TODO(kevinb): evaluate whether or not of().comparator() should return null
      public static <K, V> ImmutableSortedMap<K, V> of() {
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 21:19:52 GMT 2024
    - 50.3K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/util/concurrent/Futures.java

          if (super.cancel(interruptIfRunning)) {
            /*
             * requireNonNull is generally safe: If cancel succeeded, then this Future was still
             * pending, so its `state` field hasn't been nulled out yet.
             *
             * OK, it's technically possible for this to fail in the presence of unsafe publishing, as
             * discussed in the comments in TimeoutFuture. TODO(cpovirk): Maybe check for null before
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 59.6K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/collect/MapMakerInternalMap.java

         */
        abstract E castForTesting(InternalEntry<K, V, ?> entry);
    
        /** Unsafely extracts the key reference queue used by this segment. */
        ReferenceQueue<K> getKeyReferenceQueueForTesting() {
          throw new AssertionError();
        }
    
        /** Unsafely extracts the value reference queue used by this segment. */
        ReferenceQueue<V> getValueReferenceQueueForTesting() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 91.9K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/collect/Sets.java

      }
    
      /**
       * Creates a thread-safe set backed by a hash map. The set is backed by a {@link
       * ConcurrentHashMap} instance, and thus carries the same concurrency guarantees.
       *
       * <p>Unlike {@code HashSet}, this class does NOT allow {@code null} to be used as an element. The
       * set is serializable.
       *
       * @return a new, empty thread-safe {@code Set}
       * @since 15.0
       */
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 77.4K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/Multimaps.java

                  if (!hasNext()) {
                    throw new NoSuchElementException();
                  }
                  i++;
                  /*
                   * The cast is safe because of the containsKey check in hasNext(). (That means it's
                   * unsafe under concurrent modification, but all bets are off then, anyway.)
                   */
                  return uncheckedCastNullableTToT(map.get(key));
                }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 86.4K bytes
    - Viewed (0)
  8. guava/src/com/google/common/cache/CacheBuilder.java

     * </ul>
     *
     * <p>These features are all optional; caches can be created using all or none of them. By default,
     * cache instances created by {@code CacheBuilder} will not perform any type of eviction.
     *
     * <p>Usage example:
     *
     * <pre>{@code
     * LoadingCache<Key, Graph> graphs = CacheBuilder.newBuilder()
     *     .maximumSize(10000)
     *     .expireAfterWrite(Duration.ofMinutes(10))
     *     .removalListener(MY_LISTENER)
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 51.3K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/reflect/TypeToken.java

        new TypeVisitor() {
          @Override
          void visitTypeVariable(TypeVariable<?> type) {
            throw new IllegalArgumentException(
                runtimeType + "contains a type variable and is not safe for the operation");
          }
    
          @Override
          void visitWildcardType(WildcardType type) {
            visit(type.getLowerBounds());
            visit(type.getUpperBounds());
          }
    
          @Override
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Jun 26 21:02:13 GMT 2023
    - 53.6K bytes
    - Viewed (0)
  10. guava/src/com/google/common/collect/Iterators.java

        return emptyListIterator();
      }
    
      /**
       * Returns the empty iterator.
       *
       * <p>The {@link Iterable} equivalent of this method is {@link ImmutableSet#of()}.
       */
      // Casting to any type is safe since there are no actual elements.
      @SuppressWarnings("unchecked")
      static <T extends @Nullable Object> UnmodifiableListIterator<T> emptyListIterator() {
        return (UnmodifiableListIterator<T>) ArrayItr.EMPTY;
      }
    
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Tue Jan 30 00:14:39 GMT 2024
    - 50.5K bytes
    - Viewed (0)
Back to top