Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for sneakyThrow (0.18 sec)

  1. guava-tests/test/com/google/common/base/AbstractIteratorTest.java

              public Integer computeNext() {
                if (haveBeenCalled) {
                  throw new AssertionError("Should not have been called again");
                } else {
                  haveBeenCalled = true;
                  sneakyThrow(new SomeCheckedException());
                  throw new AssertionError(); // unreachable
                }
              }
            };
    
        // The first time, the sneakily-thrown exception comes out
        try {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu May 04 09:41:29 GMT 2023
    - 6.1K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/base/AbstractIteratorTest.java

              public Integer computeNext() {
                if (haveBeenCalled) {
                  throw new AssertionError("Should not have been called again");
                } else {
                  haveBeenCalled = true;
                  sneakyThrow(new SomeCheckedException());
                  throw new AssertionError(); // unreachable
                }
              }
            };
    
        // The first time, the sneakily-thrown exception comes out
        try {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu May 04 09:41:29 GMT 2023
    - 6.1K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/collect/AbstractIteratorTest.java

                if (haveBeenCalled) {
                  throw new AssertionError("Should not have been called again");
                } else {
                  haveBeenCalled = true;
                  sneakyThrow(new SomeCheckedException());
                  throw new AssertionError(); // unreachable
                }
              }
            };
    
        // The first time, the sneakily-thrown exception comes out
        try {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Feb 21 10:16:44 GMT 2024
    - 8.7K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/collect/AbstractIteratorTest.java

                if (haveBeenCalled) {
                  throw new AssertionError("Should not have been called again");
                } else {
                  haveBeenCalled = true;
                  sneakyThrow(new SomeCheckedException());
                  throw new AssertionError(); // unreachable
                }
              }
            };
    
        // The first time, the sneakily-thrown exception comes out
        try {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 21 10:16:44 GMT 2024
    - 8.7K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java

        AbstractFuture<String> f = new AbstractFuture<String>() {};
        f.set("foo");
        f.addListener(() -> sneakyThrow(new SomeCheckedException()), directExecutor());
      }
    
      private static final class SomeCheckedException extends Exception {}
    
      /** Throws an undeclared checked exception. */
      private static void sneakyThrow(Throwable t) {
        class SneakyThrower<T extends Throwable> {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 46.8K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java

        AbstractFuture<String> f = new AbstractFuture<String>() {};
        f.set("foo");
        f.addListener(() -> sneakyThrow(new SomeCheckedException()), directExecutor());
      }
    
      private static final class SomeCheckedException extends Exception {}
    
      /** Throws an undeclared checked exception. */
      private static void sneakyThrow(Throwable t) {
        class SneakyThrower<T extends Throwable> {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 46.8K bytes
    - Viewed (0)
Back to top