Skip to content

feat: 404 Added getDefaultValue to Codec#405

Merged
imalygin merged 4 commits intomainfrom
404-get-default
Mar 1, 2025
Merged

feat: 404 Added getDefaultValue to Codec#405
imalygin merged 4 commits intomainfrom
404-get-default

Conversation

@imalygin
Copy link
Copy Markdown
Contributor

Description:

This PR adds default method to the Codec's generated code.

Related issue(s):

Fixes #404

Notes for reviewer:

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

@imalygin imalygin requested review from a team as code owners February 28, 2025 22:46
@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 28, 2025

JUnit Test Report

   67 files  ±0     67 suites  ±0   4m 54s ⏱️ + 1m 0s
1 272 tests ±0  1 269 ✅ ±0   3 💤 ±0  0 ❌ ±0 
7 127 runs  ±0  7 108 ✅ ±0  19 💤 ±0  0 ❌ ±0 

Results for commit 5a5f0f7. ± Comparison against base commit c82fdbc.

This pull request removes 8 and adds 7 tests. Note that renamed tests count towards both.
, 1
com.hedera.pbj.runtime.ProtoWriterToolsTest ‑ [1] FLOAT, com.hedera.pbj.runtime.ProtoWriterToolsTest$$Lambda/0x00007fd530353298@470f0637, [0.1, 0.5, 100.0], 12, com.hedera.pbj.runtime.ProtoWriterToolsTest$$Lambda/0x00007fd5303534a8@6b278b17
com.hedera.pbj.runtime.ProtoWriterToolsTest ‑ [1] STRING, com.hedera.pbj.runtime.ProtoWriterToolsTest$$Lambda/0x00007fd530364420@42ebece0, [string 1, testing here, testing there], com.hedera.pbj.runtime.ProtoWriterToolsTest$$Lambda/0x00007fd530364630@15c4b1a4
com.hedera.pbj.runtime.ProtoWriterToolsTest ‑ [2] BYTES, com.hedera.pbj.runtime.ProtoWriterToolsTest$$Lambda/0x00007fd530364840@6d695ec4, [010203, ff7f0f, 42da07370bff], com.hedera.pbj.runtime.ProtoWriterToolsTest$$Lambda/0x00007fd530364a50@20556566
com.hedera.pbj.runtime.ProtoWriterToolsTest ‑ [2] DOUBLE, com.hedera.pbj.runtime.ProtoWriterToolsTest$$Lambda/0x00007fd5303536b8@1b5f960a, [0.1, 0.5, 100.0, 1.7653472635472653E240], 32, com.hedera.pbj.runtime.ProtoWriterToolsTest$$Lambda/0x00007fd5303538c8@53ddabc6
com.hedera.pbj.runtime.ProtoWriterToolsTest ‑ [3] BOOL, com.hedera.pbj.runtime.ProtoWriterToolsTest$$Lambda/0x00007fd530353ad8@39ac8c0c, [true, false, false, true, true, true], 6, com.hedera.pbj.runtime.ProtoWriterToolsTest$$Lambda/0x00007fd530353ce8@361f1647
com.hedera.pbj.runtime.ProtoWriterToolsTest ‑ [4] ENUM, com.hedera.pbj.runtime.ProtoWriterToolsTest$$Lambda/0x00007fd530356000@51172948, [Mock for EnumWithProtoMetadata, hashCode: 1377593328, Mock for EnumWithProtoMetadata, hashCode: 1786422901, Mock for EnumWithProtoMetadata, hashCode: 1860096282], 3, com.hedera.pbj.runtime.ProtoWriterToolsTest$$Lambda/0x00007fd530356210@35d81657
com.hedera.pbj.runtime.Utf8ToolsTest ‑ [4] 
com.hedera.pbj.runtime.ProtoWriterToolsTest ‑ [1] FLOAT, com.hedera.pbj.runtime.ProtoWriterToolsTest$$Lambda/0x00007efde0353298@2ae5580, [0.1, 0.5, 100.0], 12, com.hedera.pbj.runtime.ProtoWriterToolsTest$$Lambda/0x00007efde03534a8@4203529f
com.hedera.pbj.runtime.ProtoWriterToolsTest ‑ [1] STRING, com.hedera.pbj.runtime.ProtoWriterToolsTest$$Lambda/0x00007efde0364420@341964d0, [string 1, testing here, testing there], com.hedera.pbj.runtime.ProtoWriterToolsTest$$Lambda/0x00007efde0364630@51b59d58
com.hedera.pbj.runtime.ProtoWriterToolsTest ‑ [2] BYTES, com.hedera.pbj.runtime.ProtoWriterToolsTest$$Lambda/0x00007efde0364840@e4ef4c0, [010203, ff7f0f, 42da07370bff], com.hedera.pbj.runtime.ProtoWriterToolsTest$$Lambda/0x00007efde0364a50@5ca8bd01
com.hedera.pbj.runtime.ProtoWriterToolsTest ‑ [2] DOUBLE, com.hedera.pbj.runtime.ProtoWriterToolsTest$$Lambda/0x00007efde03536b8@39ac8c0c, [0.1, 0.5, 100.0, 1.7653472635472653E240], 32, com.hedera.pbj.runtime.ProtoWriterToolsTest$$Lambda/0x00007efde03538c8@361f1647
com.hedera.pbj.runtime.ProtoWriterToolsTest ‑ [3] BOOL, com.hedera.pbj.runtime.ProtoWriterToolsTest$$Lambda/0x00007efde0353ad8@51172948, [true, false, false, true, true, true], 6, com.hedera.pbj.runtime.ProtoWriterToolsTest$$Lambda/0x00007efde0353ce8@6f2a3b37
com.hedera.pbj.runtime.ProtoWriterToolsTest ‑ [4] ENUM, com.hedera.pbj.runtime.ProtoWriterToolsTest$$Lambda/0x00007efde0356000@323b0632, [Mock for EnumWithProtoMetadata, hashCode: 1159395201, Mock for EnumWithProtoMetadata, hashCode: 1613378103, Mock for EnumWithProtoMetadata, hashCode: 1263607393], 3, com.hedera.pbj.runtime.ProtoWriterToolsTest$$Lambda/0x00007efde0356210@3180aee
com.hedera.pbj.runtime.Utf8ToolsTest ‑ [4] 
, 1

