Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 354738 - EDT code str == null causes JS message egl.egl.lang.EBoolean.fromEBoolean is not a function
Summary: EDT code str == null causes JS message egl.egl.lang.EBoolean.fromEBoolean is ...
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-15 11:19 EDT by Kathy Carroll CLA
Modified: 2017-02-23 14:20 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kathy Carroll CLA 2011-08-15 11:19:53 EDT
Functions passed and trace only work when I explicitly defined the parameter type as IN.

Would you expect this line of code to work?
   if(str == null || str == "")
It doesn't like the test for null. This is valid in RBD. Is it valid in EDT?

package handlers;

handler MyHandler type RUIhandler {onConstructionFunction = start, cssFile="css/Alpha.css", title="MyHandler"}
	
	function start()
		SysLib.WriteStdOut("Hello from JavaScript Batch");
		passed("something");
	end	
	
	function passed(str String in)
		SysLib.WriteStdOut("inside passed");
		if( str == "" )
//		if(str == null || str == "")
			SysLib.WriteStdOut("Passed string is empty/null");
		else
			SysLib.WriteStdOut("Passed has contents");
		end
		if (str != "OK") 
			str = str + " OK";
		end
		SysLib.WriteStdOut(str);
		trace(str);
	end
	
	function trace(details string in)
		syslib.writeStdout(details);
	end
end
Comment 1 Kathy Carroll CLA 2011-08-18 11:31:50 EDT
this line of JS

			if (egl.egl.lang.EBoolean.ezeCast((((egl.egl.lang.NullType.equals({eze$$value : str, eze$$signature : "S;"}, null)) || egl.egl.lang.EBoolean.fromEBoolean(((str) == "")))))) {

causes this runtime message

"egl.egl.lang.EBoolean.fromEBoolean is not a function"
Comment 2 Kathy Carroll CLA 2011-09-01 09:48:25 EDT
Indirectly fixed
Comment 3 Kathy Carroll CLA 2011-09-01 09:48:37 EDT
verified
Comment 4 Lisa Lasher CLA 2011-10-11 16:12:31 EDT
Closing this defect.