Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 91 - 100 of 1,279 for try (0.01 seconds)

  1. 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)
  2. 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)
  3. okhttp-dnsoverhttps/src/test/java/okhttp3/dnsoverhttps/TestDohMain.kt

      names: List<String>,
    ) {
      var time = System.currentTimeMillis()
      for (dns in dnsProviders) {
        println("Testing ${dns.url}")
        for (host in names) {
          print("$host: ")
          System.out.flush()
          try {
            val results = dns.lookup(host)
            println(results)
          } catch (uhe: UnknownHostException) {
            var e: Throwable? = uhe
            while (e != null) {
              println(e)
              e = e.cause
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Wed Mar 19 19:25:20 GMT 2025
    - 3.2K bytes
    - Click Count (0)
  4. 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)
  5. 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)
  6. 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)
  7. impl/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java

            try (BuildSession bs = new BuildSession(request)) {
                return bs.build(false, artifact, allowStubModel, request.getRemoteRepositories());
            }
        }
    
        @Override
        public List<ProjectBuildingResult> build(List<File> pomFiles, boolean recursive, ProjectBuildingRequest request)
                throws ProjectBuildingException {
            try (BuildSession bs = new BuildSession(request)) {
    Created: Sun Dec 28 03:35:09 GMT 2025
    - Last Modified: Tue Nov 18 17:20:31 GMT 2025
    - 51.8K bytes
    - Click Count (0)
  8. 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)
  9. 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)
  10. 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)
Back to Top