Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1481 - 1490 of 1,808 for try (0.01 sec)

  1. guava-tests/test/com/google/common/collect/SynchronizedDequeTest.java

      protected Deque<String> create() {
        TestDeque<String> inner = new TestDeque<>();
        Deque<String> outer = Synchronized.deque(inner, inner.mutex);
        outer.add("foo"); // necessary because we try to remove elements later on
        return outer;
      }
    
      private static final class TestDeque<E> implements Deque<E> {
        private final Deque<E> delegate = new LinkedList<>();
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Jul 16 17:42:14 UTC 2025
    - 7.4K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/primitives/SignedBytesTest.java

        assertThat(SignedBytes.saturatedCast(Long.MAX_VALUE)).isEqualTo(GREATEST);
        assertThat(SignedBytes.saturatedCast(Long.MIN_VALUE)).isEqualTo(LEAST);
      }
    
      private static void assertCastFails(long value) {
        try {
          SignedBytes.checkedCast(value);
          fail("Cast to byte should have failed: " + value);
        } catch (IllegalArgumentException ex) {
          assertWithMessage(value + " not found in exception text: " + ex.getMessage())
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 7K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/util/concurrent/AbstractFutureFallbackAtomicHelperTest.java

      private void runTestMethod(ClassLoader classLoader) throws Exception {
        ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader();
    
        Thread.currentThread().setContextClassLoader(classLoader);
        try {
          Class<?> test = classLoader.loadClass(AbstractFutureTest.class.getName());
          test.getMethod(getName()).invoke(test.getDeclaredConstructor().newInstance());
        } finally {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 7.3K bytes
    - Viewed (0)
  4. src/test/java/jcifs/dcerpc/msrpc/MsrpcShareEnumTest.java

            MsrpcShareEnum shareEnum = new MsrpcShareEnum(TEST_SERVER_NAME);
            assertNotNull(shareEnum);
    
            // Verify the server name is properly formatted with double backslashes
            try {
                Field servernameField = srvsvc.ShareEnumAll.class.getDeclaredField("servername");
                servernameField.setAccessible(true);
                String servername = (String) servernameField.get(shareEnum);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 8.1K bytes
    - Viewed (0)
  5. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/ws/WebSocketReader.kt

        // Disable the timeout to read the first byte of a new frame.
        val b0: Int
        val timeoutBefore = source.timeout().timeoutNanos()
        source.timeout().clearTimeout()
        try {
          b0 = source.readByte() and 0xff
        } finally {
          source.timeout().timeout(timeoutBefore, TimeUnit.NANOSECONDS)
        }
    
        opcode = b0 and B0_MASK_OPCODE
        isFinalFrame = b0 and B0_FLAG_FIN != 0
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Tue Jul 29 22:04:11 UTC 2025
    - 9.9K bytes
    - Viewed (0)
  6. okhttp/src/jvmTest/kotlin/okhttp3/RouteFailureTest.kt

        server2.useHttps(handshakeCertificates.sslSocketFactory())
      }
    
      private fun executeSynchronously(request: Request): RecordedResponse {
        val call = client.newCall(request)
        return try {
          val response = call.execute()
          val bodyString = response.body.string()
          RecordedResponse(request, response, null, bodyString, null)
        } catch (e: IOException) {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Jun 20 11:46:46 UTC 2025
    - 11.7K bytes
    - Viewed (0)
  7. android/guava-testlib/test/com/google/common/collect/testing/MapTestSuiteBuilderTests.java

          this.setUpRan = setUpRan;
        }
    
        @Override
        public Object invoke(Object target, Method method, Object[] args) throws Throwable {
          assertTrue("setUp should have run", setUpRan.get());
          try {
            return method.invoke(map, args);
          } catch (InvocationTargetException e) {
            throw e.getCause();
          } catch (IllegalAccessException e) {
            throw newLinkageError(e);
          }
        }
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu May 22 16:18:11 UTC 2025
    - 11.4K bytes
    - Viewed (0)
  8. src/test/java/jcifs/smb/FileEntryAdapterIteratorTest.java

            // Verify iteration
            assertTrue(iterator.hasNext());
            assertSame(resource, iterator.next());
            assertFalse(iterator.hasNext());
    
            // With filter, resource should be closed due to try-with-resources
            verify(filter).accept(resource);
            verify(resource).close();
        }
    
        @Test
        @DisplayName("Iterator with rejecting filter - finds next acceptable")
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 10.6K bytes
    - Viewed (0)
  9. src/test/java/jcifs/internal/smb1/trans/nt/NtTransQuerySecurityDescResponseTest.java

            Class<?> currentClass = response.getClass();
            Field errorCodeField = null;
    
            while (currentClass != null && errorCodeField == null) {
                try {
                    errorCodeField = currentClass.getDeclaredField("errorCode");
                } catch (NoSuchFieldException e) {
                    currentClass = currentClass.getSuperclass();
                }
            }
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 10.8K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/util/concurrent/Futures.java

            return applyTransformation(input.get(timeout, unit));
          }
    
          private O applyTransformation(I input) throws ExecutionException {
            try {
              return function.apply(input);
            } catch (Throwable t) {
              // Any Exception is either a RuntimeException or sneaky checked exception.
              throw new ExecutionException(t);
            }
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 64.3K bytes
    - Viewed (0)
Back to top