Search Options

Results per page
Sort
Preferred Languages
Advance

Results 371 - 380 of 613 for IllegalArgumentException (0.15 sec)

  1. android/guava/src/com/google/common/util/concurrent/Futures.java

        /*
         * We throw IllegalStateException, since the call could succeed later. Perhaps we "should" throw
         * IllegalArgumentException, since the call could succeed with a different argument. Those
         * exceptions' docs suggest that either is acceptable. Google's Java Practices page recommends
         * IllegalArgumentException here, in part to keep its recommendation simple: Static methods
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 25 13:13:32 UTC 2024
    - 64.7K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/internal/cache/DiskLruCacheTest.kt

        setUp(parameters.first, parameters.second)
        var key = ""
        assertFailsWith<IllegalArgumentException> {
          key = "has_space "
          cache.edit(key)
        }.also { expected ->
          assertThat(expected.message).isEqualTo("keys must match regex [a-z0-9_-]{1,120}: \"$key\"")
        }
        assertFailsWith<IllegalArgumentException> {
          key = "has_CR\r"
          cache.edit(key)
        }.also { expected ->
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Apr 15 14:55:09 UTC 2024
    - 75.8K bytes
    - Viewed (0)
  3. android/guava-testlib/src/com/google/common/collect/testing/google/BiMapEntrySetTester.java

      @CollectionSize.Require(SEVERAL)
      public void testSetValue_valuePresent() {
        for (Entry<K, V> entry : getMap().entrySet()) {
          if (entry.getKey().equals(k0())) {
            assertThrows(IllegalArgumentException.class, () -> entry.setValue(v1()));
          }
        }
        expectUnchanged();
      }
    
      @MapFeature.Require(value = SUPPORTS_PUT, absent = ALLOWS_NULL_VALUES)
      @CollectionSize.Require(absent = ZERO)
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 19:10:20 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/math/DoubleUtilsTest.java

        }
        assertThat(DoubleUtils.ensureNonNegative(Double.POSITIVE_INFINITY)).isPositiveInfinity();
        assertThat(DoubleUtils.ensureNonNegative(Double.NEGATIVE_INFINITY)).isEqualTo(0.0);
        assertThrows(IllegalArgumentException.class, () -> DoubleUtils.ensureNonNegative(Double.NaN));
      }
    
      public void testOneBits() {
        assertEquals(DoubleUtils.ONE_BITS, Double.doubleToRawLongBits(1.0));
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Jul 03 18:10:55 UTC 2024
    - 3K bytes
    - Viewed (0)
  5. guava/src/com/google/common/cache/CacheBuilder.java

       * avoids the need for expensive resizing operations later, but setting this value unnecessarily
       * high wastes memory.
       *
       * @return this {@code CacheBuilder} instance (for chaining)
       * @throws IllegalArgumentException if {@code initialCapacity} is negative
       * @throws IllegalStateException if an initial capacity was already set
       */
      @CanIgnoreReturnValue
      public CacheBuilder<K, V> initialCapacity(int initialCapacity) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 51.6K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/Cookie.kt

        private fun domain(
          domain: String,
          hostOnly: Boolean,
        ) = apply {
          val canonicalDomain =
            domain.toCanonicalHost()
              ?: throw IllegalArgumentException("unexpected domain: $domain")
          this.domain = canonicalDomain
          this.hostOnly = hostOnly
        }
    
        fun path(path: String) =
          apply {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Apr 06 04:12:05 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  7. guava/src/com/google/common/collect/TreeRangeMap.java

              checkNotNull(range);
              throw new IllegalArgumentException(
                  "Cannot insert range " + range + " into an empty subRangeMap");
            }
    
            @Override
            public void putCoalescing(Range<Comparable<?>> range, Object value) {
              checkNotNull(range);
              throw new IllegalArgumentException(
                  "Cannot insert range " + range + " into an empty subRangeMap");
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 26.7K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/net/InternetDomainName.java

       * } catch (IllegalArgumentException e) {
       *   domainName = DEFAULT_DOMAIN;
       * }
       * }</pre>
       *
       * @since 8.0 (previously named {@code isValidLenient})
       */
      public static boolean isValid(String name) {
        try {
          InternetDomainName unused = from(name);
          return true;
        } catch (IllegalArgumentException e) {
          return false;
        }
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Feb 05 20:47:23 UTC 2024
    - 28K bytes
    - Viewed (0)
  9. guava/src/com/google/common/io/BaseEncoding.java

       * inverse operation to {@link #encode(byte[])}.
       *
       * @throws IllegalArgumentException if the input is not a valid encoded string according to this
       *     encoding.
       */
      public final byte[] decode(CharSequence chars) {
        try {
          return decodeChecked(chars);
        } catch (DecodingException badInput) {
          throw new IllegalArgumentException(badInput);
        }
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 41.8K bytes
    - Viewed (0)
  10. guava/src/com/google/common/collect/HashMultiset.java

      }
    
      /**
       * Creates a new, empty {@code HashMultiset} with the specified expected number of distinct
       * elements.
       *
       * @param distinctElements the expected number of distinct elements
       * @throws IllegalArgumentException if {@code distinctElements} is negative
       */
      public static <E extends @Nullable Object> HashMultiset<E> create(int distinctElements) {
        return new HashMultiset<>(distinctElements);
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Apr 01 16:15:01 UTC 2024
    - 3.4K bytes
    - Viewed (0)
Back to top