test/tools/javac/TryWithResources/TwrTests.java

changeset 745
4328728e0409
parent 609
13354e1abba7
child 2525
2eb010b6cb22
     1.1 --- a/test/tools/javac/TryWithResources/TwrTests.java	Sat Nov 13 19:00:43 2010 -0800
     1.2 +++ b/test/tools/javac/TryWithResources/TwrTests.java	Sun Nov 14 07:16:46 2010 -0800
     1.3 @@ -90,7 +90,7 @@
     1.4                  } catch (Resource.CreateFailException e) {
     1.5                      creationFailuresDetected++;
     1.6                      checkCreateFailureId(e.resourceId(), createFailureId);
     1.7 -                    checkSuppressedExceptions(e.getSuppressedExceptions(), bitMap);
     1.8 +                    checkSuppressedExceptions(e.getSuppressed(), bitMap);
     1.9                  } catch (Resource.CloseFailException e) {
    1.10                      throw new AssertionError("Secondary exception suppression failed");
    1.11                  }
    1.12 @@ -112,7 +112,7 @@
    1.13                  } catch (Resource.CreateFailException e) {
    1.14                      creationFailuresDetected++;
    1.15                      checkCreateFailureId(e.resourceId(), createFailureId);
    1.16 -                    checkSuppressedExceptions(e.getSuppressedExceptions(), bitMap);
    1.17 +                    checkSuppressedExceptions(e.getSuppressed(), bitMap);
    1.18                  } catch (Resource.CloseFailException e) {
    1.19                      throw new AssertionError("Secondary exception suppression failed");
    1.20                  }
    1.21 @@ -134,7 +134,7 @@
    1.22                  } catch (Resource.CreateFailException e) {
    1.23                      creationFailuresDetected++;
    1.24                      checkCreateFailureId(e.resourceId(), createFailureId);
    1.25 -                    checkSuppressedExceptions(e.getSuppressedExceptions(), bitMap);
    1.26 +                    checkSuppressedExceptions(e.getSuppressed(), bitMap);
    1.27                  } catch (Resource.CloseFailException e) {
    1.28                      throw new AssertionError("Secondary exception suppression failed:" + e);
    1.29                  }
    1.30 @@ -158,7 +158,7 @@
    1.31                  } catch (Resource.CreateFailException e) {
    1.32                      creationFailuresDetected++;
    1.33                      checkCreateFailureId(e.resourceId(), createFailureId);
    1.34 -                    checkSuppressedExceptions(e.getSuppressedExceptions(), bitMap);
    1.35 +                    checkSuppressedExceptions(e.getSuppressed(), bitMap);
    1.36                  } catch (Resource.CloseFailException e) {
    1.37                      throw new AssertionError("Secondary exception suppression failed:" + e);
    1.38                  }
    1.39 @@ -181,7 +181,7 @@
    1.40                  } catch (Resource.CreateFailException e) {
    1.41                      creationFailuresDetected++;
    1.42                      checkCreateFailureId(e.resourceId(), createFailureId);
    1.43 -                    checkSuppressedExceptions(e.getSuppressedExceptions(), bitMap);
    1.44 +                    checkSuppressedExceptions(e.getSuppressed(), bitMap);
    1.45                  } catch (Resource.CloseFailException e) {
    1.46                      throw new AssertionError("Secondary exception suppression failed:" + e);
    1.47                  }
    1.48 @@ -207,7 +207,7 @@
    1.49                  } catch (Resource.CreateFailException e) {
    1.50                      creationFailuresDetected++;
    1.51                      checkCreateFailureId(e.resourceId(), createFailureId);
    1.52 -                    checkSuppressedExceptions(e.getSuppressedExceptions(), bitMap);
    1.53 +                    checkSuppressedExceptions(e.getSuppressed(), bitMap);
    1.54                  } catch (Resource.CloseFailException e) {
    1.55                      throw new AssertionError("Secondary exception suppression failed:" + e);
    1.56                  }
    1.57 @@ -231,7 +231,7 @@
    1.58                  } catch (Resource.CreateFailException e) {
    1.59                      creationFailuresDetected++;
    1.60                      checkCreateFailureId(e.resourceId(), createFailureId);
    1.61 -                    checkSuppressedExceptions(e.getSuppressedExceptions(), bitMap);
    1.62 +                    checkSuppressedExceptions(e.getSuppressed(), bitMap);
    1.63                  } catch (Resource.CloseFailException e) {
    1.64                      throw new AssertionError("Secondary exception suppression failed:" + e);
    1.65                  }
    1.66 @@ -259,7 +259,7 @@
    1.67                  } catch (Resource.CreateFailException e) {
    1.68                      creationFailuresDetected++;
    1.69                      checkCreateFailureId(e.resourceId(), createFailureId);
    1.70 -                    checkSuppressedExceptions(e.getSuppressedExceptions(), bitMap);
    1.71 +                    checkSuppressedExceptions(e.getSuppressed(), bitMap);
    1.72                  } catch (Resource.CloseFailException e) {
    1.73                      throw new AssertionError("Secondary exception suppression failed:" + e);
    1.74                  }
    1.75 @@ -310,7 +310,7 @@
    1.76       * Check for proper suppressed exceptions in proper order.
    1.77       *
    1.78       * @param suppressedExceptions the suppressed exceptions array returned by
    1.79 -     *        getSuppressedExceptions()
    1.80 +     *        getSuppressed()
    1.81       * @bitmap a bitmap indicating which suppressed exceptions are expected.
    1.82       *         Bit i is set iff id should throw a CloseFailException.
    1.83       */
    1.84 @@ -376,7 +376,7 @@
    1.85                  } catch (MyKindOfException e) {
    1.86                      if (failure == 0)
    1.87                          throw new AssertionError("Unexpected MyKindOfException");
    1.88 -                    checkSuppressedExceptions(e.getSuppressedExceptions(), bitMap);
    1.89 +                    checkSuppressedExceptions(e.getSuppressed(), bitMap);
    1.90                  } catch (Resource.CloseFailException e) {
    1.91                      if (failure == 1)
    1.92                          throw new AssertionError("Secondary exception suppression failed");
    1.93 @@ -388,7 +388,7 @@
    1.94                          throw new AssertionError("CloseFailException: got id " + id
    1.95                                                   + ", expected lg(" + highestCloseFailBit +")");
    1.96                      }
    1.97 -                    checkSuppressedExceptions(e.getSuppressedExceptions(), bitMap & ~highestCloseFailBit);
    1.98 +                    checkSuppressedExceptions(e.getSuppressed(), bitMap & ~highestCloseFailBit);
    1.99                  }
   1.100                  checkClosedList(closedList, 1);
   1.101              }
   1.102 @@ -409,7 +409,7 @@
   1.103                  } catch (MyKindOfException e) {
   1.104                      if (failure == 0)
   1.105                          throw new AssertionError("Unexpected MyKindOfException");
   1.106 -                    checkSuppressedExceptions(e.getSuppressedExceptions(), bitMap);
   1.107 +                    checkSuppressedExceptions(e.getSuppressed(), bitMap);
   1.108                  } catch (Resource.CloseFailException e) {
   1.109                      if (failure == 1)
   1.110                          throw new AssertionError("Secondary exception suppression failed");
   1.111 @@ -421,7 +421,7 @@
   1.112                          throw new AssertionError("CloseFailException: got id " + id
   1.113                                                   + ", expected lg(" + highestCloseFailBit +")");
   1.114                      }
   1.115 -                    checkSuppressedExceptions(e.getSuppressedExceptions(), bitMap & ~highestCloseFailBit);
   1.116 +                    checkSuppressedExceptions(e.getSuppressed(), bitMap & ~highestCloseFailBit);
   1.117                  }
   1.118                  checkClosedList(closedList, 2);
   1.119              }
   1.120 @@ -443,7 +443,7 @@
   1.121                  } catch (MyKindOfException e) {
   1.122                      if (failure == 0)
   1.123                          throw new AssertionError("Unexpected MyKindOfException");
   1.124 -                    checkSuppressedExceptions(e.getSuppressedExceptions(), bitMap);
   1.125 +                    checkSuppressedExceptions(e.getSuppressed(), bitMap);
   1.126                  } catch (Resource.CloseFailException e) {
   1.127                      if (failure == 1)
   1.128                          throw new AssertionError("Secondary exception suppression failed");
   1.129 @@ -455,7 +455,7 @@
   1.130                          throw new AssertionError("CloseFailException: got id " + id
   1.131                                                   + ", expected lg(" + highestCloseFailBit +")");
   1.132                      }
   1.133 -                    checkSuppressedExceptions(e.getSuppressedExceptions(), bitMap & ~highestCloseFailBit);
   1.134 +                    checkSuppressedExceptions(e.getSuppressed(), bitMap & ~highestCloseFailBit);
   1.135                  }
   1.136                  checkClosedList(closedList, 2);
   1.137              }
   1.138 @@ -477,7 +477,7 @@
   1.139                  } catch (MyKindOfException e) {
   1.140                      if (failure == 0)
   1.141                          throw new AssertionError("Unexpected MyKindOfException");
   1.142 -                    checkSuppressedExceptions(e.getSuppressedExceptions(), bitMap);
   1.143 +                    checkSuppressedExceptions(e.getSuppressed(), bitMap);
   1.144                  } catch (Resource.CloseFailException e) {
   1.145                      if (failure == 1)
   1.146                          throw new AssertionError("Secondary exception suppression failed");
   1.147 @@ -489,7 +489,7 @@
   1.148                          throw new AssertionError("CloseFailException: got id " + id
   1.149                                                   + ", expected lg(" + highestCloseFailBit +")");
   1.150                      }
   1.151 -                    checkSuppressedExceptions(e.getSuppressedExceptions(), bitMap & ~highestCloseFailBit);
   1.152 +                    checkSuppressedExceptions(e.getSuppressed(), bitMap & ~highestCloseFailBit);
   1.153                  }
   1.154                  checkClosedList(closedList, 3);
   1.155              }
   1.156 @@ -513,7 +513,7 @@
   1.157                  } catch (MyKindOfException e) {
   1.158                      if (failure == 0)
   1.159                          throw new AssertionError("Unexpected MyKindOfException");
   1.160 -                    checkSuppressedExceptions(e.getSuppressedExceptions(), bitMap);
   1.161 +                    checkSuppressedExceptions(e.getSuppressed(), bitMap);
   1.162                  } catch (Resource.CloseFailException e) {
   1.163                      if (failure == 1)
   1.164                          throw new AssertionError("Secondary exception suppression failed");
   1.165 @@ -525,7 +525,7 @@
   1.166                          throw new AssertionError("CloseFailException: got id " + id
   1.167                                                   + ", expected lg(" + highestCloseFailBit +")");
   1.168                      }
   1.169 -                    checkSuppressedExceptions(e.getSuppressedExceptions(), bitMap & ~highestCloseFailBit);
   1.170 +                    checkSuppressedExceptions(e.getSuppressed(), bitMap & ~highestCloseFailBit);
   1.171                  }
   1.172                  checkClosedList(closedList, 3);
   1.173              }
   1.174 @@ -548,7 +548,7 @@
   1.175                  } catch (MyKindOfException e) {
   1.176                      if (failure == 0)
   1.177                          throw new AssertionError("Unexpected MyKindOfException");
   1.178 -                    checkSuppressedExceptions(e.getSuppressedExceptions(), bitMap);
   1.179 +                    checkSuppressedExceptions(e.getSuppressed(), bitMap);
   1.180                  } catch (Resource.CloseFailException e) {
   1.181                      if (failure == 1)
   1.182                          throw new AssertionError("Secondary exception suppression failed");
   1.183 @@ -560,7 +560,7 @@
   1.184                          throw new AssertionError("CloseFailException: got id " + id
   1.185                                                   + ", expected lg(" + highestCloseFailBit +")");
   1.186                      }
   1.187 -                    checkSuppressedExceptions(e.getSuppressedExceptions(), bitMap & ~highestCloseFailBit);
   1.188 +                    checkSuppressedExceptions(e.getSuppressed(), bitMap & ~highestCloseFailBit);
   1.189                  }
   1.190                  checkClosedList(closedList, 4);
   1.191              }
   1.192 @@ -586,7 +586,7 @@
   1.193                  } catch (MyKindOfException e) {
   1.194                      if (failure == 0)
   1.195                          throw new AssertionError("Unexpected MyKindOfException");
   1.196 -                    checkSuppressedExceptions(e.getSuppressedExceptions(), bitMap);
   1.197 +                    checkSuppressedExceptions(e.getSuppressed(), bitMap);
   1.198                  } catch (Resource.CloseFailException e) {
   1.199                      if (failure == 1)
   1.200                          throw new AssertionError("Secondary exception suppression failed");
   1.201 @@ -598,7 +598,7 @@
   1.202                          throw new AssertionError("CloseFailException: got id " + id
   1.203                                                   + ", expected lg(" + highestCloseFailBit +")");
   1.204                      }
   1.205 -                    checkSuppressedExceptions(e.getSuppressedExceptions(), bitMap & ~highestCloseFailBit);
   1.206 +                    checkSuppressedExceptions(e.getSuppressed(), bitMap & ~highestCloseFailBit);
   1.207                  }
   1.208                  checkClosedList(closedList, 4);
   1.209              }
   1.210 @@ -621,7 +621,7 @@
   1.211                  } catch (MyKindOfException e) {
   1.212                      if (failure == 0)
   1.213                          throw new AssertionError("Unexpected MyKindOfException");
   1.214 -                    checkSuppressedExceptions(e.getSuppressedExceptions(), bitMap);
   1.215 +                    checkSuppressedExceptions(e.getSuppressed(), bitMap);
   1.216                  } catch (Resource.CloseFailException e) {
   1.217                      if (failure == 1)
   1.218                          throw new AssertionError("Secondary exception suppression failed");
   1.219 @@ -633,7 +633,7 @@
   1.220                          throw new AssertionError("CloseFailException: got id " + id
   1.221                                                   + ", expected lg(" + highestCloseFailBit +")");
   1.222                      }
   1.223 -                    checkSuppressedExceptions(e.getSuppressedExceptions(), bitMap & ~highestCloseFailBit);
   1.224 +                    checkSuppressedExceptions(e.getSuppressed(), bitMap & ~highestCloseFailBit);
   1.225                  }
   1.226                  checkClosedList(closedList, 5);
   1.227              }
   1.228 @@ -660,7 +660,7 @@
   1.229                  } catch (MyKindOfException e) {
   1.230                      if (failure == 0)
   1.231                          throw new AssertionError("Unexpected MyKindOfException");
   1.232 -                    checkSuppressedExceptions(e.getSuppressedExceptions(), bitMap);
   1.233 +                    checkSuppressedExceptions(e.getSuppressed(), bitMap);
   1.234                  } catch (Resource.CloseFailException e) {
   1.235                      if (failure == 1)
   1.236                          throw new AssertionError("Secondary exception suppression failed");
   1.237 @@ -672,7 +672,7 @@
   1.238                          throw new AssertionError("CloseFailException: got id " + id
   1.239                                                   + ", expected lg(" + highestCloseFailBit +")");
   1.240                      }
   1.241 -                    checkSuppressedExceptions(e.getSuppressedExceptions(), bitMap & ~highestCloseFailBit);
   1.242 +                    checkSuppressedExceptions(e.getSuppressed(), bitMap & ~highestCloseFailBit);
   1.243                  }
   1.244                  checkClosedList(closedList, 5);
   1.245              }

mercurial