Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

minor fix

  • Loading branch information...
commit a6b16ea79153db0f5603e156b426dd067819a394 1 parent 11150be
Mario Fusco authored
14 src/main/java/ch/lambdaj/function/argument/InvocationSequence.java
View
@@ -35,7 +35,7 @@ public Thread newThread(Runnable r) {
} else {
jittingEnabled = false;
if (executor != null) {
- executor.shutdownNow();
+ executor.shutdown();
executor = null;
}
}
@@ -120,11 +120,13 @@ public int hashCode() {
public Object evaluate(final Object object) {
if (!jitDone && needsJitting.compareAndSet(true, false)) {
jitDone = true;
- executor.submit(new Runnable() {
- public void run() {
- invoker = new InvokerJitter(object, InvocationSequence.this).jitInvoker();
- }
- });
+ if (executor != null) {
+ executor.submit(new Runnable() {
+ public void run() {
+ invoker = new InvokerJitter(object, InvocationSequence.this).jitInvoker();
+ }
+ });
+ }
}
return invoker.invokeOn(object);
}
Please sign in to comment.
Something went wrong with that request. Please try again.