-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Migrate deprecated APIs and suppress compiler warnings (6) #7543
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
WalkthroughThis PR adds Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes
Areas requiring extra attention:
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
♻️ Duplicate comments (7)
core/src/main/java/bisq/core/payment/payload/NequiAccountPayload.java (1)
74-84: Same deprecation suppression pattern as other payment payloads.This follows the identical pattern observed across all payment payload classes in this PR. The same considerations about documentation and migration strategy apply here.
core/src/main/java/bisq/core/payment/payload/RtgsAccountPayload.java (1)
80-92: Same deprecation suppression pattern.Identical to other payment payload classes in this PR.
core/src/main/java/bisq/core/payment/payload/SwiftAccountPayload.java (1)
142-165: Same deprecation suppression pattern.Consistent with the broader PR approach.
core/src/main/java/bisq/core/payment/payload/SepaInstantAccountPayload.java (1)
110-123: Same deprecation suppression pattern.Follows the established pattern across all payment payload fromProto methods.
core/src/main/java/bisq/core/payment/payload/AchTransferAccountPayload.java (1)
94-110: Same deprecation suppression pattern.Consistent with other payment account payload classes.
core/src/main/java/bisq/core/payment/payload/MoneseAccountPayload.java (1)
72-80: Same deprecation suppression pattern.Mirrors the approach taken in other payment payload classes.
core/src/main/java/bisq/core/payment/payload/DomesticWireTransferAccountPayload.java (1)
94-109: Same deprecation suppression pattern.Follows the consistent approach across all reviewed payment payload classes.
🧹 Nitpick comments (3)
desktop/src/main/java/bisq/desktop/main/dao/wallet/BsqWalletView.java (1)
126-141: Suppression is reasonable; consider using wildcards to eliminate the rawtypes warning.The
@SuppressWarningsannotation appropriately addresses compiler warnings arising from the raw type cast on line 134. Given the navigation framework's constraint of passing data asObject, this suppression is justified.Consider this minor refinement to eliminate the rawtypes warning entirely:
- if (data instanceof Tuple2) { - ((BsqSendView) view).fillFromTradeData((Tuple2) data); + if (data instanceof Tuple2<?, ?>) { + ((BsqSendView) view).fillFromTradeData((Tuple2<?, ?>) data);This would allow you to remove
"rawtypes"from the suppression list, leaving only"unchecked"(which is unavoidable given theObjectparameter type).proto/src/main/proto/pb.proto (1)
1923-1923: Consider adding a comment to document the reserved field.Reserving tag 30 is the correct approach after removing the deprecated
buyer_security_deposit_as_longfield. However, adding a comment would help future maintainers understand why this tag is reserved.- reserved 30; + reserved 30; // Formerly buyer_security_deposit_as_long (deprecated and removed)core/src/main/java/bisq/core/payment/payload/InstantCryptoCurrencyPayload.java (1)
67-74: Systematic deprecation suppression - consider documenting migration strategy.This annotation follows a consistent pattern applied across 80+ files in the PR to suppress protobuf-related deprecation warnings. While the systematic approach is noted, the PR title mentions "Migrate deprecated APIs" but the implementation only suppresses warnings rather than actually migrating away from deprecated APIs.
Consider:
- Adding inline comments explaining which specific protobuf API calls are deprecated
- Documenting the planned migration path or timeline
- Creating a tracking issue if the actual migration is deferred
This helps future maintainers understand what needs to be addressed and prevents the suppressions from becoming forgotten technical debt.
Are there plans to actually migrate away from the deprecated protobuf APIs, or is this suppression intended as the permanent solution? If migration is planned, consider adding a TODO comment with a reference to the tracking issue.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (72)
core/src/main/java/bisq/core/offer/OpenOfferManager.java(1 hunks)core/src/main/java/bisq/core/offer/bisq_v1/OfferPayload.java(2 hunks)core/src/main/java/bisq/core/payment/payload/AchTransferAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/AdvancedCashAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/AliPayAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/AmazonGiftCardAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/AustraliaPayidAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/BizumAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/CapitualAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/CashByMailAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/CashDepositAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/CelPayAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/ClearXchangeAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/CryptoCurrencyAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/DomesticWireTransferAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/F2FAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/FasterPaymentsAccountPayload.java(2 hunks)core/src/main/java/bisq/core/payment/payload/HalCashAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/ImpsAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/InstantCryptoCurrencyPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/InteracETransferAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/JapanBankAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/MercadoPagoAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/MoneseAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/MoneyBeamAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/MoneyGramAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/NationalBankAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/NeftAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/NequiAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/PaxumAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/PaymentAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/PayseraAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/PaytmAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/PerfectMoneyAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/PixAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/PopmoneyAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/PromptPayAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/RevolutAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/RtgsAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/SameBankAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/SatispayAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/SbpAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/SepaAccountPayload.java(2 hunks)core/src/main/java/bisq/core/payment/payload/SepaInstantAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/SpecificBanksAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/StrikeAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/SwiftAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/SwishAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/TikkieAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/TransferwiseAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/TransferwiseUsdAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/USPostalMoneyOrderAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/UpholdAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/UpiAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/VerseAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/WeChatPayAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/WesternUnionAccountPayload.java(1 hunks)core/src/main/java/bisq/core/proto/CoreProtoResolver.java(2 hunks)core/src/main/java/bisq/core/trade/statistics/TradeStatisticsConverter.java(3 hunks)core/src/main/java/bisq/core/trade/statistics/TradeStatisticsManager.java(1 hunks)core/src/main/java/bisq/core/user/PreferencesPayload.java(0 hunks)desktop/src/main/java/bisq/desktop/common/fxml/FxmlViewLoader.java(1 hunks)desktop/src/main/java/bisq/desktop/components/MenuItem.java(1 hunks)desktop/src/main/java/bisq/desktop/main/account/content/fiataccounts/FiatAccountsView.java(1 hunks)desktop/src/main/java/bisq/desktop/main/dao/wallet/BsqWalletView.java(1 hunks)desktop/src/main/java/bisq/desktop/main/portfolio/cloneoffer/CloneOfferDataModel.java(1 hunks)desktop/src/main/java/bisq/desktop/main/portfolio/pendingtrades/steps/buyer/BuyerStep2View.java(1 hunks)p2p/src/main/java/bisq/network/http/SocksSSLConnectionSocketFactory.java(1 hunks)p2p/src/test/java/bisq/network/p2p/storage/messages/AddDataMessageTest.java(1 hunks)p2p/src/test/java/bisq/network/p2p/storage/mocks/AppendOnlyDataStoreServiceFake.java(1 hunks)p2p/src/test/java/bisq/network/p2p/storage/mocks/MapStoreServiceFake.java(1 hunks)proto/src/main/proto/pb.proto(1 hunks)
💤 Files with no reviewable changes (1)
- core/src/main/java/bisq/core/user/PreferencesPayload.java
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: Test Java 11, windows-latest
- GitHub Check: Test Java 11, ubuntu-latest
- GitHub Check: Test Java 11, macOS-latest
🔇 Additional comments (65)
core/src/main/java/bisq/core/payment/payload/USPostalMoneyOrderAccountPayload.java (1)
77-85: LGTM - Deprecation suppression is appropriate.The
@SuppressWarnings("deprecation")annotation correctly silences warnings from deprecated protobuf APIs without altering behavior. This is consistent with the PR's systematic approach to managing compiler warnings.core/src/main/java/bisq/core/payment/payload/CashDepositAccountPayload.java (1)
114-133: LGTM - Consistent deprecation suppression.The annotation correctly silences protobuf deprecation warnings without changing functionality.
core/src/main/java/bisq/core/payment/payload/ClearXchangeAccountPayload.java (1)
77-85: LGTM - Standard deprecation suppression.Correctly applied annotation consistent with the PR's systematic warning management approach.
core/src/main/java/bisq/core/payment/payload/StrikeAccountPayload.java (1)
74-84: LGTM - Appropriate suppression.The annotation is correctly placed and consistent with the broader PR pattern.
core/src/main/java/bisq/core/trade/statistics/TradeStatisticsConverter.java (3)
57-112: LGTM - Suppression appropriate for legacy data conversion.The constructor handles migration from deprecated
TradeStatistics2to the newer format. Suppressing deprecation warnings is appropriate for this backward compatibility code.
119-157: LGTM - Conversion utility correctly suppresses warnings.This private static method performs batch conversion of legacy trade statistics. The deprecation suppression is necessary and appropriate for backward compatibility logic.
159-181: LGTM - Single-item converter appropriately suppressed.The conversion from
TradeStatistics2toTradeStatistics3requires interaction with deprecated APIs. Suppression is correctly applied.p2p/src/test/java/bisq/network/p2p/storage/messages/AddDataMessageTest.java (1)
67-85: LGTM - Test warning suppression is appropriate.The
@SuppressWarnings("deprecation")annotation correctly silences protobuf deprecation warnings in this test method.core/src/main/java/bisq/core/payment/payload/TransferwiseUsdAccountPayload.java (1)
82-94: LGTM - Final payload suppression consistent with PR pattern.The deprecation suppression is correctly applied and matches the approach used across all other payment payload classes in this PR.
core/src/main/java/bisq/core/payment/payload/AdvancedCashAccountPayload.java (1)
73-80: LGTM - Deprecation suppression appropriately scoped.The
@SuppressWarnings("deprecation")annotation is correctly applied to thefromProtomethod to silence warnings from deprecated protobuf API usage. This is a reasonable approach for managing build warnings while the codebase continues to use these APIs.core/src/main/java/bisq/core/payment/payload/HalCashAccountPayload.java (1)
71-78: LGTM - Consistent pattern applied.The deprecation suppression follows the same pattern as other payment payload classes in this PR, appropriately scoped to the
fromProtofactory method.desktop/src/main/java/bisq/desktop/main/portfolio/pendingtrades/steps/buyer/BuyerStep2View.java (1)
242-244: LGTM - Broader method scope noted.The deprecation suppression is applied to the entire
addContentmethod (250+ lines). While this is a broader scope than the payment payloadfromProtomethods, it aligns with the PR's objective of systematically suppressing build warnings from deprecated protobuf APIs.core/src/main/java/bisq/core/payment/payload/NationalBankAccountPayload.java (1)
89-106: LGTM - Standard pattern applied.The suppression annotation is appropriately applied to the
fromProtofactory method, consistent with the pattern used across other payment payload classes.core/src/main/java/bisq/core/trade/statistics/TradeStatisticsManager.java (1)
196-244: LGTM - Appropriate suppression for backward compatibility.The deprecation suppression on
maybeRepublishTradeStatisticsis justified given the method's use ofTradeStatistics2.from()(line 224) for backward compatibility with existing trade data. This aligns with the PR's systematic approach to managing deprecation warnings.core/src/main/java/bisq/core/payment/payload/SbpAccountPayload.java (1)
83-92: LGTM - Consistent with payment payload pattern.The deprecation suppression follows the established pattern for payment payload
fromProtomethods across this PR.core/src/main/java/bisq/core/payment/payload/AmazonGiftCardAccountPayload.java (1)
82-91: LGTM - Standard deprecation suppression applied.The suppression is appropriately scoped to the
fromProtomethod, consistent with the pattern across all payment payload classes in this PR.core/src/main/java/bisq/core/payment/payload/F2FAccountPayload.java (1)
88-100: LGTM - Final payment payload follows consistent pattern.The deprecation suppression on the
fromProtomethod is appropriately applied, maintaining consistency with all other payment payload classes in this systematic PR.core/src/main/java/bisq/core/payment/payload/NeftAccountPayload.java (1)
80-80: LGTM - Deprecation warning suppression applied consistently.The annotation appropriately silences deprecation warnings from protobuf APIs without altering method behavior.
core/src/main/java/bisq/core/payment/payload/CapitualAccountPayload.java (1)
73-73: LGTM - Deprecation warning suppression applied consistently.The annotation appropriately silences deprecation warnings from protobuf APIs without altering method behavior.
core/src/main/java/bisq/core/payment/payload/SpecificBanksAccountPayload.java (1)
102-102: LGTM - Deprecation warning suppression applied consistently.The annotation appropriately silences deprecation warnings from protobuf APIs without altering method behavior.
core/src/main/java/bisq/core/offer/OpenOfferManager.java (1)
959-959: LGTM - Deprecation warning suppression applied consistently.The annotation appropriately silences deprecation warnings from protobuf APIs in this offer migration method.
core/src/main/java/bisq/core/payment/payload/BizumAccountPayload.java (1)
74-74: LGTM - Deprecation warning suppression applied consistently.The annotation appropriately silences deprecation warnings from protobuf APIs without altering method behavior.
core/src/main/java/bisq/core/payment/payload/CashByMailAccountPayload.java (1)
81-81: LGTM - Deprecation warning suppression applied consistently.The annotation appropriately silences deprecation warnings from protobuf APIs without altering method behavior.
core/src/main/java/bisq/core/payment/payload/PaymentAccountPayload.java (1)
106-106: LGTM - Deprecation warning suppression applied consistently.The annotation appropriately silences deprecation warnings from protobuf builder construction in this base class method.
core/src/main/java/bisq/core/payment/payload/PaytmAccountPayload.java (1)
74-74: LGTM - Deprecation warning suppression applied consistently.The annotation appropriately silences deprecation warnings from protobuf APIs without altering method behavior.
core/src/main/java/bisq/core/payment/payload/PerfectMoneyAccountPayload.java (1)
73-73: Deprecation suppression is appropriately scoped.The method-level
@SuppressWarnings("deprecation")annotation is correctly applied. This approach is preferable to class-level suppression as it limits the scope of warning suppression to only the specific method that interacts with deprecated protobuf APIs.core/src/main/java/bisq/core/payment/payload/SepaAccountPayload.java (1)
97-97: Deprecation suppressions are appropriately scoped.Both
toProtoMessage()andfromProto()methods correctly use method-level@SuppressWarnings("deprecation")annotations, limiting the scope to only the methods interacting with deprecated protobuf APIs.Also applies to: 115-115
core/src/main/java/bisq/core/payment/payload/WesternUnionAccountPayload.java (1)
94-94: Deprecation suppression is appropriately scoped.The method-level
@SuppressWarnings("deprecation")annotation is correctly applied to limit the scope of warning suppression.core/src/main/java/bisq/core/payment/payload/CryptoCurrencyAccountPayload.java (1)
67-67: Deprecation suppression is appropriately scoped.The method-level
@SuppressWarnings("deprecation")annotation is correctly applied.core/src/main/java/bisq/core/payment/payload/UpholdAccountPayload.java (1)
82-82: Deprecation suppression is appropriately scoped.The method-level
@SuppressWarnings("deprecation")annotation is correctly applied.core/src/main/java/bisq/core/payment/payload/MercadoPagoAccountPayload.java (1)
75-75: Deprecation suppression is appropriately scoped.The method-level
@SuppressWarnings("deprecation")annotation is correctly applied.core/src/main/java/bisq/core/payment/payload/RevolutAccountPayload.java (1)
95-95: Deprecation suppression is appropriately scoped.The method-level
@SuppressWarnings("deprecation")annotation is correctly applied.core/src/main/java/bisq/core/payment/payload/TransferwiseAccountPayload.java (1)
74-74: Deprecation suppression is appropriately scoped.The method-level
@SuppressWarnings("deprecation")annotation is correctly applied. This completes a consistent pattern of method-level deprecation suppression across all payment payload classes in this PR, which is an appropriate interim approach for managing deprecated protobuf API warnings.desktop/src/main/java/bisq/desktop/common/fxml/FxmlViewLoader.java (1)
60-60: LGTM - Appropriate warning suppression.The addition of
"deprecation"to the existing@SuppressWarningsannotation is appropriate for this method.desktop/src/main/java/bisq/desktop/main/account/content/fiataccounts/FiatAccountsView.java (1)
612-612: LGTM - Appropriate scope for deprecation suppression.The method-level suppression is appropriate for this private helper method containing the payment method form mappings.
core/src/main/java/bisq/core/payment/payload/AliPayAccountPayload.java (1)
70-77: LGTM - Standard protobuf deserialization warning suppression.The deprecation suppression on the
fromProtofactory method follows the consistent pattern across payment payload classes.core/src/main/java/bisq/core/payment/payload/PromptPayAccountPayload.java (1)
72-79: LGTM - Consistent with protobuf pattern.The deprecation suppression is appropriate for this protobuf deserialization method.
desktop/src/main/java/bisq/desktop/components/MenuItem.java (1)
145-148: LGTM - Improved suppression approach.Moving from comment-based to annotation-based suppression is the preferred approach for handling the unchecked cast warning on the array creation.
core/src/main/java/bisq/core/payment/payload/TikkieAccountPayload.java (1)
74-84: LGTM - Standard pattern.The deprecation suppression is consistent with the protobuf deserialization pattern used throughout the payment payload classes.
core/src/main/java/bisq/core/payment/payload/InteracETransferAccountPayload.java (1)
86-96: LGTM - Appropriate suppression.The deprecation suppression follows the established pattern for protobuf deserialization methods.
core/src/main/java/bisq/core/payment/payload/PopmoneyAccountPayload.java (1)
77-85: LGTM - Consistent with payment payload pattern.The deprecation suppression is appropriately scoped to the protobuf deserialization method.
core/src/main/java/bisq/core/payment/payload/PayseraAccountPayload.java (1)
72-79: LGTM - Deprecation suppression applied correctly.The
@SuppressWarnings("deprecation")annotation is appropriately scoped to thefromProtomethod, which interacts with deprecated protobuf APIs. This is part of a systematic approach across payment payload classes.core/src/main/java/bisq/core/payment/payload/UpiAccountPayload.java (1)
74-84: LGTM - Consistent deprecation handling.The deprecation suppression follows the same pattern as other payment payload classes in this PR.
core/src/main/java/bisq/core/payment/payload/AustraliaPayidAccountPayload.java (1)
80-89: LGTM - Deprecation suppression properly applied.The annotation correctly scopes the suppression to the protobuf deserialization method.
core/src/main/java/bisq/core/payment/payload/PaxumAccountPayload.java (1)
72-79: LGTM - Consistent with PR pattern.The deprecation warning suppression is correctly applied to the
fromProtofactory method.core/src/main/java/bisq/core/payment/payload/CelPayAccountPayload.java (1)
67-74: LGTM - Appropriate method-level suppression.The annotation is correctly scoped to suppress deprecation warnings in the protobuf deserialization logic.
core/src/main/java/bisq/core/payment/payload/VerseAccountPayload.java (1)
67-74: LGTM - Deprecation handling consistent.The suppression annotation is appropriately placed on the
fromProtomethod.core/src/main/java/bisq/core/payment/payload/FasterPaymentsAccountPayload.java (2)
75-84: LGTM - Serialization method suppression.The
@SuppressWarnings("deprecation")ontoProtoMessageappropriately handles deprecation warnings during protobuf serialization.
86-95: LGTM - Deserialization method suppression.The annotation on
fromProtocomplements thetoProtoMessagesuppression, covering both serialization directions.core/src/main/java/bisq/core/payment/payload/SatispayAccountPayload.java (1)
78-89: LGTM - Final file follows consistent pattern.The deprecation suppression is appropriately scoped and aligns with the systematic approach across all payment payload classes in this PR.
core/src/main/java/bisq/core/payment/payload/PixAccountPayload.java (1)
76-86: LGTM - Consistent deprecation suppression.The
@SuppressWarnings("deprecation")annotation appropriately suppresses warnings from deprecated protobuf APIs in the deserialization path. This follows the PR's systematic approach across payment payload classes.core/src/main/java/bisq/core/payment/payload/MoneyBeamAccountPayload.java (1)
75-82: LGTM - Consistent deprecation suppression.The deprecation suppression follows the same pattern as other payment payload classes in this PR.
core/src/main/java/bisq/core/proto/CoreProtoResolver.java (2)
101-259: LGTM - Appropriate suppression at resolver level.The
@SuppressWarnings("deprecation")annotation on this central resolver method is appropriate, as it delegates to numerous payment payloadfromProtomethods that access deprecated protobuf APIs.
261-285: LGTM - Consistent resolver-level suppression.The deprecation suppression aligns with the pattern established in the
PaymentAccountPayloadresolver method above.core/src/main/java/bisq/core/payment/payload/ImpsAccountPayload.java (1)
80-92: LGTM - Consistent deprecation suppression.The annotation follows the established pattern for payment payload deserialization methods.
core/src/main/java/bisq/core/payment/payload/MoneyGramAccountPayload.java (1)
89-100: LGTM - Consistent deprecation suppression.core/src/main/java/bisq/core/payment/payload/JapanBankAccountPayload.java (1)
101-115: LGTM - Consistent deprecation suppression.core/src/main/java/bisq/core/offer/bisq_v1/OfferPayload.java (2)
231-282: LGTM - Suppression on serialization path.The
@SuppressWarnings("deprecation")annotation appropriately suppresses warnings when converting to the protobuf representation. This complements the suppression on the deserialization path.
284-337: LGTM - Suppression on deserialization path.The deprecation suppression is consistent with the pattern used across payload classes in this PR.
desktop/src/main/java/bisq/desktop/main/portfolio/cloneoffer/CloneOfferDataModel.java (1)
200-237: LGTM - Inline suppression for constructor usage.The inline
@SuppressWarnings("deprecation")annotation before the variable declaration is valid Java syntax and appropriately targets just the deprecatedOfferPayloadconstructor usage. While most suppressions in this PR are at the method level, this local scope is more precise for this use case.core/src/main/java/bisq/core/payment/payload/SameBankAccountPayload.java (1)
89-106: LGTM - deprecation suppression is appropriate.The annotation correctly suppresses warnings from deprecated protobuf getter methods used during deserialization.
core/src/main/java/bisq/core/payment/payload/WeChatPayAccountPayload.java (1)
70-77: LGTM - consistent with the broader deprecation suppression pattern.core/src/main/java/bisq/core/payment/payload/SwishAccountPayload.java (1)
75-83: LGTM - deprecation suppression is appropriate.p2p/src/test/java/bisq/network/p2p/storage/mocks/MapStoreServiceFake.java (1)
47-51: LGTM - unchecked suppression is appropriate for test mock.The warning originates from Mockito's
mock()methods returning raw types.p2p/src/test/java/bisq/network/p2p/storage/mocks/AppendOnlyDataStoreServiceFake.java (1)
32-35: LGTM - unchecked suppression is appropriate for test mock.
p2p/src/main/java/bisq/network/http/SocksSSLConnectionSocketFactory.java
Outdated
Show resolved
Hide resolved
The recommendation is to switch to the UniformRandomProvider. This would however add a new dependency that's only used in the unit tests. [1] https://issues.apache.org/jira/browse/LANG-1604
…tAsLong The buyerSecurityDepositAsLong field was superseded by the buyerSecurityDepositAsPercent field.
It's too risky to refactor the code because it's used in the account age verification logic.
1c4271c to
5617c1e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
desktop/src/main/java/bisq/desktop/main/portfolio/cloneoffer/CloneOfferDataModel.java (1)
189-237: Cloned offer currently ignores edited amount/minAmount; consider correcting while adding the deprecation suppressionTwo points in this block:
Behavioral issue (pre‑existing):
Although the comment says “We clone the edited offer…”, the constructor call usessourceOfferPayload.getAmount()andsourceOfferPayload.getMinAmount()instead of the values fromeditedOfferPayload. That means any user changes to amount/minAmount in the clone UI are discarded when creating the cloned offer. If that’s not intentional, those arguments should be switched toeditedOfferPayload.getAmount()/getMinAmount().Suppression placement:
Using@SuppressWarnings("deprecation")on the local variable is valid and keeps the scope narrow. If more deprecations are added in this method later, it may be clearer to move the annotation tocreateClonedOffer()instead of repeating it on individual statements, but that’s purely stylistic.
🧹 Nitpick comments (6)
core/src/main/java/bisq/core/payment/payload/F2FAccountPayload.java (1)
88-100: Scoped deprecation suppression onfromProtois appropriateLimiting
@SuppressWarnings("deprecation")to this factory method keeps the warning localized to the legacy proto deserialization path without muting deprecations elsewhere, which is a good tradeoff while backward compatibility is required. You may optionally add a brief comment/TODO pointing to the proto fields or types that are deprecated so it’s clear when this suppression can be removed in future cleanup.core/src/main/java/bisq/core/payment/payload/PromptPayAccountPayload.java (1)
72-79: Method‑scoped deprecation suppression is appropriate hereAdding
@SuppressWarnings("deprecation")directly onfromProtokeeps the suppression narrowly scoped to the code that must touch deprecated proto accessors, matches the pattern used elsewhere in the PR, and doesn’t alter behavior. Once the protobuf API is updated, this method should be a candidate for replacing deprecated calls and dropping the suppression, but as-is the change looks good.desktop/src/main/java/bisq/desktop/main/dao/wallet/BsqWalletView.java (1)
126-141: Raw/unchecked suppression is correctly scoped to the generic‑unsafe helperGiven the existing
Objectdata parameter and rawTuple2cast, constraining@SuppressWarnings({"rawtypes", "unchecked"})to this overload is a pragmatic way to silence noise without affecting the rest of the class.core/src/main/java/bisq/core/offer/bisq_v1/OfferPayload.java (1)
231-337: Deprecation suppression on serialization/deserialization is justifiedBoth
toProtoMessage()andfromProto(...)legitimately interact with deprecated proto fields for backward compatibility; adding@SuppressWarnings("deprecation")here reduces noise without altering the serialization contract.core/src/main/java/bisq/core/payment/payload/BizumAccountPayload.java (1)
74-83: Bizum fromProto suppression is fine; consider tidying the local variable nameThe
@SuppressWarnings("deprecation")onfromProtois appropriate here, matching the rest of the payment payloads that still need deprecated proto fields. As a small readability tweak, you might renamepaytmAccountPayloadPBto something likebizumAccountPayloadPBto avoid confusion with the separate Paytm payload type.core/src/main/java/bisq/core/payment/payload/WeChatPayAccountPayload.java (1)
70-77: Consider documenting the deprecation suppression inline.While this follows the same pattern applied across payment payload classes in this PR, adding a brief inline comment would help future maintainers understand why suppression is used rather than migrating to non-deprecated proto APIs.
Example:
+// Suppressing deprecation warnings during proto migration phase. +// TODO: Migrate to updated proto schema once all payment methods are updated. @SuppressWarnings("deprecation") public static WeChatPayAccountPayload fromProto(protobuf.PaymentAccountPayload proto) {
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (71)
core/src/main/java/bisq/core/offer/OpenOfferManager.java(1 hunks)core/src/main/java/bisq/core/offer/bisq_v1/OfferPayload.java(2 hunks)core/src/main/java/bisq/core/payment/payload/AchTransferAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/AdvancedCashAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/AliPayAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/AmazonGiftCardAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/AustraliaPayidAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/BizumAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/CapitualAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/CashByMailAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/CashDepositAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/CelPayAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/ClearXchangeAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/CryptoCurrencyAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/DomesticWireTransferAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/F2FAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/FasterPaymentsAccountPayload.java(2 hunks)core/src/main/java/bisq/core/payment/payload/HalCashAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/ImpsAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/InstantCryptoCurrencyPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/InteracETransferAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/JapanBankAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/MercadoPagoAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/MoneseAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/MoneyBeamAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/MoneyGramAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/NationalBankAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/NeftAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/NequiAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/PaxumAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/PaymentAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/PayseraAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/PaytmAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/PerfectMoneyAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/PixAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/PopmoneyAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/PromptPayAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/RevolutAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/RtgsAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/SameBankAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/SatispayAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/SbpAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/SepaAccountPayload.java(2 hunks)core/src/main/java/bisq/core/payment/payload/SepaInstantAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/SpecificBanksAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/StrikeAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/SwiftAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/SwishAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/TikkieAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/TransferwiseAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/TransferwiseUsdAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/USPostalMoneyOrderAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/UpholdAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/UpiAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/VerseAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/WeChatPayAccountPayload.java(1 hunks)core/src/main/java/bisq/core/payment/payload/WesternUnionAccountPayload.java(1 hunks)core/src/main/java/bisq/core/proto/CoreProtoResolver.java(2 hunks)core/src/main/java/bisq/core/trade/statistics/TradeStatisticsConverter.java(3 hunks)core/src/main/java/bisq/core/trade/statistics/TradeStatisticsManager.java(1 hunks)core/src/main/java/bisq/core/user/PreferencesPayload.java(0 hunks)desktop/src/main/java/bisq/desktop/common/fxml/FxmlViewLoader.java(1 hunks)desktop/src/main/java/bisq/desktop/components/MenuItem.java(1 hunks)desktop/src/main/java/bisq/desktop/main/account/content/fiataccounts/FiatAccountsView.java(1 hunks)desktop/src/main/java/bisq/desktop/main/dao/wallet/BsqWalletView.java(1 hunks)desktop/src/main/java/bisq/desktop/main/portfolio/cloneoffer/CloneOfferDataModel.java(1 hunks)desktop/src/main/java/bisq/desktop/main/portfolio/pendingtrades/steps/buyer/BuyerStep2View.java(1 hunks)p2p/src/test/java/bisq/network/p2p/storage/messages/AddDataMessageTest.java(1 hunks)p2p/src/test/java/bisq/network/p2p/storage/mocks/AppendOnlyDataStoreServiceFake.java(1 hunks)p2p/src/test/java/bisq/network/p2p/storage/mocks/MapStoreServiceFake.java(1 hunks)proto/src/main/proto/pb.proto(1 hunks)
💤 Files with no reviewable changes (1)
- core/src/main/java/bisq/core/user/PreferencesPayload.java
✅ Files skipped from review due to trivial changes (1)
- core/src/main/java/bisq/core/payment/payload/FasterPaymentsAccountPayload.java
🚧 Files skipped from review as they are similar to previous changes (40)
- desktop/src/main/java/bisq/desktop/common/fxml/FxmlViewLoader.java
- core/src/main/java/bisq/core/payment/payload/AustraliaPayidAccountPayload.java
- core/src/main/java/bisq/core/payment/payload/SpecificBanksAccountPayload.java
- core/src/main/java/bisq/core/payment/payload/PopmoneyAccountPayload.java
- core/src/main/java/bisq/core/proto/CoreProtoResolver.java
- core/src/main/java/bisq/core/payment/payload/CapitualAccountPayload.java
- core/src/main/java/bisq/core/payment/payload/CashDepositAccountPayload.java
- core/src/main/java/bisq/core/payment/payload/PaymentAccountPayload.java
- core/src/main/java/bisq/core/payment/payload/SameBankAccountPayload.java
- desktop/src/main/java/bisq/desktop/main/account/content/fiataccounts/FiatAccountsView.java
- core/src/main/java/bisq/core/payment/payload/SwiftAccountPayload.java
- core/src/main/java/bisq/core/payment/payload/PaxumAccountPayload.java
- core/src/main/java/bisq/core/payment/payload/NequiAccountPayload.java
- core/src/main/java/bisq/core/payment/payload/ImpsAccountPayload.java
- p2p/src/test/java/bisq/network/p2p/storage/mocks/AppendOnlyDataStoreServiceFake.java
- core/src/main/java/bisq/core/payment/payload/MoneyGramAccountPayload.java
- core/src/main/java/bisq/core/payment/payload/AdvancedCashAccountPayload.java
- core/src/main/java/bisq/core/payment/payload/UpiAccountPayload.java
- core/src/main/java/bisq/core/payment/payload/SatispayAccountPayload.java
- core/src/main/java/bisq/core/payment/payload/UpholdAccountPayload.java
- core/src/main/java/bisq/core/payment/payload/JapanBankAccountPayload.java
- core/src/main/java/bisq/core/payment/payload/WesternUnionAccountPayload.java
- desktop/src/main/java/bisq/desktop/main/portfolio/pendingtrades/steps/buyer/BuyerStep2View.java
- desktop/src/main/java/bisq/desktop/components/MenuItem.java
- core/src/main/java/bisq/core/payment/payload/AchTransferAccountPayload.java
- core/src/main/java/bisq/core/payment/payload/MoneyBeamAccountPayload.java
- core/src/main/java/bisq/core/payment/payload/StrikeAccountPayload.java
- core/src/main/java/bisq/core/payment/payload/SepaAccountPayload.java
- core/src/main/java/bisq/core/trade/statistics/TradeStatisticsManager.java
- core/src/main/java/bisq/core/trade/statistics/TradeStatisticsConverter.java
- core/src/main/java/bisq/core/payment/payload/CashByMailAccountPayload.java
- core/src/main/java/bisq/core/payment/payload/PixAccountPayload.java
- core/src/main/java/bisq/core/payment/payload/TikkieAccountPayload.java
- core/src/main/java/bisq/core/payment/payload/NeftAccountPayload.java
- core/src/main/java/bisq/core/payment/payload/SepaInstantAccountPayload.java
- core/src/main/java/bisq/core/payment/payload/TransferwiseUsdAccountPayload.java
- core/src/main/java/bisq/core/payment/payload/ClearXchangeAccountPayload.java
- p2p/src/test/java/bisq/network/p2p/storage/messages/AddDataMessageTest.java
- core/src/main/java/bisq/core/payment/payload/AliPayAccountPayload.java
- core/src/main/java/bisq/core/payment/payload/TransferwiseAccountPayload.java
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: Test Java 11, ubuntu-latest
- GitHub Check: Test Java 11, macOS-latest
- GitHub Check: Test Java 11, windows-latest
🔇 Additional comments (22)
core/src/main/java/bisq/core/payment/payload/RevolutAccountPayload.java (1)
95-104: Method‑scoped deprecation suppression is appropriate hereAdding
@SuppressWarnings("deprecation")onfromProtokeeps the warning localized to the specific proto construction path, aligns with the pattern used elsewhere in this PR, and doesn’t change behavior. Looks good.core/src/main/java/bisq/core/payment/payload/InteracETransferAccountPayload.java (1)
86-96: Method-level deprecation suppression here is appropriate and consistentApplying
@SuppressWarnings("deprecation")directly onfromProtocleanly scopes the suppression to the legacy proto usage, avoids any behavior change, and matches the pattern used across other payload classes. Looks good as-is.core/src/main/java/bisq/core/payment/payload/PaytmAccountPayload.java (1)
74-84: Targeted deprecation suppression onfromProtolooks appropriateScoping
@SuppressWarnings("deprecation")to justfromProtois a good balance between keeping compatibility with deprecated proto fields and avoiding global suppression on the whole class. This aligns with the PR goal of silencing unavoidable warnings without hiding others. Just keep the suppression limited to this method if additional deprecated accesses are introduced later, rather than broadening it to the class.core/src/main/java/bisq/core/payment/payload/RtgsAccountPayload.java (1)
80-92: Method-level deprecation suppression is appropriate and consistentAdding
@SuppressWarnings("deprecation")onfromProto(...)is a minimal, localized way to silence the proto deprecation warnings and matches the pattern used in other payload classes. The annotation does not affect behavior and the method body remains unchanged, so this looks good as-is.core/src/main/java/bisq/core/payment/payload/MercadoPagoAccountPayload.java (1)
75-75: LGTM! Suppression is appropriately scoped.The addition of
@SuppressWarnings("deprecation")is consistent with the PR's goal of suppressing compiler warnings across payment payload classes. The annotation is narrowly scoped to just thefromProtomethod, which likely needs to read deprecated protobuf fields for backwards compatibility.core/src/main/java/bisq/core/payment/payload/SwishAccountPayload.java (1)
75-83: @SuppressWarnings("deprecation") annotation properly applied.The annotation is correctly placed on the
fromProtomethod to suppress deprecation warnings at the appropriate scope. The method implementation itself is unchanged, with only the warning suppression added.Since this change is part of a broader coordinated effort across 60+ payment payload classes, it appears to address a systematic deprecation issue (likely in protobuf-generated or parent class methods). The specific deprecated API and any associated migration plan require further verification.
core/src/main/java/bisq/core/payment/payload/USPostalMoneyOrderAccountPayload.java (1)
77-85: Method-level suppression is appropriately scoped; verify whether deprecation is documented.The
@SuppressWarnings("deprecation")annotation is correctly applied at method-level, limiting suppression to the specific method rather than the entire class—this follows best practices.To ensure maintainability across the codebase, verify whether:
- The specific deprecated protobuf API is documented (either in comments, method Javadoc, or external migration guides)
- There is a tracked migration plan or if this suppression is permanent technical debt
- Similar patterns across other payload classes include explanatory documentation
If no documentation exists, consider adding a brief comment explaining what deprecated API is being used and the expected migration path.
core/src/main/java/bisq/core/payment/payload/HalCashAccountPayload.java (1)
71-78: Scoped deprecation suppression onfromProtolooks goodThe warning suppression is narrowly applied to this factory, and the proto-to-domain mapping remains unchanged and straightforward.
core/src/main/java/bisq/core/payment/payload/NationalBankAccountPayload.java (1)
89-106: Deprecation suppression onfromProtois reasonable and minimalThe added suppression is limited to the deserializer, and the existing logic (including null/empty handling for optional fields) is preserved.
core/src/main/java/bisq/core/offer/OpenOfferManager.java (1)
959-1074: Annotation change is safe; existing update logic remains intact
@SuppressWarnings("deprecation")is appropriately scoped tomaybeUpdatePersistedOffers, which legitimately touches deprecated offer fields for migration; cloning the list and the rewrite logic are unchanged and remain safe.core/src/main/java/bisq/core/payment/payload/SbpAccountPayload.java (1)
83-92:fromProtodeprecation suppression is appropriateThe suppression is limited to this proto factory, and the construction logic (including copying
excludeFromJsonDataMap) is unchanged.core/src/main/java/bisq/core/payment/payload/InstantCryptoCurrencyPayload.java (1)
67-74: Localized deprecation suppression onfromProtolooks fineThe only change is the annotation; the instant crypto account deserialization remains as before and is correctly scoped.
core/src/main/java/bisq/core/payment/payload/MoneseAccountPayload.java (1)
72-80: Consistent deprecation suppression onfromProtoThe added annotation aligns this payload with the other account payloads; deserialization logic remains unchanged and safe.
p2p/src/test/java/bisq/network/p2p/storage/mocks/MapStoreServiceFake.java (1)
47-51: Localized unchecked suppression in test fake looks fineAdding
@SuppressWarnings("unchecked")on this test‑only constructor is a reasonable way to silence generic warnings coming from theMapStoreServicesuper‑constructor without changing production code.core/src/main/java/bisq/core/payment/payload/VerseAccountPayload.java (1)
67-74: Deprecation suppression on fromProto is appropriateThis method legitimately accesses deprecated proto fields for backward compatibility, so scoping
@SuppressWarnings("deprecation")tofromProtois a clean way to keep the code warning‑free without changing behavior.proto/src/main/proto/pb.proto (1)
1922-1954: Reserving tag 30 for removed buyer_security_deposit field is structurally correct—confirm migrations are no longer neededSwitching the deprecated
buyer_security_deposit_as_longfield at tag 30 toreserved 30;follows protobuf best practice and avoids accidental tag reuse. The only thing to double‑check is that any upgrade/migration logic which might previously have read that field from oldPreferencesPayloaddata has already been removed or is no longer required for supported upgrade paths.core/src/main/java/bisq/core/payment/payload/DomesticWireTransferAccountPayload.java (1)
94-109: Scoped deprecation suppression on fromProto is consistent and safeThis
fromProtoimplementation still needs the deprecatedmax_trade_periodfield for compatibility, so adding@SuppressWarnings("deprecation")at the method level is a sensible way to keep builds clean without altering behavior.core/src/main/java/bisq/core/payment/payload/PayseraAccountPayload.java (1)
72-79: Deprecation suppression on Paysera fromProto matches the established patternThis method still depends on deprecated proto fields for legacy data, so adding
@SuppressWarnings("deprecation")here is appropriate and keeps warnings localized to the deserialization entry point.core/src/main/java/bisq/core/payment/payload/PerfectMoneyAccountPayload.java (1)
73-80: fromProto deprecation warning is correctly suppressedUsing the deprecated proto field for PerfectMoney account deserialization is expected for legacy compatibility; annotating
fromProtowith@SuppressWarnings("deprecation")is a clean, minimal way to deal with the compiler warning.core/src/main/java/bisq/core/payment/payload/AmazonGiftCardAccountPayload.java (1)
82-91: Document the deprecation context with an inline comment.The
@SuppressWarnings("deprecation")annotation suppresses warnings but doesn't clarify which proto methods are deprecated or the backward compatibility rationale. Add an inline comment explaining why the suppression is necessary (e.g., for supporting existing payment account data formats) and whether migration to non-deprecated APIs is planned.core/src/main/java/bisq/core/payment/payload/CryptoCurrencyAccountPayload.java (1)
67-74: Clarify the deprecation context and confirm suppression is appropriate.The
@SuppressWarnings("deprecation")annotation on this method requires context that's not evident from the code alone. Before merging:
- Identify the deprecated API: Confirm which proto method (likely in
PaymentAccountPayloador related) is deprecated and the reason.- Check for non-deprecated alternatives: Verify if the protobuf schema provides updated methods that replace the deprecated calls.
- Document the strategy: If this is a temporary suppression across 60+ payment payload classes (as indicated by the PR scope), document whether a full migration is planned or if suppression is acceptable long-term.
Suppressing deprecation warnings without a clear resolution path can mask future compatibility or security issues if the deprecated API is removed or changed.
core/src/main/java/bisq/core/payment/payload/CelPayAccountPayload.java (1)
67-74: Verify the deprecation context and migration plan.Suppressing deprecation warnings without a clear migration strategy creates technical debt. Before merging, please clarify:
- What specific proto field or method is deprecated (e.g.,
getCelPayAccountPayload()orgetEmail())?- Is there a tracking issue or documented migration plan to address this deprecated API usage?
- If the deprecated API must remain for backward compatibility, add a code comment explaining this constraint.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.