Merge lp:~zorba-coders/zorba/bug-949910 into lp:zorba

Proposed by Ghislain Fourny
Status: Merged
Approved by: Sorin Marian Nasoi
Approved revision: 10713
Merged at revision: 10746
Proposed branch: lp:~zorba-coders/zorba/bug-949910
Merge into: lp:zorba
Diff against target: 166 lines (+50/-0)
11 files modified
ChangeLog (+1/-0)
src/store/naive/node_items.cpp (+33/-0)
src/store/naive/node_items.h (+8/-0)
test/rbkt/ExpQueryResults/zorba/f-and-o/has-children-attribute.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/f-and-o/has-children-comment.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/f-and-o/has-children-pi.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/f-and-o/has-children-text.xml.res (+1/-0)
test/rbkt/Queries/zorba/f-and-o/has-children-attribute.xq (+1/-0)
test/rbkt/Queries/zorba/f-and-o/has-children-comment.xq (+1/-0)
test/rbkt/Queries/zorba/f-and-o/has-children-pi.xq (+1/-0)
test/rbkt/Queries/zorba/f-and-o/has-children-text.xq (+1/-0)
To merge this branch: bzr merge lp:~zorba-coders/zorba/bug-949910
Reviewer Review Type Date Requested Status
Sorin Marian Nasoi Approve
Markos Zaharioudakis Approve
Matthias Brantner Needs Information
Review via email: mp+96573@code.launchpad.net

Commit message

Solved bug 949910.

Description of the change

Solved bug 949910.

To post a comment you must log in.
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

No approved revision specified.

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job bug-949910-2012-03-08T13-53-07.61Z is finished. The final status was:

All tests succeeded!

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1, Needs Fixing < 1, Pending < 1. Got: 2 Pending.

Revision history for this message
Matthias Brantner (matthias-brantner) wrote :

An alternative implementation would be to make sure that the function is never invoked on comments or PIs. I think that was the "philosophy" so far. Could you please mention the fix in the ChangeLog?

review: Needs Information
Revision history for this message
Ghislain Fourny (gislenius) wrote :

Thanks, The ChangeLog is now updated.

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job bug-949910-2012-04-04T16-43-55.076Z is finished. The final status was:

All tests succeeded!

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1, Needs Fixing < 1, Pending < 1. Got: 1 Needs Information, 3 Pending.

Revision history for this message
Markos Zaharioudakis (markos-za) :
review: Approve
Revision history for this message
Sorin Marian Nasoi (sorin.marian.nasoi) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job bug-949910-2012-04-04T19-05-12.59Z is finished. The final status was:

