- Sort Score
- Num 10 results
- Language All
Results 1501 - 1510 of 2,371 for Try (0.01 seconds)
-
guava-tests/test/com/google/common/util/concurrent/FluentFutureTest.java
} @J2ktIncompatible @GwtIncompatible // withTimeout public void testWithTimeout() throws Exception { ScheduledExecutorService executor = newScheduledThreadPool(1); try { FluentFuture<?> f = FluentFuture.from(SettableFuture.create()).withTimeout(0, SECONDS, executor); ExecutionException e = assertThrows(ExecutionException.class, f::get);
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 16 22:45:21 GMT 2026 - 4.7K bytes - Click Count (0) -
impl/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleModuleBuilder.java
MavenProject currentProject, TaskSegment taskSegment) { session.setCurrentProject(currentProject); Instant buildStartTime = MonotonicClock.now(); try { if (reactorContext.getReactorBuildStatus().isHaltedOrBlacklisted(currentProject)) { eventCatapult.fire(ExecutionEvent.Type.ProjectSkipped, session, null); return; }Created: Sun Apr 05 03:35:12 GMT 2026 - Last Modified: Fri Jun 06 20:01:00 GMT 2025 - 5.5K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/collect/WriteReplaceOverridesTest.java
* trivially, but it's enough to skip these ones. */ ) { continue; } Class<?> clazz = info.load(); try { Method unused = clazz.getDeclaredMethod("writeReplace"); continue; // It overrides writeReplace, so it's safe. } catch (NoSuchMethodException e) {
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue Jul 01 03:07:54 GMT 2025 - 5.1K bytes - Click Count (0) -
api/maven-api-core/src/test/java/org/apache/maven/api/services/SourcesTest.java
Path testFile = tempDir.resolve("test.txt"); String content = "test content"; Files.writeString(testFile, content); Source source = Sources.fromPath(testFile); try (InputStream inputStream = source.openStream()) { String readContent = new String(inputStream.readAllBytes()); assertEquals(content, readContent); } } @Test
Created: Sun Apr 05 03:35:12 GMT 2026 - Last Modified: Mon Sep 29 14:45:25 GMT 2025 - 5.4K bytes - Click Count (0) -
android/guava/src/com/google/common/collect/ConcurrentHashMultiset.java
// existingCounter != null: fall through to operate against the existing AtomicInteger } while (true) { int oldValue = existingCounter.get(); if (oldValue != 0) { try { int newValue = Math.addExact(oldValue, occurrences); if (existingCounter.compareAndSet(oldValue, newValue)) { // newValue can't == 0, so no need to check & removeCreated: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Fri Dec 26 20:08:09 GMT 2025 - 22.3K bytes - Click Count (0) -
src/test/java/jcifs/internal/smb1/net/NetShareEnumTest.java
// Verify total bytes written assertEquals(offset, bytesWritten); } // Helper methods private Object getFieldValue(Object obj, String fieldName) { try { Field field = getField(obj.getClass(), fieldName); field.setAccessible(true); return field.get(obj); } catch (Exception e) {Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 15.8K bytes - Click Count (0) -
src/main/java/org/codelibs/fess/api/BaseApiManager.java
} buf.append(enc); final HttpServletResponse response = LaResponseUtil.getResponse(); response.setContentType(buf.toString()); writeHeaders(response); try (PrintWriter out = new PrintWriter(new OutputStreamWriter(response.getOutputStream(), enc))) { out.print(text); } catch (final IOException e) { throw new IORuntimeException(e); }Created: Tue Mar 31 13:07:34 GMT 2026 - Last Modified: Thu Jul 17 08:28:31 GMT 2025 - 5.9K bytes - Click Count (0) -
android/guava-testlib/src/com/google/common/collect/testing/testers/ReflectionFreeAssertThrows.java
expectedThrowable + " is not yet supported by ReflectionFreeAssertThrows. Add an entry for it in the" + " map in that class."); } Object result; try { result = supplier.get(); } catch (Throwable t) { if (predicate.apply(t)) { // We are careful to set up INSTANCE_OF to match each Predicate to its target Class. @SuppressWarnings("unchecked")Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Aug 07 16:05:33 GMT 2025 - 6.9K bytes - Click Count (0) -
guava-testlib/src/com/google/common/collect/testing/testers/ListAddAllAtIndexTester.java
expectUnchanged(); } @ListFeature.Require(absent = SUPPORTS_ADD_WITH_INDEX) public void testAddAllAtIndex_unsupportedNothing() { try { assertFalse( "addAll(n, nothing) should return false or throw", getList().addAll(0, emptyCollection())); } catch (UnsupportedOperationException tolerated) { } expectUnchanged();
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Nov 14 23:40:07 GMT 2024 - 6.4K bytes - Click Count (0) -
src/test/java/jcifs/smb/SmbEnumerationUtilTest.java
@Mock SmbFileFilter ff; // Utility to create a private inner class instance reflectively private static Object newPrivateInner(String simpleName, Class<?>[] paramTypes, Object... args) { try { Class<?> cls = Class.forName("jcifs.smb.SmbEnumerationUtil$" + simpleName); Constructor<?> ctor = cls.getDeclaredConstructor(paramTypes); ctor.setAccessible(true);Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 17.1K bytes - Click Count (0)