Commits

Walter Dörwald  committed 9b3a500

Use Utils.getItem() in JSP code for loadvar opcode.

With this non-existent variables no longer get treated as None/null.

  • Participants
  • Parent commits e0bb11f

Comments (0)

Files changed (2)

 		parsing in the incremental codecs it now gets reset to its proper initial
 		value.
 
-*	Fixed a bug in the handling of the ``addlist`` opcode in
+*	Fixed a bug in the handling of the UL4 opcode ``addlist`` in
 	:func:`ll.xist.ns.jsp.fromul4`.
 
-*	Added missing processing instruction class for the UL4 ``def`` tag.
+*	Added missing processing instruction class for the UL4 ``def`` tag to the
+	:mod:`ll.xist.ns.ul4` namespace module.
+
+*	The generated JSP code for the ``loadvar`` opcode now uses the Java method
+	``Utils.getItem``, so that non-existent variables no longer get treated as
+	``None``/``null``.
 
 
 Changes in 3.7.1 (released 02/08/2010)

File src/ll/xist/ns/jsp.py

 		elif opcode.code == "updatedict":
 			make_scriptlet("((java.util.Map)r%d).putAll((java.util.Map)r%d);" % (opcode.r1, opcode.r2))
 		elif opcode.code == "loadvar":
-			make_scriptlet("r%d = %s.get(%s);" % (opcode.r1, variables, _string(opcode.arg)))
+			make_scriptlet("r%d = com.livinglogic.ul4.Utils.getItem(%s, %s);" % (opcode.r1, variables, _string(opcode.arg)))
 		elif opcode.code == "storevar":
 			make_scriptlet("%s.put(%s, r%d);" % (variables, _string(opcode.arg), opcode.r1))
 		elif opcode.code == "addvar":