Merge lp:~paul-lucas/zorba/pjl-misc into lp:zorba

Proposed by Paul J. Lucas
Status: Merged
Approved by: Paul J. Lucas
Approved revision: 11485
Merged at revision: 11709
Proposed branch: lp:~paul-lucas/zorba/pjl-misc
Merge into: lp:zorba
Diff against target: 83 lines (+26/-2)
5 files modified
src/runtime/base/plan_iterator.cpp (+1/-1)
src/runtime/json/snelson.cpp (+2/-0)
src/runtime/jsound/jsound_util.cpp (+3/-1)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-j2x-object-06.xml.res (+8/-0)
test/rbkt/Queries/zorba/json/json-snelson-j2x-object-06.xq (+12/-0)
To merge this branch: bzr merge lp:~paul-lucas/zorba/pjl-misc
Reviewer Review Type Date Requested Status
Matthias Brantner Approve
Paul J. Lucas Approve
Review via email: mp+211848@code.launchpad.net

Commit message

1. Fixed user-reported core-dump for JSON-to-XML conversion.
2. Now also using getNameAsString() in PlanIterator.
3. Normalizing whitespace for JSound constraint error messages so they print better.

Description of the change

1. Fixed user-reported core-dump for JSON-to-XML conversion.
2. Now also using getNameAsString() in PlanIterator.
3. Normalizing whitespace for JSound constraint error messages so they print better.

To post a comment you must log in.
Revision history for this message
Paul J. Lucas (paul-lucas) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue starting for the following merge proposals:
https://code.launchpad.net/~paul-lucas/zorba/pjl-misc/+merge/211848

Progress dashboard at http://jenkins.zorba.io:8180/view/ValidationQueue

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

Voting criteria failed for the following merge proposals:

https://code.launchpad.net/~paul-lucas/zorba/pjl-misc/+merge/211848 :
Votes: {'Approve': 1}

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

Validation queue result for https://code.launchpad.net/~paul-lucas/zorba/pjl-misc/+merge/211848

Stage "CommitZorba" failed.

Check console output at http://jenkins.lambda.nu:8180/job/CommitZorba/309/console to view the results.

Revision history for this message
Matthias Brantner (matthias-brantner) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue starting for the following merge proposals:
https://code.launchpad.net/~paul-lucas/zorba/pjl-misc/+merge/211848

Progress dashboard at http://jenkins.zorba.io:8180/view/ValidationQueue

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

Validation queue succeeded - proposal merged!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/runtime/base/plan_iterator.cpp'
--- src/runtime/base/plan_iterator.cpp 2014-02-25 00:14:59 +0000
+++ src/runtime/base/plan_iterator.cpp 2014-03-20 02:10:46 +0000
@@ -232,7 +232,7 @@
232 else232 else
233 std::cout << "next (" << iter;233 std::cout << "next (" << iter;
234234
235 std::cout << " = " << typeid (*iter).name()235 std::cout << " = " << iter->getNameAsString() // typeid (*iter).name()
236 << ") -> "236 << ") -> "
237 << "status: " << status << " -> "237 << "status: " << status << " -> "
238 << ((status && result != NULL) ? result->show().c_str() : "null")238 << ((status && result != NULL) ? result->show().c_str() : "null")
239239
=== modified file 'src/runtime/json/snelson.cpp'
--- src/runtime/json/snelson.cpp 2013-12-27 15:11:16 +0000
+++ src/runtime/json/snelson.cpp 2014-03-20 02:10:46 +0000
@@ -186,6 +186,7 @@
186 ADD_PAIR_ELEMENT( value_item->getStringValue() );186 ADD_PAIR_ELEMENT( value_item->getStringValue() );
187 PUSH_ITEM( xml );187 PUSH_ITEM( xml );
188 value_item = json_item->getObjectValue( value_item );188 value_item = json_item->getObjectValue( value_item );
189 ZORBA_ASSERT( !!value_item );
189 added_pair_element = true;190 added_pair_element = true;
190 }191 }
191192
@@ -246,6 +247,7 @@
246 ADD_TYPE_ATTRIBUTE( "array" );247 ADD_TYPE_ATTRIBUTE( "array" );
247 ADD_ITEM_ELEMENT( "array" );248 ADD_ITEM_ELEMENT( "array" );
248 PUSH_STATE( in_array );249 PUSH_STATE( in_array );
250 PUSH_ITEM( json );
249 PUSH_ITERATOR( cur_iter );251 PUSH_ITERATOR( cur_iter );
250 cur_iter = value_item->getArrayValues();252 cur_iter = value_item->getArrayValues();
251 cur_iter->open();253 cur_iter->open();
252254
=== modified file 'src/runtime/jsound/jsound_util.cpp'
--- src/runtime/jsound/jsound_util.cpp 2014-03-14 22:38:03 +0000
+++ src/runtime/jsound/jsound_util.cpp 2014-03-20 02:10:46 +0000
@@ -1951,13 +1951,15 @@
1951 it->open();1951 it->open();
1952 while ( it->next( item ) ) {1952 while ( it->next( item ) ) {
1953 ASSERT_TYPE( item, "constraint", XS_STRING );1953 ASSERT_TYPE( item, "constraint", XS_STRING );
1954 zstring const constraint_str( item->getStringValue() );1954 zstring constraint_str( item->getStringValue() );
1955 try {1955 try {
1956 unique_ptr<constraint> c( new constraint( constraint_str ) );1956 unique_ptr<constraint> c( new constraint( constraint_str ) );
1957 constraints_.push_back( c.get() );1957 constraints_.push_back( c.get() );
1958 c.release();1958 c.release();
1959 }1959 }
1960 catch ( ZorbaException const &e ) {1960 catch ( ZorbaException const &e ) {
1961 ascii::replace_all( constraint_str, '\n', ' ' );
1962 ascii::normalize_space( constraint_str );
1961 throw XQUERY_EXCEPTION(1963 throw XQUERY_EXCEPTION(
1962 jse::ILLEGAL_FACET_VALUE,1964 jse::ILLEGAL_FACET_VALUE,
1963 ERROR_PARAMS(1965 ERROR_PARAMS(
19641966
=== added file 'test/rbkt/ExpQueryResults/zorba/json/json-snelson-j2x-object-06.xml.res'
--- test/rbkt/ExpQueryResults/zorba/json/json-snelson-j2x-object-06.xml.res 1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/json/json-snelson-j2x-object-06.xml.res 2014-03-20 02:10:46 +0000
@@ -0,0 +1,8 @@
1<json xmlns="http://john.snelson.org.uk/parsing-json-into-xquery" type="object">
2 <pair name="x" type="object">
3 <pair name="a" type="array">
4 <item type="number">1</item>
5 </pair>
6 <pair name="b" type="number">2</pair>
7 </pair>
8</json>
09
=== added file 'test/rbkt/Queries/zorba/json/json-snelson-j2x-object-06.xq'
--- test/rbkt/Queries/zorba/json/json-snelson-j2x-object-06.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/json/json-snelson-j2x-object-06.xq 2014-03-20 02:10:46 +0000
@@ -0,0 +1,12 @@
1import module namespace jx = "http://zorba.io/modules/json-xml";
2
3let $json :=
4 {
5 "x" : {
6 "a" : [ 1 ],
7 "b" : 2
8 }
9 }
10return jx:json-to-xml( $json )
11
12(: vim:set et sw=2 ts=2: :)

Subscribers

People subscribed via source and target branches