Search Options

Results per page
Sort
Preferred Languages
Advance

Results 101 - 110 of 143 for setAccessible (0.07 sec)

  1. src/test/java/org/codelibs/fess/helper/KeyMatchHelperTest.java

        public void test_toLowerCase_privateMethod() throws Exception {
            // Test private method using reflection
            Method method = KeyMatchHelper.class.getDeclaredMethod("toLowerCase", String.class);
            method.setAccessible(true);
    
            String result = (String) method.invoke(keyMatchHelper, "JAVA");
            assertEquals("java", result);
    
            result = (String) method.invoke(keyMatchHelper, "Mixed_Case");
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Sat Jul 19 23:49:30 UTC 2025
    - 10.1K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureFallbackAtomicHelperTest.java

        Class<?> abstractFutureStateClass = classLoader.loadClass(AbstractFutureState.class.getName());
        Method helperMethod = abstractFutureStateClass.getDeclaredMethod("atomicHelperTypeForTest");
        helperMethod.setAccessible(true);
        assertThat(helperMethod.invoke(null)).isEqualTo(expectedHelperClassName);
      }
    
      private static ClassLoader getClassLoader(Set<String> disallowedClassNames) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 8.1K bytes
    - Viewed (0)
  3. src/test/java/jcifs/smb/SmbRandomAccessFileTest.java

                f.setAccessible(true);
                return f.get(target);
            } catch (Exception e) {
                throw new RuntimeException(e);
            }
        }
    
        private static void setField(Object target, String name, Object value) {
            try {
                var f = target.getClass().getDeclaredField(name);
                f.setAccessible(true);
                f.set(target, value);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 18.1K bytes
    - Viewed (0)
  4. src/test/java/jcifs/internal/smb1/trans/TransCallNamedPipeResponseTest.java

        @Test
        void testGetResponseLength() throws Exception {
            // Use reflection to set dataCount
            Field dataCountField = SmbComTransactionResponse.class.getDeclaredField("dataCount");
            dataCountField.setAccessible(true);
            dataCountField.setInt(response, 42);
    
            assertEquals(42, response.getResponseLength());
        }
    
        @Test
        void testGetResponseLengthWithZeroDataCount() {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 8.8K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/cache/Striped64.java

                @Override
                public Unsafe run() throws Exception {
                  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);
                  }
                  throw new NoSuchFieldError("the Unsafe");
                }
              });
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Jan 15 22:17:15 UTC 2025
    - 11.4K bytes
    - Viewed (0)
  6. 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);
                        }
                      }
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Feb 12 03:49:18 UTC 2025
    - 12.3K bytes
    - Viewed (0)
  7. src/main/java/jcifs/smb/SmbOperationException.java

            // Package-private setter for attempt number
            try {
                java.lang.reflect.Field field = SmbOperationException.class.getDeclaredField("attemptNumber");
                field.setAccessible(true);
                field.set(this, attemptNumber);
            } catch (Exception e) {
                // Ignore
            }
        }
    
        private static String formatMessage(ErrorCode errorCode, String message) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 16.5K bytes
    - Viewed (0)
  8. guava-testlib/src/com/google/common/testing/ArbitraryInstances.java

        }
        Constructor<T> constructor;
        try {
          constructor = type.getConstructor();
        } catch (NoSuchMethodException e) {
          return arbitraryConstantInstanceOrNull(type);
        }
        constructor.setAccessible(true); // accessibility check is too slow
        try {
          return constructor.newInstance();
        } catch (InstantiationException | IllegalAccessException impossible) {
          throw new AssertionError(impossible);
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Jul 16 17:42:14 UTC 2025
    - 21.4K bytes
    - Viewed (0)
  9. src/test/java/org/codelibs/fess/job/SuggestJobTest.java

                    java.lang.reflect.Field propField =
                            org.lastaflute.core.direction.ObjectiveConfig.class.getDeclaredField("_javaPropertiesResult");
                    propField.setAccessible(true);
    
                    // Create a mock JavaPropertiesResult
                    java.util.Properties props = new java.util.Properties();
                    props.setProperty("job.max.crawler.processes", "5");
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Tue Aug 19 14:09:36 UTC 2025
    - 31.4K bytes
    - Viewed (0)
  10. src/test/java/jcifs/smb/SecurityBlobTest.java

            // Force internal field to null via reflection to exercise defensive branch
            Field field = SecurityBlob.class.getDeclaredField("b");
            field.setAccessible(true);
            field.set(blob, null);
    
            // Act & Assert
            assertEquals(0, blob.length(), "length() should return 0 when internal array is null");
        }
    
        @Spy
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 9.4K bytes
    - Viewed (0)
Back to top