- Sort Score
- Num 10 results
- Language All
Results 1081 - 1090 of 2,371 for Try (0.02 seconds)
-
samples/guide/src/main/java/okhttp3/recipes/Authenticate.java
}) .build(); } public void run() throws Exception { Request request = new Request.Builder() .url("http://publicobject.com/secrets/hellosecret.txt") .build(); try (Response response = client.newCall(request).execute()) { if (!response.isSuccessful()) throw new IOException("Unexpected code " + response); System.out.println(response.body().string()); } }Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Thu Aug 12 07:26:27 GMT 2021 - 1.9K bytes - Click Count (0) -
guava-tests/test/com/google/common/collect/MapMakerTest.java
} // TODO(cpovirk): enable when ready (apparently after a change to our GWT emulation) public void xtestInitialCapacity_setTwice() { MapMaker maker = new MapMaker().initialCapacity(16); try { // even to the same value is not allowed maker.initialCapacity(16); fail(); } catch (IllegalStateException expected) { } }
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Aug 07 16:05:33 GMT 2025 - 2.8K bytes - Click Count (0) -
compat/maven-compat/src/test/java/org/apache/maven/artifact/deployer/ArtifactDeployerTest.java
private SessionScope sessionScope; protected String component() { return "deployer"; } @Test void testArtifactInstallation() throws Exception { sessionScope.enter(); try { sessionScope.seed(MavenSession.class, mock(MavenSession.class)); String artifactBasedir = new File(getBasedir(), "src/test/resources/artifact-install").getAbsolutePath();Created: Sun Apr 05 03:35:12 GMT 2026 - Last Modified: Wed Sep 17 10:01:14 GMT 2025 - 2.9K bytes - Click Count (0) -
compat/maven-model-builder/src/main/java/org/apache/maven/model/root/DefaultRootLocator.java
if (Files.isDirectory(dir.resolve(".mvn"))) { return true; } // we're too early to use the modelProcessor ... Path pom = dir.resolve("pom.xml"); try (InputStream is = Files.newInputStream(pom)) { XMLStreamReader parser = XMLInputFactory.newFactory().createXMLStreamReader(is); if (parser.nextTag() == XMLStreamReader.START_ELEMENT
Created: Sun Apr 05 03:35:12 GMT 2026 - Last Modified: Fri Jun 06 14:28:57 GMT 2025 - 2.6K bytes - Click Count (0) -
impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/mvnenc/ConsolePasswordPrompt.java
public Optional<String> configTemplate() { return Optional.empty(); } @Override public String handle(String config) throws SecDispatcherException { if (NAME.equals(config)) { try { return prompter.promptForPassword("Enter the master password: "); } catch (PrompterException e) { throw new SecDispatcherException("Could not collect the password", e); }
Created: Sun Apr 05 03:35:12 GMT 2026 - Last Modified: Sat Nov 16 13:55:43 GMT 2024 - 2.7K bytes - Click Count (0) -
tests/test_dependency_yield_except_httpexception.py
fake_database = initial_fake_database.copy() initial_state = {"except": False, "finally": False} state = initial_state.copy() app = FastAPI() async def get_database(): temp_database = fake_database.copy() try: yield temp_database fake_database.update(temp_database) except HTTPException: state["except"] = True raise finally: state["finally"] = True
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Mon Sep 29 03:29:38 GMT 2025 - 1.9K bytes - Click Count (0) -
guava-testlib/src/com/google/common/testing/SloppyTearDown.java
@GwtCompatible @NullMarked public abstract class SloppyTearDown implements TearDown { private static final Logger logger = Logger.getLogger(SloppyTearDown.class.getName()); @Override public final void tearDown() { try { sloppyTearDown(); } catch (Throwable t) { logger.log(Level.INFO, "exception thrown during tearDown: " + t.getMessage(), t); } } public abstract void sloppyTearDown() throws Exception;Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Sat Dec 21 14:50:24 GMT 2024 - 1.6K bytes - Click Count (0) -
compat/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/io/DefaultToolchainsWriter.java
Objects.requireNonNull(output, "output cannot be null"); Objects.requireNonNull(toolchains, "toolchains cannot be null"); try (Writer out = output) { new MavenToolchainsStaxWriter().write(out, toolchains.getDelegate()); } catch (XMLStreamException e) { throw new IOException("Error writing toolchains", e); }
Created: Sun Apr 05 03:35:12 GMT 2026 - Last Modified: Fri Oct 25 12:31:46 GMT 2024 - 1.9K bytes - Click Count (0) -
src/main/java/org/codelibs/core/net/MimeTypeUtil.java
*/ public static String guessContentType(final String path) { assertArgumentNotEmpty("path", path); final InputStream is = ResourceUtil.getResourceAsStream(path); try { final String mimetype = URLConnection.guessContentTypeFromStream(is); if (mimetype != null) { return mimetype; }Created: Fri Apr 03 20:58:12 GMT 2026 - Last Modified: Thu Jul 31 08:16:49 GMT 2025 - 1.9K bytes - Click Count (0) -
src/main/java/org/codelibs/fess/app/web/base/FessAdminAction.java
*/ protected void validateFilePath(final String path) { if (StringUtil.isBlank(path)) { throw new IllegalArgumentException("File path cannot be blank."); } try { final Path filePath = Paths.get(path).normalize(); final String normalizedPath = filePath.toString(); if (normalizedPath.contains("..")) {Created: Tue Mar 31 13:07:34 GMT 2026 - Last Modified: Thu Mar 19 13:57:12 GMT 2026 - 10.9K bytes - Click Count (0)