Search Options

Results per page
Sort
Preferred Languages
Advance

Results 111 - 120 of 143 for setAccessible (0.06 sec)

  1. guava-testlib/src/com/google/common/testing/ForwardingWrapperTester.java

        checkNotNull(wrapperFunction);
        checkArgument(interfaceType.isInterface(), "%s isn't an interface", interfaceType);
        Method[] methods = getMostConcreteMethods(interfaceType);
        AccessibleObject.setAccessible(methods, true);
        for (Method method : methods) {
          // Interfaces can have default methods that aren't abstract.
          // No need to verify them.
          // Can't check isDefault() for Android compatibility.
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 17:27:14 UTC 2025
    - 9.1K bytes
    - Viewed (0)
  2. src/test/java/jcifs/smb/NtlmPasswordAuthenticatorTimingAttackTest.java

            assertNotNull(constantTimeMethod, "constantTimeEquals method should exist");
            constantTimeMethod.setAccessible(true);
    
            // Test the method directly
            char[] password1 = "testpassword".toCharArray();
            char[] password2 = "testpassword".toCharArray();
            char[] password3 = "testpassworX".toCharArray();
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 11.2K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/reflect/Types.java

            if (method.getDeclaringClass().equals(TypeVariableImpl.class)) {
              try {
                method.setAccessible(true);
              } catch (AccessControlException e) {
                // OK: the method is accessible to us anyway. The setAccessible call is only for
                // unusual execution environments where that might not be true.
              }
              builder.put(method.getName(), method);
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Sep 03 14:03:14 UTC 2025
    - 23.6K bytes
    - Viewed (0)
  4. 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);
            }
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 21 04:51:33 UTC 2025
    - 11.5K bytes
    - Viewed (0)
  5. src/test/java/jcifs/internal/smb2/Smb2ConstantsTest.java

            assertTrue(Modifier.isPrivate(constructor.getModifiers()), "Constructor should be private");
    
            // Force accessibility and create instance to achieve coverage
            constructor.setAccessible(true);
            assertNotNull(constructor.newInstance(), "Should be able to create instance via reflection");
        }
    
        @Nested
        @DisplayName("Header Constants")
        class HeaderConstants {
    
            @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 14.1K bytes
    - Viewed (0)
  6. src/test/java/jcifs/smb/SmbSessionImplTest.java

        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) {
                throw new RuntimeException(e);
            }
        }
    
        @Test
        @DisplayName("getters and basic state (happy path)")
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 12.5K bytes
    - Viewed (0)
  7. 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 {@link
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Jul 14 14:44:08 UTC 2025
    - 24.9K bytes
    - Viewed (0)
  8. 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);
    
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Sat Jul 12 07:34:10 UTC 2025
    - 12.9K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/collect/Serialization.java

      // Secret sauce for setting final fields; don't make it public.
      static final class FieldSetter<T> {
        private final Field field;
    
        private FieldSetter(Field field) {
          this.field = field;
          field.setAccessible(true);
        }
    
        void set(T instance, Object value) {
          try {
            field.set(instance, value);
          } catch (IllegalAccessException impossible) {
            throw new AssertionError(impossible);
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sun Dec 22 03:38:46 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  10. 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
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 13.9K bytes
    - Viewed (0)
Back to top