- Sort Score
- Result 10 results
- Languages All
Results 261 - 270 of 534 for safety (0.04 sec)
-
android/guava/src/com/google/common/util/concurrent/NullnessCasts.java
@GwtCompatible @ElementTypesAreNonnullByDefault final class NullnessCasts { /** * Accepts a {@code @Nullable T} and returns a plain {@code T}, without performing any check that * that conversion is safe. * * <p>This method is intended to help with usages of type parameters that have {@linkplain * ParametricNullness parametric nullness}. If a type parameter instead ranges over only non-null
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Feb 10 20:36:34 UTC 2022 - 3.9K bytes - Viewed (0) -
guava/src/com/google/common/collect/JdkBackedImmutableMap.java
// be deleted. Map<K, @Nullable V> duplicates = null; int dupCount = 0; for (int i = 0; i < n; i++) { // requireNonNull is safe because the first `n` elements have been filled in. entryArray[i] = makeImmutable(requireNonNull(entryArray[i])); K key = entryArray[i].getKey(); V value = entryArray[i].getValue();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Nov 30 21:54:06 UTC 2023 - 4.8K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/testing/SerializableTester.java
* those sublists might implement a private {@code MySubList} type but serialize as a plain {@code * MyList} to save space. So long as {@code MyList} has all the public supertypes of {@code * MySubList}, this is safe. For these cases, for which {@code reserializeAndAssert} is too * strict, use {@link #reserialize}. * * @return the re-serialized object
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Apr 25 11:57:12 UTC 2023 - 4.1K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/WriteReplaceOverridesTest.java
*/ ) { continue; } Class<?> clazz = info.load(); try { Method unused = clazz.getDeclaredMethod("writeReplace"); continue; // It overrides writeReplace, so it's safe. } catch (NoSuchMethodException e) { // This is a class whose supertypes we want to examine. We'll do that below. } Optional<Class<?>> supersWithPackagePrivateWriteReplace =
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Jul 24 18:53:31 UTC 2024 - 5.2K bytes - Viewed (0) -
guava/src/com/google/common/collect/AbstractIterator.java
@Override @ParametricNullness public final T next() { if (!hasNext()) { throw new NoSuchElementException(); } state = State.NOT_READY; // Safe because hasNext() ensures that tryToComputeNext() has put a T into `next`. T result = uncheckedCastNullableTToT(next); next = null; return result; } /**
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Mar 18 02:04:10 UTC 2022 - 6.4K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/ExplicitOrdering.java
} ExplicitOrdering(ImmutableMap<T, Integer> rankMap) { this.rankMap = rankMap; } @Override public int compare(T left, T right) { return rank(left) - rank(right); // safe because both are nonnegative } private int rank(T value) { Integer rank = rankMap.get(value); if (rank == null) { throw new IncomparableValueException(value); } return rank; }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sun Jun 20 14:22:42 UTC 2021 - 2K bytes - Viewed (0) -
guava/src/com/google/common/collect/ExplicitOrdering.java
} ExplicitOrdering(ImmutableMap<T, Integer> rankMap) { this.rankMap = rankMap; } @Override public int compare(T left, T right) { return rank(left) - rank(right); // safe because both are nonnegative } private int rank(T value) { Integer rank = rankMap.get(value); if (rank == null) { throw new IncomparableValueException(value); } return rank; }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sun Jun 20 14:22:42 UTC 2021 - 2K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/ForwardingMultiset.java
* invoke methods, they invoke methods on the {@code ForwardingMultiset}. * * <p>The {@code standard} methods and any collection views they return are not guaranteed to be * thread-safe, even when all of the methods that they depend on are thread-safe. * * @author Kevin Bourrillion * @author Louis Wasserman * @since 2.0 */ @GwtCompatible @ElementTypesAreNonnullByDefault
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri May 12 15:26:39 UTC 2023 - 10.4K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/AbstractAbstractFutureTest.java
future.set(1); assertEquals(1, future.get(-1, SECONDS).intValue()); } @J2ktIncompatible @GwtIncompatible // threads public void testOverflowTimeout() throws Exception { // First, sanity check that naive multiplication would really overflow to a negative number: long nanosPerSecond = NANOSECONDS.convert(1, SECONDS); assertThat(nanosPerSecond * Long.MAX_VALUE).isLessThan(0L);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 21 15:41:36 UTC 2024 - 15.5K bytes - Viewed (0) -
src/main/java/jcifs/smb/BufferCacheImpl.java
* * @see jcifs.BufferCache#releaseBuffer(byte[]) */ @Override public void releaseBuffer ( byte[] buf ) { if ( buf == null ) { return; } // better safe than sorry: prevent leaks if there is some out of bound access Arrays.fill(buf, (byte) 0); synchronized ( this.cache ) { if ( this.freeBuffers < this.cache.length ) {
Registered: Sun Nov 03 00:10:13 UTC 2024 - Last Modified: Sun Jan 24 11:40:34 UTC 2021 - 2.9K bytes - Viewed (0)