Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 781 - 790 of 3,522 for throwIf (0.06 seconds)

  1. samples/guide/src/main/java/okhttp3/recipes/SynchronousGet.java

      private final OkHttpClient client = new OkHttpClient();
    
      public void run() throws Exception {
        Request request = new Request.Builder()
            .url("https://publicobject.com/helloworld.txt")
            .build();
    
        try (Response response = client.newCall(request).execute()) {
          if (!response.isSuccessful()) throw new IOException("Unexpected code " + response);
    
          Headers responseHeaders = response.headers();
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Sun May 22 01:29:42 GMT 2016
    - 1.5K bytes
    - Click Count (0)
  2. impl/maven-cli/src/test/java/org/apache/maven/cling/invoker/mvnup/goals/StrategyOrchestratorTest.java

            @DisplayName("should handle strategy exceptions gracefully")
            void shouldHandleStrategyExceptionsGracefully() throws Exception {
                UpgradeContext context = createMockContext();
                Map<Path, Document> pomMap = Map.of(Paths.get("pom.xml"), mock(Document.class));
    
                // Mock first strategy to throw exception
                when(mockStrategies.get(0).isApplicable(context)).thenReturn(true);
    Created: Sun Apr 05 03:35:12 GMT 2026
    - Last Modified: Tue Nov 18 18:03:26 GMT 2025
    - 12.3K bytes
    - Click Count (0)
  3. compat/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptor.java

            this.pluginArtifact = pluginArtifact;
        }
    
        public Lifecycle getLifecycleMapping(String lifecycleId) throws IOException, XMLStreamException {
            return getLifecycleMappings().get(lifecycleId);
        }
    
        public Map<String, Lifecycle> getLifecycleMappings() throws IOException, XMLStreamException {
            if (lifecycleMappings == null) {
                LifecycleConfiguration lifecycleConfiguration;
    
    Created: Sun Apr 05 03:35:12 GMT 2026
    - Last Modified: Fri Jun 06 14:28:57 GMT 2025
    - 16.2K bytes
    - Click Count (0)
  4. samples/guide/src/main/java/okhttp3/recipes/ParseResponseWithMoshi.java

      private final JsonAdapter<Gist> gistJsonAdapter = moshi.adapter(Gist.class);
    
      public void run() throws Exception {
        Request request = new Request.Builder()
            .url("https://api.github.com/gists/c2a7c39532239ff261be")
            .build();
        try (Response response = client.newCall(request).execute()) {
          if (!response.isSuccessful()) throw new IOException("Unexpected code " + response);
    
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Sun May 22 01:29:42 GMT 2016
    - 1.8K bytes
    - Click Count (0)
  5. guava-testlib/src/com/google/common/collect/testing/MinimalCollection.java

      public boolean addAll(Collection<? extends E> elementsToAdd) {
        throw up();
      }
    
      @Override
      public boolean removeAll(Collection<?> elementsToRemove) {
        throw up();
      }
    
      @Override
      public boolean retainAll(Collection<?> elementsToRetain) {
        throw up();
      }
    
      @Override
      public void clear() {
        throw up();
      }
    
      private static UnsupportedOperationException up() {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 23 21:06:42 GMT 2026
    - 3.8K bytes
    - Click Count (0)
  6. compat/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/conflict/DefaultConflictResolverFactory.java

         */
    
        @Override
        public ConflictResolver getConflictResolver(String type) throws ConflictResolverNotFoundException {
            try {
                return (ConflictResolver) container.lookup(ConflictResolver.ROLE, type);
            } catch (ComponentLookupException exception) {
                throw new ConflictResolverNotFoundException("Cannot find conflict resolver of type: " + type);
            }
        }
    
    Created: Sun Apr 05 03:35:12 GMT 2026
    - Last Modified: Fri Jun 06 14:28:57 GMT 2025
    - 2.8K bytes
    - Click Count (0)
  7. guava/src/com/google/common/cache/CacheBuilder.java

       *     removed
       * @return this {@code CacheBuilder} instance (for chaining)
       * @throws IllegalArgumentException if {@code duration} is negative
       * @throws IllegalStateException if {@link #expireAfterWrite} was already set
       * @throws ArithmeticException for durations greater than +/- approximately 292 years
       * @since 25.0 (but only since 33.3.0 in the Android <a
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Feb 23 13:13:59 GMT 2026
    - 51.7K bytes
    - Click Count (0)
  8. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/tls/BasicCertificateChainCleaner.kt

    ) : CertificateChainCleaner() {
      /**
       * Returns a cleaned chain for [chain].
       *
       * This method throws if the complete chain to a trusted CA certificate cannot be constructed.
       * This is unexpected unless the trust root index in this class has a different trust manager than
       * what was used to establish [chain].
       */
      @Throws(SSLPeerUnverifiedException::class)
      override fun clean(
        chain: List<Certificate>,
        hostname: String,
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Wed Mar 19 19:25:20 GMT 2025
    - 4.8K bytes
    - Click Count (0)
  9. src/test/java/org/codelibs/fess/score/LtrQueryRescorerTest.java

        private LtrQueryRescorer ltrQueryRescorer;
    
        @Override
        protected void setUp(TestInfo testInfo) throws Exception {
            super.setUp(testInfo);
            ltrQueryRescorer = new LtrQueryRescorer();
        }
    
        @Override
        protected void tearDown(TestInfo testInfo) throws Exception {
            ComponentUtil.setFessConfig(null);
            super.tearDown(testInfo);
        }
    
        @Test
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Fri Mar 13 23:01:26 GMT 2026
    - 11.7K bytes
    - Click Count (0)
  10. android/guava-testlib/src/com/google/common/testing/ForwardingWrapperTester.java

                      throws Throwable {
                    throw exception;
                  }
                });
        T wrapper = wrapperFunction.apply(proxy);
        try {
          method.invoke(wrapper, getParameterValues(method));
          fail(method + " failed to throw exception as is.");
        } catch (InvocationTargetException e) {
          if (exception != e.getCause()) {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue May 13 17:27:14 GMT 2025
    - 9.1K bytes
    - Click Count (0)
Back to Top