Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 122770 - Behavioural and inconsistency issues with how the Java Common Base Event implementations handle null properties.
Summary: Behavioural and inconsistency issues with how the Java Common Base Event impl...
Status: CLOSED WONTFIX
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: TPTP (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Cindy Jin CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 122765 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-01-05 11:22 EST by Paul Slauenwhite CLA
Modified: 2016-05-05 10:48 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Slauenwhite CLA 2006-01-05 11:22:25 EST
Behavioural and inconsistency issues with how the Java Common Base Event implementations handle null properties.

There exists behavioural and consistency issues with how the Java (EMF and non-EMF) Common Base Event implementations handle null properties.  First the behavioural issue.  Since the Common Base Event V1.0.1 specification does not specify how to handle null properties, the Java Common Base Event implementations have adopted the Java conventions (e.g. adding a null element to a list results in a list of size 1 containing the null element).  However, the Common Base Event V1.0.1 specification is tightly coupled to XML as defined in its schema.  XML represents null or unset properties as empty attributes or elements.  As for the consistency issue, the Java Common Base Event implementations treat null properties as both unset properties (e.g. setting a null msg property on a Common Base Event) and valid values (e.g. adding a null element to a list results in a list of size 1 containing the null element). 

Ultimately, the Java Common Base Event implementations should be following the XML conventions for representing null or unset properties.  In other words, null strings would be represented as empty strings and serialized to XML as empty attributes.  Also, null complex properties (objects) would flaged and serialized as empty elements.
Comment 1 Paul Slauenwhite CLA 2006-01-05 11:22:51 EST
*** Bug 122765 has been marked as a duplicate of this bug. ***
Comment 2 Paul Slauenwhite CLA 2006-01-05 11:31:11 EST
This defect applies to the native (C) Common Base Event implementation as well.
Comment 3 Paul Slauenwhite CLA 2006-01-06 09:45:49 EST
Since the solution for this defect involves a behavioral change in the Common Base Event implementations, a public request for comment has been issued on the TPTP public forums:

Mailing List:

http://dev.eclipse.org/mhonarc/lists/tptp-platform-dev/msg00462.html

Newsgroup:

http://www.eclipse.org/newsportal/article.php?id=1171&group=eclipse.tptp#1171
Comment 4 Christine Knight CLA 2006-01-06 09:58:26 EST
I think this could cause negative impact to existing consumers who are code-aware of the existing behavior and I would suggest not doing it pending your description of how a compatibiltiy mode would work. Can you describe that?
Comment 5 Paul Slauenwhite CLA 2006-01-06 11:38:44 EST
(In reply to comment #4)
> I think this could cause negative impact to existing consumers who are
> code-aware of the existing behavior and I would suggest not doing it pending
> your description of how a compatibility mode would work. Can you describe that?

Assuming that there are concrete examples where consuming products might be negatively impacted by such a behavioural change, the compatibility mode, on by default, would maintain the current behavior of how the Common Base Event
implementations handle null properties.  The user could turn off the compatibility mode to realize the behaviour proposed in the solution to this defect.  That said, there would need to be concrete examples that merit the negative performance impact of such a compatibility mode.

The proposed solution would only impact users or consuming products that explicitly set a null value as a Common Base Event property which is typically not the norm.  We are investigating the potential for any negative impact to existing users or consuming products and if present, what measures are necessary to reduce or remove this negative impact.
Comment 6 Guru Nagarajan CLA 2006-01-06 12:19:02 EST
The CBE representation is XML and hence from the architecture standpoint the native and Java implementation should follow the CBE XML schema spec. 
Comment 7 Paul Slauenwhite CLA 2006-02-20 12:46:59 EST
Since no users/consuming products are requiring this defect and given the impact of the change, we will wait fix this defect in the the Common Base Event V2.x implementation (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=82676).  As such, re-targeting to future and decreasing the severity to normal.

Comment 8 Paul Slauenwhite CLA 2006-08-29 08:23:24 EDT
Transitioning to new component owner (Cindy Jin).
Comment 9 Cindy Jin CLA 2006-10-23 11:35:56 EDT
Cannot contain in TPTP V4.3(i3)
Comment 10 Cindy Jin CLA 2007-01-16 11:39:43 EST
target to futrue, since this API is well used and changing it now would break a lot of users
Comment 11 Eric Labadie CLA 2007-08-08 16:05:07 EDT
This is required from AC perspective
Comment 12 Alex Nan CLA 2008-06-30 21:41:28 EDT
No support for the Java CBE libraries will be provided post 4.5.
Comment 13 Alex Nan CLA 2008-06-30 21:45:08 EDT
Closing.