選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

Pr103097.aj 545B

1234567891011121314151617181920212223
  1. import java.io.IOException;
  2. public aspect Pr103097 {
  3. declare soft: IOException:
  4. within(Pr103097) &&
  5. !withincode(* *(..)) &&
  6. !call(* *(..));
  7. before() : execution(* main(..)) {
  8. try {
  9. doThrow();
  10. } catch (IOException e) {
  11. throw new RuntimeException("IOException not softened as expected");
  12. } catch(org.aspectj.lang.SoftException ex) {}
  13. }
  14. public static void doThrow() throws IOException {
  15. throw new IOException("test");
  16. }
  17. public static void main(String args[]) {
  18. }
  19. }