JDK-6644253 : Plugin2: Issues with Null type handling while Java > JS communication
  • Type: Bug
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 6u10
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2007-12-20
  • Updated: 2010-11-03
  • Resolved: 2008-01-30
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6u10 b11Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
Handling null related to Java objects is not working correctly inside Javascript under some scenarios . Different browsers behave differently for this scenario. 
Consider a scenario where a file object received from Java applet and "null" check on this object while doing a readLine() is not working with new Plug-in.
Try running the following testcases which tries to read line from a file(contains 2 lines) inside the javascript
http://sqeweb.sfbay.sun.com/deployment2/jitu/plug-bug/ojiliveconnect/src/LocalFileAccessTest.html
After reading 2 lines from the files following condition should be met but that's not true in case of new Plug-in:
while ((line = fileRead.readLine()) != null)

On IE in case of null empty string is getting passed while on FF3 it's getting passed as "NPObject JS wrapper class"

Comments
EVALUATION This fix introduced a regression in the handling of null return values from JavaScript to Java which is described and fixed in 6647070.
04-01-2008

SUGGESTED FIX http://sa.sfbay.sun.com/projects/deployment_data/6u10/6644253.0 testcase: http://web-east.east.sun.com/deployment/www/tests/1.6.0_10/6644253/
21-12-2007

EVALUATION The fix for 6632668 inadvertently changed the semantics of null return values for some types including boxing types for primitives as well as Strings. Fixed to always pass null Java return values back to the browser as the null value, and to never wrap these values in a RemoteJavaObject.
21-12-2007