- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 27 for defensively (1.22 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) -
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) -
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) -
src/test/java/jcifs/smb1/smb1/AllocInfoTest.java
assertEquals(capacity, mockAllocInfo.getCapacity()); } /** * Null pointer scenario – calls on a null reference should raise * {@link NullPointerException}. This test is defensive; in real code it * would likely be handled elsewhere. */ @Test @DisplayName("calling getters on null reference throws NPE") void testNullReference() { AllocInfo nullRef = null;
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 2.4K bytes - Viewed (0) -
src/test/java/jcifs/smb/SessionSetupHandlerTest.java
} @Test @DisplayName("Invalid: resolving class by null name throws NPE") void testClassForNameWithNull() { // Intent: demonstrate defensive behavior with null when resolving this type by name assertThrows(NullPointerException.class, () -> Class.forName(null)); } @Test @DisplayName("Happy path: class is loadable via fully qualified name")
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 4.3K bytes - Viewed (0)