[cvs] / jsr166 / src / test / tck / AbstractExecutorServiceTest.java Repository:
ViewVC logotype

Diff of /jsr166/src/test/tck/AbstractExecutorServiceTest.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.47, Sun Jul 16 18:05:47 2017 UTC revision 1.48, Mon Jul 17 22:27:30 2017 UTC
# Line 166  Line 166 
166      }      }
167    
168      /**      /**
169       * Submitting null tasks throws NullPointerException.       * Submitting null tasks throws NullPointerException
170       */       */
171      @SuppressWarnings("FutureReturnValueIgnored")      public void testNullTaskSubmission() {
     public void testNullTaskSubmission() throws Exception {  
172          final ExecutorService e = new DirectExecutorService();          final ExecutorService e = new DirectExecutorService();
173          try (PoolCleaner cleaner = cleaner(e)) {          try (PoolCleaner cleaner = cleaner(e)) {
174              try {              assertNullTaskSubmissionThrowsNullPointerException(e);
                 e.execute((Runnable) null);  
                 shouldThrow();  
             } catch (NullPointerException success) {}  
             try {  
                 e.submit((Runnable) null);  
                 shouldThrow();  
             } catch (NullPointerException success) {}  
             try {  
                 e.submit((Callable) null);  
                 shouldThrow();  
             } catch (NullPointerException success) {}  
175          }          }
176      }      }
177    

Legend:
Removed from v.1.47  
changed lines
  Added in v.1.48

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8