Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 6 of 6 for orElseThrow (0.05 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. 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)
  3. 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)
  4. 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)
  5. build-logic/documentation/src/main/groovy/gradlebuild/docs/GradleJavadocsPlugin.java

                try (Stream<String> lines = Files.lines(file.toPath())) {
                    String packageLine = lines.filter(line -> line.startsWith("package"))
                        .findFirst()
                        .orElseThrow(() -> new IOException("Can't find package definition in file " + file));
                    Matcher matcher = pattern.matcher(packageLine);
                    if (matcher.find()) {
                        return matcher.group(1);
    Created: Wed Dec 31 11:36:14 GMT 2025
    - Last Modified: Thu Oct 02 14:18:24 GMT 2025
    - 10.4K bytes
    - Click Count (0)
  6. 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")
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Fri Oct 03 17:41:45 GMT 2025
    - 116.8K bytes
    - Click Count (0)
Back to Top