ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/tck/AbstractExecutorServiceTest.java
(Generate patch)

Comparing jsr166/src/test/tck/AbstractExecutorServiceTest.java (file contents):
Revision 1.47 by jsr166, Sun Jul 16 18:05:47 2017 UTC vs.
Revision 1.48 by jsr166, Mon Jul 17 22:27:30 2017 UTC

# Line 166 | Line 166 | public class AbstractExecutorServiceTest
166      }
167  
168      /**
169 <     * Submitting null tasks throws NullPointerException.
169 >     * Submitting null tasks throws NullPointerException
170       */
171 <    @SuppressWarnings("FutureReturnValueIgnored")
172 <    public void testNullTaskSubmission() throws Exception {
171 >    public void testNullTaskSubmission() {
172          final ExecutorService e = new DirectExecutorService();
173          try (PoolCleaner cleaner = cleaner(e)) {
174 <            try {
176 <                e.execute((Runnable) null);
177 <                shouldThrow();
178 <            } catch (NullPointerException success) {}
179 <            try {
180 <                e.submit((Runnable) null);
181 <                shouldThrow();
182 <            } catch (NullPointerException success) {}
183 <            try {
184 <                e.submit((Callable) null);
185 <                shouldThrow();
186 <            } catch (NullPointerException success) {}
174 >            assertNullTaskSubmissionThrowsNullPointerException(e);
175          }
176      }
177  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines