Skip to content

Commit 1d634c9

Browse files
shouzhiclaude
andcommitted
ORC-2167: [C++] Minor formatting cleanup in Reader and TestReader
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 8850c6b commit 1d634c9

2 files changed

Lines changed: 5 additions & 10 deletions

File tree

c++/src/Reader.cc

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1253,10 +1253,8 @@ namespace orc {
12531253
stripeTotalLength >= fileLength) {
12541254
std::stringstream msg;
12551255
msg << "Malformed StripeInformation at stripe index " << currentStripe_
1256-
<< ": fileLength=" << fileLength
1257-
<< ", StripeInfo=(offset=" << stripeOffset
1258-
<< ", indexLength=" << indexLength
1259-
<< ", dataLength=" << dataLength
1256+
<< ": fileLength=" << fileLength << ", StripeInfo=(offset=" << stripeOffset
1257+
<< ", indexLength=" << indexLength << ", dataLength=" << dataLength
12601258
<< ", footerLength=" << footerLength << ")";
12611259
throw ParseError(msg.str());
12621260
}
@@ -1664,8 +1662,7 @@ namespace orc {
16641662
addOverflow(tailSize, footerSize, &tailSize) || tailSize >= fileLength) {
16651663
std::stringstream msg;
16661664
msg << "Invalid tail size: footerSize=" << footerSize
1667-
<< ", postscriptLength=" << postscriptLength
1668-
<< ", fileLength=" << fileLength;
1665+
<< ", postscriptLength=" << postscriptLength << ", fileLength=" << fileLength;
16691666
throw ParseError(msg.str());
16701667
}
16711668
uint64_t footerOffset;

c++/test/TestReader.cc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1298,8 +1298,7 @@ namespace orc {
12981298
maliciousData.push_back(static_cast<char>(postscriptLen));
12991299

13001300
// Create reader and expect ParseError
1301-
auto stream = std::make_unique<MemoryInputStream>(
1302-
maliciousData.data(), maliciousData.size());
1301+
auto stream = std::make_unique<MemoryInputStream>(maliciousData.data(), maliciousData.size());
13031302

13041303
ReaderOptions options;
13051304
EXPECT_THROW(createReader(std::move(stream), options), ParseError);
@@ -1346,8 +1345,7 @@ namespace orc {
13461345
uint8_t postscriptLen = 16;
13471346
maliciousData.push_back(static_cast<char>(postscriptLen));
13481347

1349-
auto stream = std::make_unique<MemoryInputStream>(
1350-
maliciousData.data(), maliciousData.size());
1348+
auto stream = std::make_unique<MemoryInputStream>(maliciousData.data(), maliciousData.size());
13511349

13521350
ReaderOptions options;
13531351
EXPECT_THROW(createReader(std::move(stream), options), ParseError);

0 commit comments

Comments
 (0)