All tests succeeded!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ChangeLog'
2--- ChangeLog 2012-04-02 08:20:22 +0000
3+++ ChangeLog 2012-04-04 16:06:20 +0000
4@@ -13,6 +13,7 @@
5 * Fixed performance problem with the findNodeSources function of the no-copy rule
6 * Fixed bug #872234 (prevent a rewritting to take place in case of sequential expr)
7 * Fixed bug #912586, #912593 and #912722 (assertion failures with lax validation)
8+ * Fixed bug #949910 (has-children may be invoked on all nodes). Internally, zorba::store::Item::getChildren() now returns NULL on node classes without offspring (instead of raising an error).
9
10
11 version 2.2
12
13=== modified file 'src/store/naive/node_items.cpp'
14--- src/store/naive/node_items.cpp 2012-03-28 23:58:23 +0000
15+++ src/store/naive/node_items.cpp 2012-04-04 16:06:20 +0000
16@@ -3759,6 +3759,14 @@
17 }
18
19
20+/*******************************************************************************
21+
22+********************************************************************************/
23+store::Iterator_t AttributeNode::getChildren() const
24+{
25+ return NULL;
26+}
27+
28 /////////////////////////////////////////////////////////////////////////////////
29 // //
30 // class TextNode //
31@@ -4458,6 +4466,14 @@
32 #endif // ! TEXT_ORDPATH
33
34
35+/*******************************************************************************
36+
37+********************************************************************************/
38+store::Iterator_t TextNode::getChildren() const
39+{
40+ return NULL;
41+}
42+
43 /////////////////////////////////////////////////////////////////////////////////
44 // //
45 // class PiNode //
46@@ -4594,6 +4610,14 @@
47 return "<?" + theTarget + " " + theContent + "?>";
48 }
49
50+/*******************************************************************************
51+
52+********************************************************************************/
53+store::Iterator_t PiNode::getChildren() const
54+{
55+ return NULL;
56+}
57+
58
59 /////////////////////////////////////////////////////////////////////////////////
60 // //
61@@ -4718,6 +4742,15 @@
62 return "<!--" + theContent + "-->";
63 }
64
65+/*******************************************************************************
66+
67+********************************************************************************/
68+store::Iterator_t CommentNode::getChildren() const
69+{
70+ return NULL;
71+}
72+
73+
74 #ifndef ZORBA_NO_FULL_TEXT
75
76 /******************************************************************************
77
78=== modified file 'src/store/naive/node_items.h'
79--- src/store/naive/node_items.h 2012-03-28 23:58:23 +0000
80+++ src/store/naive/node_items.h 2012-04-04 16:06:20 +0000
81@@ -1283,6 +1283,8 @@
82 #ifndef ZORBA_NO_FULL_TEXT
83 void tokenize( XmlNodeTokenizerCallback& );
84 #endif
85+
86+ store::Iterator_t getChildren() const;
87 };
88
89
90@@ -1443,6 +1445,8 @@
91 #ifndef ZORBA_NO_FULL_TEXT
92 void tokenize( XmlNodeTokenizerCallback& );
93 #endif /* ZORBA_NO_FULL_TEXT */
94+
95+ store::Iterator_t getChildren() const;
96 };
97
98
99@@ -1508,6 +1512,8 @@
100 void replaceName(UpdRenamePi& upd);
101
102 void restoreName(UpdRenamePi& upd);
103+
104+ store::Iterator_t getChildren() const;
105 };
106
107
108@@ -1563,6 +1569,8 @@
109 void replaceValue(UpdReplaceCommentValue& upd);
110
111 void restoreValue(UpdReplaceCommentValue& upd);
112+
113+ store::Iterator_t getChildren() const;
114 };
115
116
117
118=== added directory 'test/rbkt/ExpQueryResults/zorba/f-and-o'
119=== added file 'test/rbkt/ExpQueryResults/zorba/f-and-o/has-children-attribute.xml.res'
120--- test/rbkt/ExpQueryResults/zorba/f-and-o/has-children-attribute.xml.res 1970-01-01 00:00:00 +0000
121+++ test/rbkt/ExpQueryResults/zorba/f-and-o/has-children-attribute.xml.res 2012-04-04 16:06:20 +0000
122@@ -0,0 +1,1 @@
123+false
124
125=== added file 'test/rbkt/ExpQueryResults/zorba/f-and-o/has-children-comment.xml.res'
126--- test/rbkt/ExpQueryResults/zorba/f-and-o/has-children-comment.xml.res 1970-01-01 00:00:00 +0000
127+++ test/rbkt/ExpQueryResults/zorba/f-and-o/has-children-comment.xml.res 2012-04-04 16:06:20 +0000
128@@ -0,0 +1,1 @@
129+false
130
131=== added file 'test/rbkt/ExpQueryResults/zorba/f-and-o/has-children-pi.xml.res'
132--- test/rbkt/ExpQueryResults/zorba/f-and-o/has-children-pi.xml.res 1970-01-01 00:00:00 +0000
133+++ test/rbkt/ExpQueryResults/zorba/f-and-o/has-children-pi.xml.res 2012-04-04 16:06:20 +0000
134@@ -0,0 +1,1 @@
135+false
136
137=== added file 'test/rbkt/ExpQueryResults/zorba/f-and-o/has-children-text.xml.res'
138--- test/rbkt/ExpQueryResults/zorba/f-and-o/has-children-text.xml.res 1970-01-01 00:00:00 +0000
139+++ test/rbkt/ExpQueryResults/zorba/f-and-o/has-children-text.xml.res 2012-04-04 16:06:20 +0000
140@@ -0,0 +1,1 @@
141+false
142
143=== added directory 'test/rbkt/Queries/zorba/f-and-o'
144=== added file 'test/rbkt/Queries/zorba/f-and-o/has-children-attribute.xq'
145--- test/rbkt/Queries/zorba/f-and-o/has-children-attribute.xq 1970-01-01 00:00:00 +0000
146+++ test/rbkt/Queries/zorba/f-and-o/has-children-attribute.xq 2012-04-04 16:06:20 +0000
147@@ -0,0 +1,1 @@
148+has-children(attribute attribute {""})
149
150=== added file 'test/rbkt/Queries/zorba/f-and-o/has-children-comment.xq'
151--- test/rbkt/Queries/zorba/f-and-o/has-children-comment.xq 1970-01-01 00:00:00 +0000
152+++ test/rbkt/Queries/zorba/f-and-o/has-children-comment.xq 2012-04-04 16:06:20 +0000
153@@ -0,0 +1,1 @@
154+has-children(comment {"comment"})
155
156=== added file 'test/rbkt/Queries/zorba/f-and-o/has-children-pi.xq'
157--- test/rbkt/Queries/zorba/f-and-o/has-children-pi.xq 1970-01-01 00:00:00 +0000
158+++ test/rbkt/Queries/zorba/f-and-o/has-children-pi.xq 2012-04-04 16:06:20 +0000
159@@ -0,0 +1,1 @@
160+has-children(processing-instruction pi {"content"})
161
162=== added file 'test/rbkt/Queries/zorba/f-and-o/has-children-text.xq'
163--- test/rbkt/Queries/zorba/f-and-o/has-children-text.xq 1970-01-01 00:00:00 +0000
164+++ test/rbkt/Queries/zorba/f-and-o/has-children-text.xq 2012-04-04 16:06:20 +0000
165@@ -0,0 +1,1 @@
166+has-children(text {"text"})

Subscribers

People subscribed via source and target branches