Suppress warnings of unused method params which may be needed later

Also fix forwarding of telescoping method parameters in FormBuilder and
FormattingUtils.
This commit is contained in:
Steven Barclay 2019-12-18 23:02:20 +00:00
parent cc7d0dec26
commit d0a76b9ff2
No known key found for this signature in database
GPG key ID: 9FED6BF1176D500B
4 changed files with 22 additions and 23 deletions

View file

@ -707,7 +707,7 @@ public class TradeWalletService {
return delayedPayoutTx; return delayedPayoutTx;
} }
public boolean verifiesDepositTxAndDelayedPayoutTx(Transaction depositTx, public boolean verifiesDepositTxAndDelayedPayoutTx(@SuppressWarnings("unused") Transaction depositTx,
Transaction delayedPayoutTx) { Transaction delayedPayoutTx) {
// todo add more checks // todo add more checks
if (delayedPayoutTx.getLockTime() == 0) { if (delayedPayoutTx.getLockTime() == 0) {
@ -963,17 +963,17 @@ public class TradeWalletService {
// Emergency payoutTx // Emergency payoutTx
/////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////
public Transaction emergencySignAndPublishPayoutTxFrom2of2MultiSig(String depositTxHex, public void emergencySignAndPublishPayoutTxFrom2of2MultiSig(String depositTxHex,
Coin buyerPayoutAmount, Coin buyerPayoutAmount,
Coin sellerPayoutAmount, Coin sellerPayoutAmount,
Coin txFee, Coin txFee,
String buyerAddressString, String buyerAddressString,
String sellerAddressString, String sellerAddressString,
String buyerPrivateKeyAsHex, String buyerPrivateKeyAsHex,
String sellerPrivateKeyAsHex, String sellerPrivateKeyAsHex,
String buyerPubKeyAsHex, String buyerPubKeyAsHex,
String sellerPubKeyAsHex, String sellerPubKeyAsHex,
TxBroadcaster.Callback callback) TxBroadcaster.Callback callback)
throws AddressFormatException, TransactionVerificationException, WalletException { throws AddressFormatException, TransactionVerificationException, WalletException {
byte[] buyerPubKey = ECKey.fromPublicOnly(Utils.HEX.decode(buyerPubKeyAsHex)).getPubKey(); byte[] buyerPubKey = ECKey.fromPublicOnly(Utils.HEX.decode(buyerPubKeyAsHex)).getPubKey();
byte[] sellerPubKey = ECKey.fromPublicOnly(Utils.HEX.decode(sellerPubKeyAsHex)).getPubKey(); byte[] sellerPubKey = ECKey.fromPublicOnly(Utils.HEX.decode(sellerPubKeyAsHex)).getPubKey();
@ -1018,7 +1018,6 @@ public class TradeWalletService {
WalletService.verifyTransaction(payoutTx); WalletService.verifyTransaction(payoutTx);
WalletService.checkWalletConsistency(wallet); WalletService.checkWalletConsistency(wallet);
broadcastTx(payoutTx, callback, 20); broadcastTx(payoutTx, callback, 20);
return payoutTx;
} }

View file

@ -30,8 +30,8 @@ public class BankUtil {
// BankName // BankName
@SuppressWarnings("SameReturnValue") @SuppressWarnings("SameReturnValue")
public static boolean isBankNameRequired(String countryCode) { public static boolean isBankNameRequired(@SuppressWarnings("unused") String countryCode) {
// Currently we always return true but let's keep that method to be more flexible in case we what to not show // Currently we always return true but let's keep that method to be more flexible in case we want to not show
// it at some new payment method. // it at some new payment method.
return true; return true;
/* /*

View file

@ -157,7 +157,7 @@ public class FormattingUtils {
} }
public static String formatPrice(Price price, boolean appendCurrencyCode) { public static String formatPrice(Price price, boolean appendCurrencyCode) {
return formatPrice(price, fiatPriceFormat, true); return formatPrice(price, fiatPriceFormat, appendCurrencyCode);
} }
public static String formatPrice(Price price) { public static String formatPrice(Price price) {
@ -279,7 +279,7 @@ public class FormattingUtils {
} }
@NotNull @NotNull
public static String fillUpPlacesWithEmptyStrings(String formattedNumber, int maxNumberOfDigits) { public static String fillUpPlacesWithEmptyStrings(String formattedNumber, @SuppressWarnings("unused") int maxNumberOfDigits) {
//FIXME: temporary deactivate adding spaces in front of numbers as we don't use a monospace font right now. //FIXME: temporary deactivate adding spaces in front of numbers as we don't use a monospace font right now.
/*int numberOfPlacesToFill = maxNumberOfDigits - formattedNumber.length(); /*int numberOfPlacesToFill = maxNumberOfDigits - formattedNumber.length();
for (int i = 0; i < numberOfPlacesToFill; i++) { for (int i = 0; i < numberOfPlacesToFill; i++) {

View file

@ -504,9 +504,9 @@ public class FormBuilder {
public static TextArea addTextArea(GridPane gridPane, int rowIndex, String prompt, double top) { public static TextArea addTextArea(GridPane gridPane, int rowIndex, String prompt, double top) {
TextArea textArea = new BisqTextArea(); JFXTextArea textArea = new BisqTextArea();
textArea.setPromptText(prompt); textArea.setPromptText(prompt);
((JFXTextArea) textArea).setLabelFloat(true); textArea.setLabelFloat(true);
textArea.setWrapText(true); textArea.setWrapText(true);
GridPane.setRowIndex(textArea, rowIndex); GridPane.setRowIndex(textArea, rowIndex);
@ -901,7 +901,7 @@ public class FormBuilder {
} }
public static CheckBox addCheckBox(GridPane gridPane, int rowIndex, String checkBoxTitle, double top) { public static CheckBox addCheckBox(GridPane gridPane, int rowIndex, String checkBoxTitle, double top) {
return addCheckBox(gridPane, rowIndex, 0, checkBoxTitle, 0); return addCheckBox(gridPane, rowIndex, 0, checkBoxTitle, top);
} }
public static CheckBox addCheckBox(GridPane gridPane, public static CheckBox addCheckBox(GridPane gridPane,
@ -1221,7 +1221,7 @@ public class FormBuilder {
final Label topLabel2 = getTopLabel(titleCombobox); final Label topLabel2 = getTopLabel(titleCombobox);
AutocompleteComboBox<T> comboBox = new AutocompleteComboBox<>(); AutocompleteComboBox<T> comboBox = new AutocompleteComboBox<>();
comboBox.setPromptText(titleCombobox); comboBox.setPromptText(titleCombobox);
((JFXComboBox<T>) comboBox).setLabelFloat(true); comboBox.setLabelFloat(true);
topLabelVBox2.getChildren().addAll(topLabel2, comboBox); topLabelVBox2.getChildren().addAll(topLabel2, comboBox);
hBox.getChildren().addAll(topLabelVBox1, topLabelVBox2); hBox.getChildren().addAll(topLabelVBox1, topLabelVBox2);
@ -1278,9 +1278,9 @@ public class FormBuilder {
HBox hBox = new HBox(); HBox hBox = new HBox();
hBox.setSpacing(10); hBox.setSpacing(10);
ComboBox<T> comboBox = new JFXComboBox<>(); JFXComboBox<T> comboBox = new JFXComboBox<>();
comboBox.setPromptText(titleCombobox); comboBox.setPromptText(titleCombobox);
((JFXComboBox<T>) comboBox).setLabelFloat(true); comboBox.setLabelFloat(true);
TextField textField = new BisqTextField(); TextField textField = new BisqTextField();