Skip to content

Commit fa6d1fb

Browse files
committed
Cleanup[bmqt::Uri]: add future deprecation note for initialize/shutdown; remove its usage
Signed-off-by: Evgeny Malygin <[email protected]>
1 parent fbb844e commit fa6d1fb

37 files changed

+65
-277
lines changed

src/applications/bmqtool/bmqtool.m.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -434,9 +434,6 @@ int main(int argc, const char* argv[])
434434
// Make TimeUtil thread-safe by calling initialize
435435
bsls::TimeUtil::initialize();
436436

437-
// Prepare the UriParser regexp
438-
bmqt::UriParser::initialize();
439-
440437
// Test allocator
441438
balst::StackTraceTestAllocator stta;
442439
stta.setFailureHandler(&stta.failNoop);

src/groups/bmq/bmqa/bmqa_closequeuestatus.t.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,6 @@ int main(int argc, char* argv[])
269269
{
270270
TEST_PROLOG(bmqtst::TestHelper::e_DEFAULT);
271271

272-
bmqt::UriParser::initialize(bmqtst::TestHelperUtil::allocator());
273-
274272
switch (_testCase) {
275273
case 0:
276274
case 3: test3_print(); break;
@@ -282,7 +280,5 @@ int main(int argc, char* argv[])
282280
} break;
283281
}
284282

285-
bmqt::UriParser::shutdown();
286-
287283
TEST_EPILOG(bmqtst::TestHelper::e_CHECK_DEF_GBL_ALLOC);
288284
}

src/groups/bmq/bmqa/bmqa_configurequeuestatus.t.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,6 @@ int main(int argc, char* argv[])
271271
{
272272
TEST_PROLOG(bmqtst::TestHelper::e_DEFAULT);
273273

274-
bmqt::UriParser::initialize(bmqtst::TestHelperUtil::allocator());
275-
276274
switch (_testCase) {
277275
case 0:
278276
case 3: test3_print(); break;
@@ -284,7 +282,5 @@ int main(int argc, char* argv[])
284282
} break;
285283
}
286284

287-
bmqt::UriParser::shutdown();
288-
289285
TEST_EPILOG(bmqtst::TestHelper::e_CHECK_DEF_GBL_ALLOC);
290286
}

src/groups/bmq/bmqa/bmqa_mocksession.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,6 @@ void MockSession::initialize(bslma::Allocator* allocator)
635635

636636
bmqsys::Time::initialize(g_alloc_p);
637637
bmqp::ProtocolUtil::initialize(g_alloc_p);
638-
bmqt::UriParser::initialize(g_alloc_p);
639638

640639
g_bufferFactory_p = new (*g_alloc_p)
641640
bdlbb::PooledBlobBufferFactory(1024, g_alloc_p);
@@ -653,7 +652,6 @@ void MockSession::shutdown()
653652
return; // RETURN
654653
}
655654

656-
bmqt::UriParser::shutdown();
657655
bmqp::ProtocolUtil::shutdown();
658656
bmqsys::Time::shutdown();
659657
g_alloc_p->deleteObject(g_bufferFactory_p);

src/groups/bmq/bmqa/bmqa_mocksession.t.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1433,8 +1433,6 @@ int main(int argc, char* argv[])
14331433
{
14341434
TEST_PROLOG(bmqtst::TestHelper::e_DEFAULT);
14351435

1436-
bmqt::UriParser::initialize(bmqtst::TestHelperUtil::allocator());
1437-
14381436
switch (_testCase) {
14391437
case 0:
14401438
case 8: test8_postBlockedToSuspendedQueue(); break;
@@ -1451,7 +1449,5 @@ int main(int argc, char* argv[])
14511449
} break;
14521450
}
14531451

1454-
bmqt::UriParser::shutdown();
1455-
14561452
TEST_EPILOG(bmqtst::TestHelper::e_DEFAULT);
14571453
}

src/groups/bmq/bmqa/bmqa_openqueuestatus.t.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,6 @@ int main(int argc, char* argv[])
270270
{
271271
TEST_PROLOG(bmqtst::TestHelper::e_DEFAULT);
272272

273-
bmqt::UriParser::initialize(bmqtst::TestHelperUtil::allocator());
274-
275273
switch (_testCase) {
276274
case 0:
277275
case 3: test3_print(); break;
@@ -283,7 +281,5 @@ int main(int argc, char* argv[])
283281
} break;
284282
}
285283

