Skip to content

Commit

Permalink
Fixed wrong Java 8 reflection API call
Browse files Browse the repository at this point in the history
  • Loading branch information
akarnokd committed Dec 2, 2014
1 parent 4188f58 commit 87ea431
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/rx/internal/schedulers/NewThreadWorker.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ public NewThreadWorker(ThreadFactory threadFactory) {
// Java 7+: cancelled future tasks can be removed from the executor thus avoiding memory leak
for (Method m : executor.getClass().getMethods()) {
if (m.getName().equals("setRemoveOnCancelPolicy")
&& m.getParameterCount() == 1
&& m.getParameters()[0].getType() == Boolean.TYPE) {
&& m.getParameterTypes().length == 1
&& m.getParameterTypes()[0] == Boolean.TYPE) {
try {
m.invoke(executor, true);
} catch (Exception ex) {
Expand Down

0 comments on commit 87ea431

Please sign in to comment.