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

View file

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

View file

@ -157,7 +157,7 @@ public class FormattingUtils {
}
public static String formatPrice(Price price, boolean appendCurrencyCode) {
return formatPrice(price, fiatPriceFormat, true);
return formatPrice(price, fiatPriceFormat, appendCurrencyCode);
}
public static String formatPrice(Price price) {
@ -279,7 +279,7 @@ public class FormattingUtils {
}
@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.
/*int numberOfPlacesToFill = maxNumberOfDigits - formattedNumber.length();
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) {
TextArea textArea = new BisqTextArea();
JFXTextArea textArea = new BisqTextArea();
textArea.setPromptText(prompt);
((JFXTextArea) textArea).setLabelFloat(true);
textArea.setLabelFloat(true);
textArea.setWrapText(true);
GridPane.setRowIndex(textArea, rowIndex);
@ -901,7 +901,7 @@ public class FormBuilder {
}
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,
@ -1221,7 +1221,7 @@ public class FormBuilder {
final Label topLabel2 = getTopLabel(titleCombobox);
AutocompleteComboBox<T> comboBox = new AutocompleteComboBox<>();
comboBox.setPromptText(titleCombobox);
((JFXComboBox<T>) comboBox).setLabelFloat(true);
comboBox.setLabelFloat(true);
topLabelVBox2.getChildren().addAll(topLabel2, comboBox);
hBox.getChildren().addAll(topLabelVBox1, topLabelVBox2);
@ -1278,9 +1278,9 @@ public class FormBuilder {
HBox hBox = new HBox();
hBox.setSpacing(10);
ComboBox<T> comboBox = new JFXComboBox<>();
JFXComboBox<T> comboBox = new JFXComboBox<>();
comboBox.setPromptText(titleCombobox);
((JFXComboBox<T>) comboBox).setLabelFloat(true);
comboBox.setLabelFloat(true);
TextField textField = new BisqTextField();