Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for orElseThrow (0.05 sec)

  1. api/maven-api-cli/src/main/java/org/apache/maven/api/cli/InvokerRequest.java

         * if applicable.
         */
        default boolean effectiveVerbose() {
            return options().isPresent() && options().orElseThrow().verbose().orElse(false)
                    || ciInfo().isPresent() && ciInfo().orElseThrow().isVerbose();
        }
    Registered: Sun Sep 07 03:35:12 UTC 2025
    - Last Modified: Wed Jun 11 13:14:09 UTC 2025
    - 6.7K bytes
    - Viewed (0)
  2. api/maven-api-core/src/main/java/org/apache/maven/api/services/ExtensibleEnumRegistry.java

    public interface ExtensibleEnumRegistry<T extends ExtensibleEnum> extends Service {
        @Nonnull
        Optional<T> lookup(@Nonnull String id);
    
        @Nonnull
        default T require(@Nonnull String id) {
            return lookup(id).orElseThrow(() -> new IllegalArgumentException("Unknown extensible enum value '" + id + "'"));
        }
    Registered: Sun Sep 07 03:35:12 UTC 2025
    - Last Modified: Thu Apr 03 13:33:59 UTC 2025
    - 1.8K bytes
    - Viewed (0)
  3. api/maven-api-core/src/main/java/org/apache/maven/api/services/TypeRegistry.java

         *
         * @param id the id of the type to retrieve
         * @return the type
         */
        @Nonnull
        @Override
        default Type require(@Nonnull String id) {
            return lookup(id).orElseThrow(() -> new IllegalArgumentException("Unknown extensible enum value '" + id + "'"));
        }
    Registered: Sun Sep 07 03:35:12 UTC 2025
    - Last Modified: Thu Apr 03 13:33:59 UTC 2025
    - 1.7K bytes
    - Viewed (0)
  4. compat/maven-compat/src/test/java/org/apache/maven/SimpleLookup.java

        @Override
        public <T> T lookup(Class<T> type) {
            return objects.stream()
                    .filter(type::isInstance)
                    .map(type::cast)
                    .findAny()
                    .orElseThrow(() -> new LookupException("No service of type " + type));
        }
    
        @Override
        public <T> T lookup(Class<T> type, String name) {
            return null;
        }
    
        @Override
    Registered: Sun Sep 07 03:35:12 UTC 2025
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 2K bytes
    - Viewed (0)
  5. src/main/java/org/codelibs/fess/app/service/AccessTokenService.java

                    stream(request.getParameterValues(name)).of(stream -> stream.filter(StringUtil::isNotBlank).forEach(permissionSet::add));
                    return OptionalEntity.of(permissionSet);
                }).orElseThrow(() -> new InvalidAccessTokenException("invalid_token", "Invalid token: " + token));
            }
            return OptionalEntity.empty();
        }
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Thu Jul 17 08:28:31 UTC 2025
    - 5.5K bytes
    - Viewed (0)
  6. src/main/java/org/codelibs/fess/sso/saml/SamlAuthenticator.java

                            "Failed to process metadata.", e);
                }
            })
                    .orElseThrow(() -> new SsoMessageException(
                            messages -> messages.addErrorsFailedToProcessSsoRequest(UserMessages.GLOBAL_PROPERTY_KEY, "Invalid state."),
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Thu Aug 07 03:06:29 UTC 2025
    - 16.4K bytes
    - Viewed (3)
  7. src/main/java/org/codelibs/fess/api/engine/SearchEngineApiManager.java

         */
        public String getServerPath() {
            return getSessionManager().getAttribute(Constants.SEARCH_ENGINE_API_ACCESS_TOKEN, String.class)
                    .map(token -> ADMIN_SERVER + token)
                    .orElseThrow(() -> new FessSystemException("Cannot create an access token."));
        }
    
        /**
         * Generates and saves a new access token for the current session.
         * The token is used to authenticate API requests.
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Thu Aug 07 03:06:29 UTC 2025
    - 12.9K bytes
    - Viewed (0)
  8. api/maven-api-xml/src/main/java/org/apache/maven/api/xml/XmlService.java

        private static final class Holder {
            static final XmlService INSTANCE = ServiceLoader.load(XmlService.class)
                    .findFirst()
                    .orElseThrow(() -> new IllegalStateException("No XmlService implementation found"));
    
            private Holder() {}
        }
    Registered: Sun Sep 07 03:35:12 UTC 2025
    - Last Modified: Thu Apr 03 13:33:59 UTC 2025
    - 9.2K bytes
    - Viewed (0)
  9. docs/smb3-features/03-multi-channel-design.md

        }
        
        private ChannelInfo selectLeastLoaded(Collection<ChannelInfo> channels) {
            return channels.stream()
                .min(Comparator.comparingLong(ChannelInfo::getRequestsPending))
                .orElseThrow();
        }
        
        private ChannelInfo selectWeightedRandom(Collection<ChannelInfo> channels) {
            // Calculate total weight
            int totalWeight = channels.stream()
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 02:53:50 UTC 2025
    - 39.6K bytes
    - Viewed (0)
  10. okhttp/src/jvmTest/kotlin/okhttp3/CacheTest.kt

        assertThat(response1.body.string()).isEqualTo("ABC")
        val cacheEntry =
          fileSystem.allPaths
            .stream()
            .filter { e: Path -> e.name.endsWith(".0") }
            .findFirst()
            .orElseThrow { NoSuchElementException() }
        corruptCertificate(cacheEntry)
        val response2 = client.newCall(request).execute() // Not Cached!
        assertThat(response2.body.string()).isEqualTo("DEF")
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 16 09:39:51 UTC 2025
    - 113.6K bytes
    - Viewed (0)
Back to top