- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 109 for getDeclaredField (0.1 sec)
-
src/test/java/jcifs/context/SingletonContextTest.java
// Use reflection to reset the singleton instance between tests @BeforeEach @AfterEach void resetSingleton() { try { Field instance = SingletonContext.class.getDeclaredField("INSTANCE"); instance.setAccessible(true); instance.set(null, null); } catch (NoSuchFieldException | IllegalAccessException e) {Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 7.9K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb1/com/SmbComLockingAndXTest.java
/** * Helper for setting a field via reflection. */ private static void setField(Object target, String name, Object value) { try { Field f = target.getClass().getDeclaredField(name); f.setAccessible(true); f.set(target, value); } catch (Exception e) { fail("Failed to set field '" + name + "'", e); } } /**Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 7.1K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/create/Smb2CloseResponseTest.java
// Then - use reflection to verify private fields Field closeFlagsField = Smb2CloseResponse.class.getDeclaredField("closeFlags"); closeFlagsField.setAccessible(true); assertEquals(1, closeFlagsField.get(response)); Field creationTimeField = Smb2CloseResponse.class.getDeclaredField("creationTime"); creationTimeField.setAccessible(true);Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 26.9K bytes - Viewed (0) -
compat/maven-resolver-provider/src/test/java/org/apache/maven/repository/internal/DefaultArtifactDescriptorReaderTest.java
ArgumentCaptor<RepositoryEvent> event = ArgumentCaptor.forClass(RepositoryEvent.class); Field field = DefaultArtifactDescriptorReader.class.getDeclaredField("repositoryEventDispatcher"); field.setAccessible(true); field.set(reader, eventDispatcher); ArtifactDescriptorRequest request = new ArtifactDescriptorRequest();Registered: Sun Dec 28 03:35:09 UTC 2025 - Last Modified: Fri Oct 25 12:31:46 UTC 2024 - 3.2K bytes - Viewed (0) -
src/test/java/org/codelibs/curl/CurlExceptionTest.java
} @Test public void testSerialVersionUID() { assertNotNull(CurlException.class.getDeclaredFields()); boolean hasSerialVersionUID = false; try { CurlException.class.getDeclaredField("serialVersionUID"); hasSerialVersionUID = true; } catch (NoSuchFieldException e) { // Field doesn't exist }Registered: Sat Dec 20 09:13:53 UTC 2025 - Last Modified: Thu Jul 31 01:01:12 UTC 2025 - 4.2K bytes - Viewed (0) -
impl/maven-core/src/test/java/org/apache/maven/configuration/internal/EnhancedCompositeBeanHelperTest.java
when(evaluator.evaluate("fieldValue")).thenReturn("fieldValue"); // Get the field to check its accessibility state java.lang.reflect.Field field = TestBean.class.getDeclaredField("directField"); // Verify field is not accessible initially boolean initialAccessibility = field.canAccess(bean); // Set the property using the helperRegistered: Sun Dec 28 03:35:09 UTC 2025 - Last Modified: Wed Nov 12 14:59:46 UTC 2025 - 8.7K bytes - Viewed (0) -
src/test/java/jcifs/smb1/smb1/SmbComDeleteTest.java
} // Helper method to get private searchAttributes field using reflection private int getSearchAttributes(SmbComDelete smbComDelete) { try { Field field = smbComDelete.getClass().getDeclaredField("searchAttributes"); field.setAccessible(true); return field.getInt(smbComDelete); } catch (Exception e) { throw new RuntimeException("Failed to get searchAttributes field", e);Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 3.4K bytes - Viewed (0) -
build-logic/binary-compatibility/src/main/groovy/gradlebuild/binarycompatibility/JapicmpTaskWithKotlin.java
} // it's easier to do this via reflection than to copy the whole task private void addKotlinCompilerToJapicmpClasspath() { try { Field additionalJapicmpClasspathField = JapicmpTask.class.getDeclaredField("additionalJapicmpClasspath"); additionalJapicmpClasspathField.setAccessible(true);Registered: Wed Dec 31 11:36:14 UTC 2025 - Last Modified: Wed Dec 24 14:15:15 UTC 2025 - 2.3K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/info/Smb2QueryInfoResponseTest.java
void testGetInfo() throws Exception { response = new Smb2QueryInfoResponse(mockConfig, (byte) 1, (byte) 2); // Use reflection to set the info field var infoField = Smb2QueryInfoResponse.class.getDeclaredField("info"); infoField.setAccessible(true); infoField.set(response, mockDecodable); assertEquals(mockDecodable, response.getInfo()); } @Test
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 24.5K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/Smb2EchoRequestTest.java
// Verify command is set to SMB2_ECHO (0x000D) assertEquals(0x000D, request.getCommand()); // Verify configuration is set Field configField = ServerMessageBlock2.class.getDeclaredField("config"); configField.setAccessible(true); assertEquals(mockConfig, configField.get(request)); } @Test @DisplayName("Should handle null configuration")Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 11.3K bytes - Viewed (0)