-
Enhancement
-
Resolution: Cannot Reproduce
-
P4
-
5.0
-
x86
-
windows_xp
FULL PRODUCT VERSION :
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
Java HotSpot(TM) Client VM (build 1.5.0-b64, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
A DESCRIPTION OF THE PROBLEM :
If a Callable returns null, calling Future.get() throws the following exception:
java.util.concurrent.ExecutionException: java.lang.RuntimeException: An unexpected JNI error has occurred: [JMethod.invoke] Can not invoke an instance method on a null object.
This behavior should be supported. My guess is that this issue requires a very simple fix.
I believe this issue is important to fix because if ExecutorService is used on a server application, one should not be forced to return an Object from a Callable. Forcing object creation on a frequently-executed Callable, when it is not necessary, will result in undesirable overhead.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Future.get() should return null
ACTUAL -
Exception is thrown
REPRODUCIBILITY :
This bug can be reproduced always.
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
Java HotSpot(TM) Client VM (build 1.5.0-b64, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
A DESCRIPTION OF THE PROBLEM :
If a Callable returns null, calling Future.get() throws the following exception:
java.util.concurrent.ExecutionException: java.lang.RuntimeException: An unexpected JNI error has occurred: [JMethod.invoke] Can not invoke an instance method on a null object.
This behavior should be supported. My guess is that this issue requires a very simple fix.
I believe this issue is important to fix because if ExecutorService is used on a server application, one should not be forced to return an Object from a Callable. Forcing object creation on a frequently-executed Callable, when it is not necessary, will result in undesirable overhead.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Future.get() should return null
ACTUAL -
Exception is thrown
REPRODUCIBILITY :
This bug can be reproduced always.