-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #76 from don-vip/patch-1
Fix nonnull annotations database for java.util.concurrent.ForkJoinPool
- Loading branch information
Showing
2 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package ghIssues; | ||
|
||
import java.io.Serializable; | ||
import java.util.concurrent.ForkJoinPool; | ||
import java.util.concurrent.ForkJoinWorkerThread; | ||
|
||
import edu.umd.cs.findbugs.annotations.ExpectWarning; | ||
import edu.umd.cs.findbugs.annotations.NoWarning; | ||
|
||
public class Issue0076 { | ||
|
||
private static class Handler implements Thread.UncaughtExceptionHandler { | ||
@Override | ||
public void uncaughtException(Thread t, Throwable e) { | ||
} | ||
} | ||
|
||
@NoWarning("NP_NONNULL_PARAM_VIOLATION") | ||
public void testNominal() { | ||
new ForkJoinPool(2, ForkJoinPool.defaultForkJoinWorkerThreadFactory, null, true); | ||
} | ||
|
||
@ExpectWarning("NP_NONNULL_PARAM_VIOLATION") | ||
public void testWarning() { | ||
new ForkJoinPool(2, null, new Handler(), true); | ||
} | ||
} |