- Sort Score
- Num 10 results
- Language All
Results 131 - 140 of 167 for setAccessible (0.06 seconds)
-
src/test/java/org/codelibs/fess/util/SystemUtilTest.java
assertTrue("Constructor should be private", java.lang.reflect.Modifier.isPrivate(constructor.getModifiers())); // Test that constructor is accessible when made accessible constructor.setAccessible(true); SystemUtil instance = constructor.newInstance(); assertNotNull(instance);
Created: Tue Mar 31 13:07:34 GMT 2026 - Last Modified: Sun Jan 11 08:43:05 GMT 2026 - 17.1K bytes - Click Count (0) -
src/test/java/jcifs/internal/smb2/tree/Smb2TreeDisconnectResponseTest.java
// Initially not received Method isReceivedMethod = ServerMessageBlock2Response.class.getDeclaredMethod("isReceived"); isReceivedMethod.setAccessible(true); assertFalse((boolean) isReceivedMethod.invoke(response)); // Test reset method response.reset(); assertFalse((boolean) isReceivedMethod.invoke(response)); }Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 14.1K bytes - Click Count (0) -
src/test/java/jcifs/internal/smb2/ServerMessageBlock2RequestTest.java
try { // Use reflection to set the protected length field java.lang.reflect.Field lengthField = ServerMessageBlock2.class.getDeclaredField("length"); lengthField.setAccessible(true); lengthField.setInt(this, length); } catch (Exception e) { throw new RuntimeException(e); } } @OverrideCreated: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 15.7K bytes - Click Count (0) -
src/test/java/jcifs/smb/SmbFileInputStreamTest.java
// Reflectively inspect the private 'offset' field to assert it used the advanced fp Field offField = Smb2ReadRequest.class.getDeclaredField("offset"); offField.setAccessible(true); long offVal = offField.getLong(req); assertEquals(2L, offVal, "Request offset should match skipped bytes"); } @TestCreated: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 07:14:38 GMT 2025 - 12.8K bytes - Click Count (0) -
src/test/java/jcifs/http/NtlmServletTest.java
try { java.lang.reflect.Field transportContextField = NtlmServlet.class.getDeclaredField("transportContext"); transportContextField.setAccessible(true); transportContextField.set(ntlmServlet, cifsContext); } catch (Exception e) { throw new RuntimeException("Failed to inject mock CIFSContext", e); }Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 21 04:51:33 GMT 2025 - 11.5K bytes - Click Count (0) -
impl/maven-core/src/main/java/org/apache/maven/internal/impl/SisuDiBridgeModule.java
if ("org.eclipse.sisu.inject.LazyBeanEntry" .equals(entry.getClass().getName())) { Field f = entry.getClass().getDeclaredField("binding"); f.setAccessible(true); Object b = f.get(entry); return !(b instanceof ProviderInstanceBinding<?> pib) || !(pib.getUserSuppliedProvider() instanceof BridgeProvider<?>);
Created: Sun Apr 05 03:35:12 GMT 2026 - Last Modified: Wed Sep 17 16:01:38 GMT 2025 - 11.4K bytes - Click Count (0) -
android/guava-testlib/src/com/google/common/testing/NullPointerTester.java
* * @param instance the instance to invoke {@code method} on, or null if {@code method} is static */ public void testMethodParameter(@Nullable Object instance, Method method, int paramIndex) { method.setAccessible(true); testParameter(instance, invokable(instance, method), paramIndex, method.getDeclaringClass()); } /** * Verifies that {@code ctor} produces a {@link NullPointerException} or {@linkCreated: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Jul 14 14:44:08 GMT 2025 - 24.9K bytes - Click Count (0) -
src/test/java/jcifs/netbios/NodeStatusRequestTest.java
assertFalse(nodeStatusRequest.isBroadcast); // Verify config is set through parent constructor Field configField = NameServicePacket.class.getDeclaredField("config"); configField.setAccessible(true); assertSame(mockConfig, configField.get(nodeStatusRequest)); } @Test void writeBodyWireFormat_shouldTemporarilySetHexCodeToZero() { // Arrange
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 13.9K bytes - Click Count (0) -
impl/maven-core/src/main/java/org/apache/maven/configuration/internal/EnhancedCompositeBeanHelper.java
* Set field value with cached accessibility. */ private void setFieldValue(Object bean, Field field, Object value) throws IllegalAccessException { if (!field.canAccess(bean)) { field.setAccessible(true); } field.set(bean, value); } /** * Clear all caches. Useful for testing or memory management. */ public static void clearCaches() {Created: Sun Apr 05 03:35:12 GMT 2026 - Last Modified: Wed Nov 12 14:59:46 GMT 2025 - 12.3K bytes - Click Count (0) -
android/guava/src/com/google/common/hash/LittleEndianByteArray.java
(PrivilegedExceptionAction<Unsafe>) () -> { Class<Unsafe> k = Unsafe.class; for (Field f : k.getDeclaredFields()) { f.setAccessible(true); Object x = f.get(null); if (k.isInstance(x)) { return k.cast(x); } }
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Wed Apr 01 17:27:13 GMT 2026 - 10.1K bytes - Click Count (0)