Search Options

Results per page
Sort
Preferred Languages
Advance

Results 81 - 90 of 143 for setAccessible (0.35 sec)

  1. src/test/java/jcifs/smb1/smb1/SmbComWriteTest.java

         */
        private Object getFieldValue(Object obj, String fieldName) {
            try {
                Field field = SmbComWrite.class.getDeclaredField(fieldName);
                field.setAccessible(true);
                return field.get(obj);
            } catch (Exception e) {
                throw new RuntimeException("Failed to access field " + fieldName, e);
            }
        }
    
        /**
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5.8K bytes
    - Viewed (0)
  2. src/test/java/jcifs/internal/smb2/ServerMessageBlock2ResponseTest.java

                // Workaround: Use reflection to set private status field
                try {
                    java.lang.reflect.Field statusField = ServerMessageBlock2.class.getDeclaredField("status");
                    statusField.setAccessible(true);
                    statusField.set(this, status);
                } catch (Exception e) {
                    throw new RuntimeException(e);
                }
            }
    
            public void setFlagsForTest(int flags) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 19.3K bytes
    - Viewed (0)
  3. src/test/java/jcifs/internal/smb1/com/SmbComNTCreateAndXTest.java

         */
        private static Object getPrivateField(Object target, String name) {
            try {
                java.lang.reflect.Field f = target.getClass().getDeclaredField(name);
                f.setAccessible(true);
                return f.get(target);
            } catch (Exception e) {
                throw new RuntimeException(e);
            }
        }
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5.6K bytes
    - Viewed (0)
  4. src/test/java/jcifs/smb1/https/HandlerTest.java

                // When
                Method method = Handler.class.getDeclaredMethod("getDefaultPort");
    
                // Then
                assertTrue(Modifier.isProtected(method.getModifiers()));
                method.setAccessible(true);
                assertEquals(443, method.invoke(testHandler));
            }
    
            @Test
            @DisplayName("Should maintain inheritance hierarchy")
            void testInheritanceHierarchy() {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 6.2K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/base/internal/Finalizer.java

      }
    
      private static @Nullable Field getInheritableThreadLocalsField() {
        try {
          Field inheritableThreadLocals = Thread.class.getDeclaredField("inheritableThreadLocals");
          inheritableThreadLocals.setAccessible(true);
          return inheritableThreadLocals;
        } catch (Throwable t) {
          logger.log(
              Level.INFO,
              "Couldn't access Thread.inheritableThreadLocals. Reference finalizer threads will "
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sun Dec 22 03:38:46 UTC 2024
    - 9.3K bytes
    - Viewed (0)
  6. src/test/java/jcifs/netbios/LmhostsTest.java

            lmhosts.populate(new StringReader(content), mockContext);
    
            // Access the internal table to verify entries were added
            Field tableField = Lmhosts.class.getDeclaredField("table");
            tableField.setAccessible(true);
            Map<Name, NbtAddress> table = (Map<Name, NbtAddress>) tableField.get(lmhosts);
    
            Name name1 = new Name(mockConfig, "HOST1", 0x20, null);
            Name name2 = new Name(mockConfig, "HOST2", 0x20, null);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 18.2K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureCancellationCauseTest.java

        Method tryInternalFastPathGetFailureMethod =
            abstractFutureClass.getDeclaredMethod("tryInternalFastPathGetFailure");
        tryInternalFastPathGetFailureMethod.setAccessible(true);
        return (Throwable) tryInternalFastPathGetFailureMethod.invoke(future);
      }
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 6.1K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/util/concurrent/AbstractFutureCancellationCauseTest.java

        Method tryInternalFastPathGetFailureMethod =
            abstractFutureClass.getDeclaredMethod("tryInternalFastPathGetFailure");
        tryInternalFastPathGetFailureMethod.setAccessible(true);
        return (Throwable) tryInternalFastPathGetFailureMethod.invoke(future);
      }
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 6.1K bytes
    - Viewed (0)
  9. 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/org/codelibs/fess/mylasta/direction/sponsor/FessCurtainBeforeHookTest.java

            try {
                // Try to access the field, handling potential security restrictions
                Field field = DBFluteSystem.class.getDeclaredField("finalTimeZoneProvider");
                field.setAccessible(true);
                return (DfFinalTimeZoneProvider) field.get(null);
            } catch (NoSuchFieldException e) {
                // Field might not exist in this version, return null
                return null;
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Tue Aug 19 14:09:36 UTC 2025
    - 8.1K bytes
    - Viewed (0)
Back to top