-
Key: SDO11-23
-
Legacy Issue Number: 6330
-
Status: open
-
Source: Fraunhofer FOKUS ( Raju Nanda Vaidya)
-
Summary:
Assigning ‘null’ to parameters (specially for parameters related to sequence of some parameters, eg: NVList ) should be avoided. Operations should not return null but empty list or raise exception where appropriate.
1. Empty values must be consistently represented throughout the specification. At the moment, empty values are represented by ‘null’ values (see e.g. description of ServiceProfileList on p.2-8; OrganizationList, status on p. 2-9 etc.). For data structures which contain a list of some other data structure (ServiceProfileList) it should not be null but empty list. For data structures like ConfigurationProfile (2-8) or DeviceProfile (p2-9) the data structure cannot be declared as empty. Therefore it can be null but may be it is not necessary to specifically defined it? Only the important point in these case is that exception should be raised and null should not be returned when such data are requested.
2. What an operation should return in every possible condition must be clearly explained. The operations should avoid returning ‘null’. Instead it should raise appropriate exception or in case of a list is requested then an empty list should be returned.
-
Reported: SDO 1.0 — Wed, 15 Oct 2003 04:00 GMT
-
Updated: Wed, 11 Mar 2015 11:15 GMT
SDO11 — Assigning null to parameters should be avoided
- Key: SDO11-23
- OMG Task Force: Super Distributed Objects 1.1 RTF