1 package test; 2 3 public class ExitPoints { 4 5 public ExitPoints() { 6 } 7 8 public void test() { 9 if (true) 10 return ; 11 12 if(true) 13 throw new NullPointerException (); 14 15 return; 16 } 17 18 public int test(int a) { 19 if (true) 20 return 0; 21 22 if(true) 23 throw new NullPointerException (); 24 25 return 0; 26 } 27 28 public Object test(Object a) { 29 if (true) 30 return null; 31 32 if(true) 33 throw new NullPointerException (); 34 35 return null; 36 } 37 38 public void test(String s) throws NullPointerException , javax.swing.text.BadLocationException { 39 if(true) 40 return ; 41 42 throwNPE(); 43 throwBLE(); 44 45 try{ 46 throwNPE(); 47 throwBLE(); 48 } catch (NullPointerException e) {} 49 50 try{ 51 throwNPE(); 52 throwBLE(); 53 } catch (javax.swing.text.BadLocationException e) {} 54 55 try{ 56 throwNPE(); 57 throwBLE(); 58 } catch (Exception e) {} 59 60 try{ 61 try{ 62 throwNPE(); 63 } catch (NullPointerException e) {} 64 throwBLE(); 65 } catch (NullPointerException e) {} 66 67 try{ 68 try{ 69 throwNPE(); 70 throwBLE(); 71 } catch (NullPointerException e) {} 72 } catch (javax.swing.text.BadLocationException e) {} 73 74 try{ 75 try{ 76 throwNPE(); 77 } catch (NullPointerException e) {} 78 throwBLE(); 79 } catch (javax.swing.text.BadLocationException e) {} 80 81 try{ 82 throwBLE(); 83 try{ 84 throwNPE(); 85 } catch (NullPointerException e) {} 86 } catch (NullPointerException e) {} 87 } 88 89 public void test(double x) throws NullPointerException , javax.swing.text.BadLocationException { 90 new ConstructorThrows(); 91 } 92 93 private void throwNPE() throws NullPointerException { 94 95 } 96 97 private void throwBLE() throws javax.swing.text.BadLocationException { 98 99 } 100 101 } 102 | Popular Tags |