Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 16 for orElseThrow (0.09 seconds)

  1. impl/maven-core/src/test/java/org/apache/maven/project/ResourceIncludeTest.java

            // Find the resource with the custom directory
            Resource customResource = resources.stream()
                    .filter(r -> r.getDirectory().endsWith("custom"))
                    .findFirst()
                    .orElseThrow(() -> new AssertionError("Custom resource not found"));
    
            // Verify targetPath was preserved through conversion chain
            assertEquals(
    Created: Sun Dec 28 03:35:09 GMT 2025
    - Last Modified: Fri Nov 07 13:11:07 GMT 2025
    - 12.6K bytes
    - Click Count (0)
  2. 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();
        }
    Created: Sun Dec 28 03:35:09 GMT 2025
    - Last Modified: Wed Jun 11 13:14:09 GMT 2025
    - 6.7K bytes
    - Click Count (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 + "'"));
        }
    Created: Sun Dec 28 03:35:09 GMT 2025
    - Last Modified: Thu Apr 03 13:33:59 GMT 2025
    - 1.7K bytes
    - Click Count (0)
  4. 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 + "'"));
        }
    Created: Sun Dec 28 03:35:09 GMT 2025
    - Last Modified: Thu Apr 03 13:33:59 GMT 2025
    - 1.8K bytes
    - Click Count (0)
  5. impl/maven-cli/src/test/java/org/apache/maven/cling/invoker/BaseParserTest.java

                            .build());
    
            Assertions.assertTrue(invokerRequest.options().isPresent());
            Options options = invokerRequest.options().orElseThrow();
            Assertions.assertFalse(options.showVersion().orElse(false));
            Assertions.assertFalse(options.showVersionAndExit().orElse(false));
            Assertions.assertTrue(options.showErrors().orElse(false));
    Created: Sun Dec 28 03:35:09 GMT 2025
    - Last Modified: Wed Sep 17 10:01:14 GMT 2025
    - 4.2K bytes
    - Click Count (0)
  6. impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/mvn/MavenParser.java

            result.add(cliOptions);
            // atFile option
            if (cliOptions.atFile().isPresent()) {
                Path file = context.cwd.resolve(cliOptions.atFile().orElseThrow());
                if (Files.isRegularFile(file)) {
                    result.add(parseMavenAtFileOptions(file));
                } else {
    Created: Sun Dec 28 03:35:09 GMT 2025
    - Last Modified: Tue Oct 14 12:35:44 GMT 2025
    - 4.4K bytes
    - Click Count (0)
  7. impl/maven-core/src/test/java/org/apache/maven/lifecycle/DefaultLifecyclesTest.java

        }
    
        private Lifecycle getLifeCycleById(String id) {
            return defaultLifeCycles.getLifeCycles().stream()
                    .filter(l -> id.equals(l.getId()))
                    .findFirst()
                    .orElseThrow(IllegalArgumentException::new);
        }
    Created: Sun Dec 28 03:35:09 GMT 2025
    - Last Modified: Wed Sep 17 10:01:14 GMT 2025
    - 3.9K bytes
    - Click Count (0)
  8. impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/CliUtils.java

            return getCanonicalPath(Optional.ofNullable(
                            ServiceLoader.load(RootLocator.class).iterator().next().findMandatoryRoot(topDirectory))
                    .orElseThrow());
        }
    Created: Sun Dec 28 03:35:09 GMT 2025
    - Last Modified: Mon Oct 13 18:30:29 GMT 2025
    - 5K bytes
    - Click Count (0)
  9. impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/PrecedenceCoreExtensionSelector.java

            if (coreExtensions.isEmpty() || coreExtensions.get().isEmpty()) {
                return List.of();
            }
    
            return selectCoreExtensions(
                    context, context.invokerRequest.coreExtensions().orElseThrow());
        }
    
        /**
         * Selects extensions to load discovered from various sources by precedence ("first wins"), as
         * {@link InvokerRequest#coreExtensions()} is in precedence order. Also reports conflicts, if any.
    Created: Sun Dec 28 03:35:09 GMT 2025
    - Last Modified: Mon Sep 29 15:32:43 GMT 2025
    - 4.6K bytes
    - Click Count (0)
  10. impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/mvnenc/goals/Init.java

                DispatcherMeta meta = secDispatcher.availableDispatchers().stream()
                        .filter(d -> Objects.equals(config.getDefaultDispatcher(), d.name()))
                        .findFirst()
                        .orElseThrow();
                if (!meta.fields().isEmpty()) {
                    dispatcherConfigResult = prompt.prompt(
                            context.header,
    Created: Sun Dec 28 03:35:09 GMT 2025
    - Last Modified: Wed Jun 11 13:14:09 GMT 2025
    - 12K bytes
    - Click Count (0)
Back to Top