[Httpunit-commit] CVS: httpunit/src/com/meterware/httpunit/javascript JavaScript.java,1.62,1.63
Brought to you by:
russgold
|
From: Russell G. <rus...@us...> - 2004-12-02 03:43:28
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/javascript In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25901/src/com/meterware/httpunit/javascript Modified Files: JavaScript.java Log Message: bug #1052779 window.open() with javascript URL no longer throws a null pointer exception or class cast exception Index: JavaScript.java =================================================================== RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/javascript/JavaScript.java,v retrieving revision 1.62 retrieving revision 1.63 diff -u -r1.62 -r1.63 --- JavaScript.java 29 Oct 2004 00:13:47 -0000 1.62 +++ JavaScript.java 2 Dec 2004 03:43:20 -0000 1.63 @@ -471,7 +471,8 @@ public Window jsFunction_open( Object url, String name, String features, boolean replace ) throws PropertyException, JavaScriptException, NotAFunctionException, IOException, SAXException { - return (Window) toScriptable( getDelegate().open( toStringIfNotUndefined( url ), name, features, replace ) ); + WebResponse.Scriptable delegate = getDelegate().open( toStringIfNotUndefined( url ), name, features, replace ); + return delegate == null ? null : (Window) toScriptable( delegate ); } |