286-
bmqt::UriParser::shutdown();
287-
288284
TEST_EPILOG(bmqtst::TestHelper::e_CHECK_DEF_GBL_ALLOC);
289285
}

src/groups/bmq/bmqimp/bmqimp_application.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -659,9 +659,7 @@ Application::Application(
659659
bmqsys::Time::initialize();
660660
}
661661

662-
// UriParser and ProtocolUtil initialization/shutdown are thread-safe and
663-
// refcounted
664-
bmqt::UriParser::initialize();
662+
// ProtocolUtil initialization/shutdown is thread-safe and refcounted
665663
bmqp::ProtocolUtil::initialize();
666664

667665
// Start the EventScheduler. We do this here in constructor and not in
@@ -718,7 +716,6 @@ Application::~Application()
718716

719717
// ProtocolUtil::shutdown is thread-safe and ref-counted
720718
bmqp::ProtocolUtil::shutdown();
721-
bmqt::UriParser::shutdown();
722719
}
723720

724721
int Application::start(const bsls::TimeInterval& timeout)

src/groups/bmq/bmqimp/bmqimp_application.t.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,7 @@ int main(int argc, char* argv[])
195195
} break;
196196
}
197197

198-
TEST_EPILOG(bmqtst::TestHelper::e_DEFAULT);
199-
// Global: The global allocator is used to initialize the
200-
// bmqt::URIParser RegEx.
198+
TEST_EPILOG(bmqtst::TestHelper::e_CHECK_GBL_ALLOC);
201199
// Default: EventQueue uses bmqc::MonitoredFixedQueue, which uses
202200
// 'bdlcc::SharedObjectPool' which uses bslmt::Semaphore which
203201
// generates a unique name using an ostringstream, hence the

src/groups/bmq/bmqimp/bmqimp_brokersession.t.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10211,7 +10211,6 @@ int main(int argc, char* argv[])
1021110211
TEST_PROLOG(bmqtst::TestHelper::e_DEFAULT);
1021210212

1021310213
bmqsys::Time::initialize();
10214-
bmqt::UriParser::initialize(bmqtst::TestHelperUtil::allocator());
1021510214
bmqp::ProtocolUtil::initialize(bmqtst::TestHelperUtil::allocator());
1021610215

1021710216
switch (_testCase) {
@@ -10293,12 +10292,9 @@ int main(int argc, char* argv[])
1029310292
}
1029410293

1029510294
bmqsys::Time::shutdown();
10296-
bmqt::UriParser::shutdown();
1029710295
bmqp::ProtocolUtil::shutdown();
1029810296

10299-
TEST_EPILOG(bmqtst::TestHelper::e_DEFAULT);
10300-
// Global: The global allocator is used to initialize the
10301-
// bmqt::URIParser RegEx.
10297+
TEST_EPILOG(bmqtst::TestHelper::e_CHECK_GBL_ALLOC);
1030210298
// Default: EventQueue uses bmqc::MonitoredFixedQueue, which uses
1030310299
// 'bdlcc::SharedObjectPool' which uses bslmt::Semaphore which
1030410300
// generates a unique name using an ostringstream, hence the

src/groups/bmq/bmqimp/bmqimp_event.t.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1620,7 +1620,6 @@ int main(int argc, char* argv[])
16201620
{
16211621
TEST_PROLOG(bmqtst::TestHelper::e_DEFAULT);
16221622
bmqp::ProtocolUtil::initialize(bmqtst::TestHelperUtil::allocator());
1623-
bmqt::UriParser::initialize(bmqtst::TestHelperUtil::allocator());
16241623

16251624
switch (_testCase) {
16261625
case 0:
@@ -1642,7 +1641,6 @@ int main(int argc, char* argv[])
16421641
} break;
16431642
}
16441643

1645-
bmqt::UriParser::shutdown();
16461644
bmqp::ProtocolUtil::shutdown();
16471645

16481646
TEST_EPILOG(bmqtst::TestHelper::e_CHECK_DEF_GBL_ALLOC);

0 commit comments

Comments
 (0)