Community
Participate
Working Groups
Build Identifier: 0.7.0.v201110241434 Create an RUIHandler, and copy following code to the start function. You can find an exception is thrown by clicking view the handler in external web browser. decimalType decimal?; syslib.writeStdout("decimalType " + decimalType); Reproducible: Always
If the exception being thrown is a NullValueException, then this is working as designed. If otherwise, please include the exception here.
(In reply to comment #1) > If the exception being thrown is a NullValueException, then this is working as > designed. If otherwise, please include the exception here. The exception cannot be found now, I tried following two variants. If has following statements, it prints NullPointerException. decimalType decimal?; syslib.writeStdout(decimalType); If has following statements, it prints "decimalType ". decimalType decimal?; syslib.writeStdout("decimalType " + decimalType); Does it work as design?
Both snippets in comment 2 should be throwing a NullValueException. There are issues here with both Java and JavaScript. Java correctly throws a NVE for: decimalType decimal?; syslib.writeStdout(decimalType); Java is not throwing an NVE for the following when it should be: decimalType decimal?; syslib.writeStdout("decimalType " + decimalType); The + operator for EString does not accept nullable types: static function $Plus(lvalue EString in, rvalue EString in) returns(EString) {@Operation{"+"}}; JavaScript is throwing a runtime exception on the null values and is not throwing an EGL NVE. Also, Paul, can you update the ?: operator in EString to allow null values to be passed in? /** * {@Operation ?:} Concatenates two strings. If either is null then null is returned. */ static function $ConcatNull(value EString in, rvalue EString in) returns(EString) {@Operation{"?:"}};
I opened Bug 364517 - String + operator does not throw a NVE for Java.
I opened Bug 364519 - String + operator does not throw a NVE for JavaScript. I believe the original problem found in this defect has been resolved and this defect should be closed.
decimalType decimal?; syslib.writeStdout(decimalType); throws NVE for both java and javascript
Now the bug behaves like bug Bug 364519 , so I close this one