Skip to content

Concatenating null values #34

@rvjansen

Description

@rvjansen

While testing a planned refresh release of BSF4ooRexx I have been going through the NetRexx samples (NetRexx invoking ooRexx scripts and accessing e.g. an ooRexx directory object and the like) and stumbled over the following problem:

===== Exception running class nrxRunRexx_05: java.lang.NullPointerException: Right operand null =====
--- in nrxRunRexx_05.main(String[]) [nrxRunRexx_05.nrx:2]
38 +++ say " (NetRexx) rexxDotHost.sendMessage0("rexx.hey"): [" || rexxDotHost.sendMessage0("rexx.hey")"]"
+++ ^
Indeed the result of sending the ooRexx message "rexx.hey" to the RexxProxy referred to by rexxDotHost returns null (this is on purpose in this particular example).

However, concatenating strings with null has been possible in the past (have not tested the NetRexx samples in a long time). It should not throw an exception as a String value of null is perfectly valid in Java (will use 'null' as a string replacement in such cases). I do not remember whether NetRexx would have used 'null' or an empty string '' in the past to represent null values.

---rony

P.S.: The NetRexx samples in BSF4ooRexx match 1:1 the Java samples, so it is more than awkward if a NetRexx program raises an exception where the matching Java program runs through successfully.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions