- Sort Score
- Num 10 results
- Language All
Results 11 - 19 of 19 for orElseThrow (0.05 seconds)
-
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) -
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) -
impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/mvnenc/goals/Init.java
Created: Sun Dec 28 03:35:09 GMT 2025 - Last Modified: Wed Jun 11 13:14:09 GMT 2025 - 12K bytes - Click Count (0) -
impl/maven-core/src/main/java/org/apache/maven/lifecycle/internal/concurrent/BuildPlan.java
return Optional.ofNullable(plan.get(project)).map(m -> m.get(name)); } public BuildStep requiredStep(MavenProject project, String name) { return step(project, name).orElseThrow(() -> new NoSuchElementException("Step " + name + " not found")); } // add a follow-up plan to this one public void then(BuildPlan step) { step.plan.forEach((k, v) -> plan.merge(k, v, this::merge));
Created: Sun Dec 28 03:35:09 GMT 2025 - Last Modified: Fri Mar 28 12:11:25 GMT 2025 - 6.1K bytes - Click Count (0) -
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() {} }Created: Sun Dec 28 03:35:09 GMT 2025 - Last Modified: Thu Apr 03 13:33:59 GMT 2025 - 9.2K bytes - Click Count (0) -
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) -
android/guava/src/com/google/common/base/Optional.java
* * <ul> * <li>This class is serializable; {@code java.util.Optional} is not. * <li>{@code java.util.Optional} has the additional methods {@code ifPresent}, {@code filter}, * {@code flatMap}, and {@code orElseThrow}. * <li>{@code java.util} offers the primitive-specialized versions {@code OptionalInt}, {@code * OptionalLong} and {@code OptionalDouble}, the use of which is recommended; Guava does not * have these. * </ul>
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Wed Jun 04 13:03:16 GMT 2025 - 15.4K bytes - Click Count (0) -
impl/maven-core/src/main/java/org/apache/maven/DefaultMaven.java
MavenProject rootProject = session.getAllProjects().stream() .filter(MavenProject::isExecutionRoot) .findFirst() .orElseThrow(() -> new IllegalStateException("No project in the session is execution root")); buildResumptionAnalyzer.determineBuildResumptionData(result).ifPresent(resumption -> { try {
Created: Sun Dec 28 03:35:09 GMT 2025 - Last Modified: Mon May 05 16:58:52 GMT 2025 - 28.7K bytes - Click Count (1) -
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)