- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 30 for defensively (0.05 sec)
-
guava/src/com/google/common/base/Predicates.java
* {@code true}. The components are evaluated in order, and evaluation will be "short-circuited" * as soon as a false predicate is found. It defensively copies the iterable passed in, so future * changes to it won't alter the behavior of this predicate. If {@code components} is empty, the * returned predicate will always evaluate to {@code true}. *
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 26.6K bytes - Viewed (0) -
android/guava/src/com/google/common/hash/HashCode.java
return hash == that.asLong(); } private static final long serialVersionUID = 0; } /** * Creates a {@code HashCode} from a byte array. The array is defensively copied to preserve the * immutability contract of {@code HashCode}. The array cannot be empty. * * @since 15.0 (since 12.0 in HashCodes) */ public static HashCode fromBytes(byte[] bytes) {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Aug 11 19:31:30 UTC 2025 - 12.6K bytes - Viewed (0) -
guava/src/com/google/common/collect/ImmutableEnumSet.java
final EnumSet<E> delegate; EnumSerializedForm(EnumSet<E> delegate) { this.delegate = delegate; } Object readResolve() { // EJ2 #76: Write readObject() methods defensively. return new ImmutableEnumSet<E>(delegate.clone()); } @GwtIncompatible @J2ktIncompatible private static final long serialVersionUID = 0; }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 4.5K bytes - Viewed (0) -
src/test/java/jcifs/internal/SmbBasicFileInfoTest.java
Assertions.assertThrows(NullPointerException.class, () -> { // Intentionally dereference null to validate exception behavior // This checks that callers must handle null references defensively info.getSize(); }); }
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 5.8K bytes - Viewed (0) -
src/test/java/jcifs/smb/SecurityBlobTest.java
// Uses reflection to set internal array to null to exercise defensive branch in length() @Test @DisplayName("length(): handles internal null defensively") void length_handlesNullInternalArray() throws Exception { // Arrange SecurityBlob blob = new SecurityBlob(new byte[] { 1, 2, 3 }); // Force internal field to null via reflection to exercise defensive branch
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 9.4K bytes - Viewed (0) -
guava/src/com/google/common/util/concurrent/AtomicDoubleArray.java
public class AtomicDoubleArray implements Serializable { private static final long serialVersionUID = 0L; // Making this non-final is the lesser evil according to Effective // Java 2nd Edition Item 76: Write readObject methods defensively. private transient AtomicLongArray longs; /** * Creates a new {@code AtomicDoubleArray} of the given length, with all elements initially zero. * * @param length the length of the array */
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Mar 17 20:26:29 UTC 2025 - 10.2K bytes - Viewed (0) -
src/test/java/jcifs/spnego/SpnegoTokenTest.java
t.setMechanismToken(data); assertArrayEquals(data, t.getMechanismToken(), "mechanismToken should round-trip"); // Document current behavior: no defensive copy (reference exposed) data[0] = 9; assertEquals(9, t.getMechanismToken()[0], "no defensive copy; reflects external mutation"); } @Test @DisplayName("Setter and getter for mechanismListMIC work") void setGetMechanismListMIC() {
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 4.6K bytes - Viewed (0) -
src/test/java/jcifs/ntlmssp/av/AvPairTest.java
// Modify the original raw array raw[0] = 0x05; // Ensure the AvPair's internal raw array is not affected (defensive copy not made) // This test assumes that the AvPair constructor does NOT make a defensive copy of the raw array. // If a defensive copy were made, this test would fail, and the behavior would be more robust.
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 3K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/-HeadersCommon.kt
it } } internal fun commonHeadersOf(vararg inputNamesAndValues: String): Headers { require(inputNamesAndValues.size % 2 == 0) { "Expected alternating header names and values" } // Make a defensive copy and clean it up. val namesAndValues: Array<String> = arrayOf(*inputNamesAndValues) for (i in namesAndValues.indices) { require(namesAndValues[i] != null) { "Headers cannot be null" }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Mon May 05 16:01:00 UTC 2025 - 5.8K bytes - Viewed (0) -
src/test/java/jcifs/ntlmssp/av/AvChannelBindingsTest.java
} /** * Test that the constructor stores the reference to the input byte array. * Note: The implementation does not create a defensive copy. */ @Test void testConstructorStoresReference() { byte[] originalHash = { 0x01, 0x02, 0x03 }; AvChannelBindings avChannelBindings = new AvChannelBindings(originalHash);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 2.4K bytes - Viewed (0)