Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for addSuppressed (0.06 sec)

  1. android/guava/src/com/google/common/io/Closer.java

       * addSuppressed(Throwable) mechanism.
       */
      private static final Suppressor SUPPRESSING_SUPPRESSOR =
          (closeable, thrown, suppressed) -> {
            // ensure no exceptions from addSuppressed
            if (thrown == suppressed) {
              return;
            }
            try {
              thrown.addSuppressed(suppressed);
            } catch (Throwable e) {
              /*
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Mar 17 20:26:29 UTC 2025
    - 10.3K bytes
    - Viewed (0)
  2. fess-crawler/src/test/java/org/codelibs/fess/crawler/exception/CrawlerSystemExceptionTest.java

            Exception suppressed1 = new IllegalArgumentException("Suppressed 1");
            Exception suppressed2 = new IOException("Suppressed 2");
            mainException.addSuppressed(suppressed1);
            mainException.addSuppressed(suppressed2);
    
            Throwable[] suppressedExceptions = mainException.getSuppressed();
            assertEquals(2, suppressedExceptions.length);
    Registered: Sun Sep 21 03:50:09 UTC 2025
    - Last Modified: Wed Sep 03 14:42:53 UTC 2025
    - 20K bytes
    - Viewed (0)
  3. src/test/java/jcifs/RuntimeCIFSExceptionTest.java

            RuntimeCIFSException mainException = new RuntimeCIFSException("Main error");
            RuntimeException suppressedException = new RuntimeException("Suppressed error");
    
            // When
            mainException.addSuppressed(suppressedException);
    
            // Then
            Throwable[] suppressed = mainException.getSuppressed();
            assertEquals(1, suppressed.length);
            assertEquals(suppressedException, suppressed[0]);
        }
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 10.2K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/io/CloserTest.java

       */
      private void assertSuppressed(Suppression... expected) {
        assertEquals(ImmutableList.copyOf(expected), suppressor.suppressions);
      }
    
      // TODO(cpovirk): Just use addSuppressed+getSuppressed now that we can rely on it.
      /** Suppressor that records suppressions. */
      private static class TestSuppressor implements Closer.Suppressor {
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Jul 16 17:42:14 UTC 2025
    - 11.8K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/io/CloserTest.java

       */
      private void assertSuppressed(Suppression... expected) {
        assertEquals(ImmutableList.copyOf(expected), suppressor.suppressions);
      }
    
      // TODO(cpovirk): Just use addSuppressed+getSuppressed now that we can rely on it.
      /** Suppressor that records suppressions. */
      private static class TestSuppressor implements Closer.Suppressor {
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Jul 16 17:42:14 UTC 2025
    - 11.8K bytes
    - Viewed (0)
  6. okhttp-testing-support/src/main/kotlin/okhttp3/OkHttpClientTestRule.kt

            val addresses = Dns.SYSTEM.lookup(hostname)
            listOf(addresses[0])
          }
    
        private operator fun Throwable?.plus(throwable: Throwable): Throwable {
          if (this != null) {
            addSuppressed(throwable)
            return this
          }
          return throwable
        }
      }
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri May 30 21:28:20 UTC 2025
    - 10.5K bytes
    - Viewed (0)
  7. src/main/java/jcifs/util/transport/Transport.java

            } catch (final IOException ioe) {
                log.warn("sendrecv failed", ioe);
                try {
                    disconnect(true);
                } catch (final IOException ioe2) {
                    ioe.addSuppressed(ioe2);
                    log.info("disconnect failed", ioe2);
                }
                throw ioe;
            } catch (final InterruptedException ie) {
                throw new TransportException(ie);
            } finally {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 27.8K bytes
    - Viewed (0)
  8. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/-UtilCommon.kt

    internal fun <E> MutableList<E>.addIfAbsent(element: E) {
      if (!contains(element)) add(element)
    }
    
    internal fun Exception.withSuppressed(suppressed: List<Exception>): Throwable =
      apply {
        for (e in suppressed) addSuppressed(e)
      }
    
    internal inline fun <T> Iterable<T>.filterList(predicate: T.() -> Boolean): List<T> {
      var result: List<T> = emptyList()
      for (i in this) {
        if (predicate(i)) {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon May 05 16:01:00 UTC 2025
    - 10.1K bytes
    - Viewed (0)
  9. src/main/java/jcifs/smb/SmbTreeImpl.java

                try {
                    transport.disconnect(true);
                } catch (final IOException e) {
                    log.warn("Failed to disconnect transport", e);
                    se.addSuppressed(e);
                }
                throw se;
            }
        }
    
        /**
         * @param trans
         * @param sess
         * @throws CIFSException
         *
         */
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 30K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/util/concurrent/ServiceManager.java

                        + Multimaps.filterKeys(servicesByState, not(equalTo(RUNNING))));
            for (Service service : servicesByState.get(State.FAILED)) {
              exception.addSuppressed(new FailedService(service));
            }
            throw exception;
          }
        }
      }
    
      /**
       * A {@link Service} that wraps another service and times how long it takes for it to start and
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 17:27:14 UTC 2025
    - 33.2K bytes
    - Viewed (1)
Back to top