Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 2,158 for Try (0.14 sec)

  1. guava-testlib/test/com/google/common/testing/EqualsTesterTest.java

      public void testAddNullReference() {
        try {
          equalsTester.addEqualityGroup((Object) null);
          fail("Should fail on null reference");
        } catch (NullPointerException e) {
        }
      }
    
      /** Test equalObjects after adding multiple instances at once with a null */
      public void testAddTwoEqualObjectsAtOnceWithNull() {
        try {
          equalsTester.addEqualityGroup(reference, equalObject1, null);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Apr 17 15:49:06 GMT 2023
    - 12.9K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/math/MathPreconditionsTest.java

      public void testCheckPositive_zeroInt() {
        try {
          MathPreconditions.checkPositive("int", 0);
          fail();
        } catch (IllegalArgumentException expected) {
        }
      }
    
      public void testCheckPositive_maxInt() {
        MathPreconditions.checkPositive("int", Integer.MAX_VALUE);
      }
    
      public void testCheckPositive_minInt() {
        try {
          MathPreconditions.checkPositive("int", Integer.MIN_VALUE);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 8.2K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/collect/ForwardingSortedMapImplementsMapTest.java

      @Override
      public void testContainsKey() {
        try {
          super.testContainsKey();
        } catch (ClassCastException tolerated) {
        }
      }
    
      @J2ktIncompatible // https://youtrack.jetbrains.com/issue/KT-58242/ undefined behavior (crash)
      @Override
      public void testEntrySetContainsEntryIncompatibleKey() {
        try {
          super.testEntrySetContainsEntryIncompatibleKey();
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 4.2K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/util/concurrent/FuturesGetUncheckedTest.java

        Thread.currentThread().interrupt();
        try {
          assertEquals("foo", getUnchecked(immediateFuture("foo")));
          assertTrue(Thread.currentThread().isInterrupted());
        } finally {
          Thread.interrupted();
        }
      }
    
      public void testGetUnchecked_cancelled() {
        SettableFuture<String> future = SettableFuture.create();
        future.cancel(true);
        try {
          getUnchecked(future);
          fail();
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 4.3K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/util/concurrent/Uninterruptibles.java

      @J2ktIncompatible
      @GwtIncompatible // concurrency
      public static void awaitUninterruptibly(CountDownLatch latch) {
        boolean interrupted = false;
        try {
          while (true) {
            try {
              latch.await();
              return;
            } catch (InterruptedException e) {
              interrupted = true;
            }
          }
        } finally {
          if (interrupted) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 04 09:45:04 GMT 2023
    - 14.4K bytes
    - Viewed (0)
  6. android/guava-testlib/test/com/google/common/collect/testing/HelpersTest.java

        }
    
        try {
          Helpers.assertContentsInOrder(list, "a", "b", "c", "d");
          throw new Error();
        } catch (AssertionFailedError expected) {
        }
    
        try {
          Helpers.assertContentsInOrder(list, "a", "c", "b");
          throw new Error();
        } catch (AssertionFailedError expected) {
        }
    
        try {
          Helpers.assertContentsInOrder(list, "a", "B", "c");
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 4.9K bytes
    - Viewed (0)
  7. maven-compat/src/main/java/org/apache/maven/artifact/repository/metadata/DefaultRepositoryMetadataManager.java

            }
    
            try {
                metadata.storeInLocalRepository(localRepository, deploymentRepository);
            } catch (RepositoryMetadataStoreException e) {
                throw new RepositoryMetadataDeploymentException("Error installing metadata: " + e.getMessage(), e);
            }
    
            try {
                wagonManager.putArtifactMetadata(file, metadata, deploymentRepository);
    Java
    - Registered: Sun Apr 28 03:35:10 GMT 2024
    - Last Modified: Fri Apr 12 10:50:18 GMT 2024
    - 18.9K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/base/PreconditionsTest.java

      public void testCheckArgument_simple_failure() {
        try {
          Preconditions.checkArgument(false);
          fail("no exception thrown");
        } catch (IllegalArgumentException expected) {
        }
      }
    
      public void testCheckArgument_simpleMessage_success() {
        Preconditions.checkArgument(true, IGNORE_ME);
      }
    
      public void testCheckArgument_simpleMessage_failure() {
        try {
          Preconditions.checkArgument(false, new Message());
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 19.8K bytes
    - Viewed (0)
  9. maven-compat/src/main/java/org/apache/maven/repository/legacy/DefaultWagonManager.java

            boolean downloaded = false;
    
            try {
                connectWagon(wagon, repository);
    
                boolean firstRun = true;
                boolean retry = true;
    
                // this will run at most twice. The first time, the firstRun flag is turned off, and if the retry flag
                // is set on the first run, it will be turned off and not re-set on the second try. This is because the
    Java
    - Registered: Sun Apr 28 03:35:10 GMT 2024
    - Last Modified: Thu Sep 14 11:48:15 GMT 2023
    - 29.9K bytes
    - Viewed (0)
  10. guava-testlib/src/com/google/common/collect/testing/google/UnmodifiableCollectionTests.java

        Iterators.addAll(copy, collection.iterator());
    
        try {
          collection.add(sampleElement);
          fail("add succeeded on unmodifiable collection");
        } catch (UnsupportedOperationException expected) {
        }
    
        assertCollectionsAreEquivalent(copy, collection);
    
        try {
          collection.addAll(siblingCollection);
          fail("addAll succeeded on unmodifiable collection");
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Feb 26 19:46:10 GMT 2024
    - 15K bytes
    - Viewed (0)
Back to top