Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 51 - 60 of 167 for setAccessible (0.06 seconds)

  1. compat/maven-compat/src/main/java/org/apache/maven/project/interpolation/StringSearchModelInterpolator.java

                        Class<?> type = field.getType();
                        if (isQualifiedForInterpolation(field, type)) {
                            boolean isAccessible = field.isAccessible();
                            field.setAccessible(true);
                            try {
                                try {
                                    if (String.class == type) {
                                        String value = (String) field.get(target);
    Created: Sun Apr 05 03:35:12 GMT 2026
    - Last Modified: Mon Sep 29 14:45:25 GMT 2025
    - 14.1K bytes
    - Click Count (0)
  2. src/test/java/org/codelibs/fess/app/web/api/admin/scheduler/ApiAdminSchedulerActionTest.java

            responseField.setAccessible(true);
            final Object response = responseField.get(apiResult);
            assertTrue(response instanceof ApiStartJobResponse);
    
            final Field jobLogIdField = ApiStartJobResponse.class.getDeclaredField("jobLogId");
            jobLogIdField.setAccessible(true);
            return (String) jobLogIdField.get(response);
        }
    
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Sat Mar 28 11:55:54 GMT 2026
    - 13K bytes
    - Click Count (0)
  3. src/test/java/jcifs/internal/smb1/com/SmbComNegotiateResponseTest.java

        private void setByteCount(SmbComNegotiateResponse response, int byteCount) {
            try {
                Field field = response.getClass().getSuperclass().getDeclaredField("byteCount");
                field.setAccessible(true);
                field.set(response, byteCount);
            } catch (Exception e) {
                throw new RuntimeException("Failed to set byteCount field", e);
            }
        }
    
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 11.4K bytes
    - Click Count (0)
  4. src/test/java/jcifs/internal/smb1/com/SmbComSessionSetupAndXTest.java

        private static Object getField(Object target, String name) {
            try {
                var f = target.getClass().getDeclaredField(name);
                f.setAccessible(true);
                return f.get(target);
            } catch (Exception e) {
                fail("access field " + name, e);
                return null;
            }
        }
    
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 6.4K bytes
    - Click Count (0)
  5. src/test/java/jcifs/smb1/smb1/Trans2GetDfsReferralTest.java

            Class<?> clazz = target.getClass();
            while (clazz != null) {
                try {
                    Field f = clazz.getDeclaredField(fieldName);
                    f.setAccessible(true);
                    return f.get(target);
                } catch (NoSuchFieldException e) {
                    clazz = clazz.getSuperclass();
                }
            }
            throw new NoSuchFieldException(fieldName);
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 5.6K bytes
    - Click Count (0)
  6. src/test/java/jcifs/internal/smb2/tree/Smb2TreeDisconnectRequestTest.java

            // Then - verify command is set correctly using reflection
            Field commandField = ServerMessageBlock2.class.getDeclaredField("command");
            commandField.setAccessible(true);
            int command = (int) commandField.get(req);
    
            assertEquals(SMB2_TREE_DISCONNECT, command);
        }
    
        @Test
        @DisplayName("Should create proper response object")
    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)
  7. src/test/java/jcifs/http/HandlerTest.java

            Field factoryField = Handler.class.getDeclaredField("factory");
            factoryField.setAccessible(true);
            factoryField.set(null, null);
    
            // Clear the protocol handlers cache
            Field handlersField = Handler.class.getDeclaredField("PROTOCOL_HANDLERS");
            handlersField.setAccessible(true);
            @SuppressWarnings("unchecked")
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 11.1K bytes
    - Click Count (0)
  8. src/test/java/jcifs/internal/smb1/com/SmbComQueryInformationResponseTest.java

        // Helper methods for reflection
        private void setFieldValue(Object obj, String fieldName, Object value) {
            try {
                Field field = findField(obj.getClass(), fieldName);
                field.setAccessible(true);
                field.set(obj, value);
            } catch (Exception e) {
                throw new RuntimeException("Failed to set field " + fieldName, e);
            }
        }
    
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 11.9K bytes
    - Click Count (0)
  9. src/test/java/jcifs/internal/smb2/info/Smb2QueryDirectoryResponseTest.java

            // Use reflection to set the results field
            Field resultsField = Smb2QueryDirectoryResponse.class.getDeclaredField("results");
            resultsField.setAccessible(true);
            FileEntry[] entries = new FileEntry[] { mock(FileBothDirectoryInfo.class), mock(FileBothDirectoryInfo.class) };
            resultsField.set(response, entries);
    
            FileEntry[] results = response.getResults();
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 23.5K bytes
    - Click Count (0)
  10. src/test/java/jcifs/smb/DirFileEntryEnumIterator2Test.java

            Class<?> cls = req.getClass().getSuperclass(); // ServerMessageBlock2Request
            Field f = cls.getSuperclass().getDeclaredField("next"); // ServerMessageBlock2.next
            f.setAccessible(true);
            return f.get(req);
        }
    
        /**
         * Reflectively set the private 'results' field on Smb2QueryDirectoryResponse.
         */
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 13.7K bytes
    - Click Count (0)
Back to Top