- Sort Score
- Num 10 results
- Language All
Results 91 - 100 of 1,254 for Try (0.02 seconds)
-
guava-tests/benchmark/com/google/common/util/concurrent/SingleThreadAbstractFutureBenchmark.java
Facade<Integer> facade = list.get(i); try { facade.get(); r++; } catch (CancellationException e) { r += 2; } } return r; } @Benchmark public long timeGetWith0Timeout(long reps) throws Exception { Facade<?> f = notDoneFuture; long r = 0; for (int i = 0; i < reps; i++) { try { f.get(0, SECONDS); r += 1;
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Tue May 13 18:46:00 GMT 2025 - 3.7K bytes - Click Count (0) -
guava-testlib/test/com/google/common/testing/GcFinalizationTest.java
assertThat(e).hasCauseThat().isInstanceOf(InterruptedException.class); } public void testAwait_countDownLatch_interrupted() { Interruptenator interruptenator = new Interruptenator(Thread.currentThread()); try { CountDownLatch latch = new CountDownLatch(1); RuntimeException expected = assertThrows(RuntimeException.class, () -> GcFinalization.await(latch)); assertWrapsInterruptedException(expected);
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Mon Dec 08 17:02:07 GMT 2025 - 7.9K bytes - Click Count (0) -
impl/maven-cli/src/test/java/org/apache/maven/cling/transfer/ConsoleMavenTransferListenerTest.java
int size = 1000; ExecutorService service = Executors.newFixedThreadPool(size * 2); try { startLatch = new CountDownLatch(size); endLatch = new CountDownLatch(size); Map<String, String> output = new ConcurrentHashMap<String, String>(); try (SimplexTransferListener listener = new SimplexTransferListener(new ConsoleMavenTransferListener(Created: Sun Dec 28 03:35:09 GMT 2025 - Last Modified: Fri Mar 21 04:56:21 GMT 2025 - 5.6K bytes - Click Count (0) -
internal/s3select/errors.go
statusCode: 400, cause: err, } } func errInvalidScanRangeParameter(err error) *s3Error { return &s3Error{ code: "InvalidRequestParameter", message: "The value of a parameter in ScanRange element is invalid. Check the service API documentation and try again.", statusCode: 400, cause: err, } }
Created: Sun Dec 28 19:28:13 GMT 2025 - Last Modified: Mon Mar 14 16:48:36 GMT 2022 - 4.3K bytes - Click Count (0) -
compat/maven-model-builder/src/main/java/org/apache/maven/model/io/DefaultModelReader.java
Objects.requireNonNull(input, "input cannot be null"); try (Reader in = input) { return read(in, isStrict(options), getSource(options)); } } @Override public Model read(InputStream input, Map<String, ?> options) throws IOException { Objects.requireNonNull(input, "input cannot be null"); try (XmlStreamReader in = ReaderFactory.newXmlReader(input)) {
Created: Sun Dec 28 03:35:09 GMT 2025 - Last Modified: Fri Jan 10 07:09:12 GMT 2025 - 3.4K bytes - Click Count (0) -
guava/src/com/google/common/hash/MacHashFunction.java
public int bits() { return bits; } private static boolean supportsClone(Mac mac) { try { Object unused = mac.clone(); return true; } catch (CloneNotSupportedException e) { return false; } } private static Mac getMac(String algorithmName, Key key) { try { Mac mac = Mac.getInstance(algorithmName); mac.init(key); return mac;
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Sat Dec 21 03:10:51 GMT 2024 - 3.6K bytes - Click Count (0) -
guava/src/com/google/common/base/Throwables.java
@GwtCompatible public final class Throwables { private Throwables() {} /** * Throws {@code throwable} if it is an instance of {@code declaredType}. Example usage: * * <pre> * for (Foo foo : foos) { * try { * foo.bar(); * } catch (BarException | RuntimeException | Error t) { * failure = t; * } * } * if (failure != null) { * throwIfInstanceOf(failure, BarException.class);Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Aug 07 16:05:33 GMT 2025 - 20.6K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/primitives/UnsignedIntsTest.java
// (which seems to make more sense). try { UnsignedInts.parseUnsignedInt("0", Character.MIN_RADIX - 1); fail(); } catch (NumberFormatException expected) { } catch (IllegalArgumentException expected) { // Kotlin native, see above } try { UnsignedInts.parseUnsignedInt("0", Character.MAX_RADIX + 1); fail();Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Aug 07 16:05:33 GMT 2025 - 12.5K bytes - Click Count (0) -
android/guava/src/com/google/common/io/TempFileCreator.java
abstract File createTempFile(String prefix) throws IOException; private static TempFileCreator pickSecureCreator() { try { Class.forName("java.nio.file.Path"); return new JavaNioCreator(); } catch (ClassNotFoundException runningUnderAndroid) { // Try another way. } try { int version = (int) Class.forName("android.os.Build$VERSION").getField("SDK_INT").get(null); int jellyBean =
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Mon Sep 29 18:50:14 GMT 2025 - 11.8K bytes - Click Count (0) -
build-logic/documentation/src/main/groovy/gradlebuild/docs/FindMissingDocumentationFiles.java
Gson gson = new Gson(); List<AdocFileEntry> entries; try (FileReader reader = new FileReader(jsonFile)) { entries = gson.fromJson(reader, new TypeToken<List<AdocFileEntry>>() {}.getType()); } Set<String> foundAdocFiles = new HashSet<>(); try (Stream<Path> pathStream = Files.walk(Paths.get(directoryPath))) { pathStream.filter(Files::isRegularFile)Created: Wed Dec 31 11:36:14 GMT 2025 - Last Modified: Thu Aug 21 15:38:58 GMT 2025 - 8.5K bytes - Click Count (0)