♻️ This comment has been updated with latest results.

Signed-off-by: Ivan Malygin <ivan@swirldslabs.com>
Signed-off-by: Ivan Malygin <ivan@swirldslabs.com>
Signed-off-by: Ivan Malygin <ivan@swirldslabs.com>
Signed-off-by: Ivan Malygin <ivan@swirldslabs.com>
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 1, 2025

Integration Test Report

    384 files  ±  0      384 suites  ±0   14m 16s ⏱️ + 1m 22s
114 731 tests +370  114 731 ✅ +370  0 💤 ±0  0 ❌ ±0 
114 959 runs  +370  114 959 ✅ +370  0 💤 ±0  0 ❌ ±0 

Results for commit 5a5f0f7. ± Comparison against base commit c82fdbc.

This pull request removes 3 and adds 373 tests. Note that renamed tests count towards both.
com.hedera.pbj.integration.test.ParserNeverWrapsTest ‑ [1] com.hedera.pbj.integration.test.ParserNeverWrapsTest$$Lambda/0x00007fd620590d38@5586a631
com.hedera.pbj.integration.test.ParserNeverWrapsTest ‑ [2] com.hedera.pbj.integration.test.ParserNeverWrapsTest$$Lambda/0x00007fd620590f68@5dad9b16
com.hedera.pbj.integration.test.ParserNeverWrapsTest ‑ [3] com.hedera.pbj.integration.test.ParserNeverWrapsTest$$Lambda/0x00007fd620591198@3098130
com.hedera.hapi.block.stream.input.tests.EventHeaderTest ‑ testCodecGetDefaultValueMethod()
com.hedera.hapi.block.stream.input.tests.RoundHeaderTest ‑ testCodecGetDefaultValueMethod()
com.hedera.hapi.block.stream.output.tests.AppendFileOutputTest ‑ testCodecGetDefaultValueMethod()
com.hedera.hapi.block.stream.output.tests.ApproveAllowanceOutputTest ‑ testCodecGetDefaultValueMethod()
com.hedera.hapi.block.stream.output.tests.AssociateTokenOutputTest ‑ testCodecGetDefaultValueMethod()
com.hedera.hapi.block.stream.output.tests.BlockHeaderTest ‑ testCodecGetDefaultValueMethod()
com.hedera.hapi.block.stream.output.tests.BurnTokenOutputTest ‑ testCodecGetDefaultValueMethod()
com.hedera.hapi.block.stream.output.tests.CallContractOutputTest ‑ testCodecGetDefaultValueMethod()
com.hedera.hapi.block.stream.output.tests.CreateAccountOutputTest ‑ testCodecGetDefaultValueMethod()
com.hedera.hapi.block.stream.output.tests.CreateContractOutputTest ‑ testCodecGetDefaultValueMethod()
…

@imalygin imalygin merged commit 1f52557 into main Mar 1, 2025
10 checks passed
@imalygin imalygin deleted the 404-get-default branch March 1, 2025 04:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add getDefaultInstance method to codecs

3 participants