mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 01:41:11 +01:00
Reformat Java sources with Editorconfig settings
This change is the result of a global reformatting in IDEA now that `.editorconfig` settings are in place. Note that Editorconfig's `continuation_indent_size` property [1] was also added and set to 8 here, as this reflects the dominant style already present in the codebase. i.e. in created a much smaller diff to set the continuation indent to 8 that would have been created leaving this property out and letting it default to 4. [1]: https://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties
This commit is contained in:
parent
d8845f0cc6
commit
e1a6f87a98
@ -3,6 +3,7 @@ root = true
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
continuation_indent_size = 8
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
|
@ -30,7 +30,7 @@ import javax.annotation.Nullable;
|
||||
/**
|
||||
* This class holds utility methods for the creation of an Offer.
|
||||
* Most of these are extracted here because they are used both in the GUI and in the API.
|
||||
*
|
||||
* <p>
|
||||
* Long-term there could be a GUI-agnostic OfferService which provides these and other functionalities to both the
|
||||
* GUI and the API.
|
||||
*/
|
||||
|
@ -203,7 +203,7 @@ abstract class BankForm extends PaymentMethodForm {
|
||||
private final Runnable closeHandler;
|
||||
private ComboBox<TradeCurrency> currencyComboBox;
|
||||
|
||||
BankForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService,InputValidator inputValidator,
|
||||
BankForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService, InputValidator inputValidator,
|
||||
GridPane gridPane, int gridRow, BSFormatter formatter, Runnable closeHandler) {
|
||||
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
||||
this.closeHandler = closeHandler;
|
||||
|
@ -1009,7 +1009,7 @@ public class MainViewModel implements ViewModel {
|
||||
item.setDisplayString(formatter.getCurrencyPair(currencyCode) + ": " + priceString);
|
||||
|
||||
final String code = item.currencyCode;
|
||||
if (selectedPriceFeedComboBoxItemProperty.get()!=null&&
|
||||
if (selectedPriceFeedComboBoxItemProperty.get() != null &&
|
||||
selectedPriceFeedComboBoxItemProperty.get().currencyCode.equals(code)) {
|
||||
isFiatCurrencyPriceFeedSelected.set(CurrencyUtil.isFiatCurrency(code) && CurrencyUtil.getFiatCurrency(code).isPresent() && item.isPriceAvailable() && item.isExternallyProvidedPrice());
|
||||
isCryptoCurrencyPriceFeedSelected.set(CurrencyUtil.isCryptoCurrency(code) && CurrencyUtil.getCryptoCurrency(code).isPresent() && item.isPriceAvailable() && item.isExternallyProvidedPrice());
|
||||
|
@ -291,7 +291,7 @@ public final class AltCoinAddressValidator extends InputValidator {
|
||||
case "ZEN":
|
||||
try {
|
||||
// Get the non Base58 form of the address and the bytecode of the first two bytes
|
||||
byte [] byteAddress = Base58.decodeChecked(input);
|
||||
byte[] byteAddress = Base58.decodeChecked(input);
|
||||
int version0 = byteAddress[0] & 0xFF;
|
||||
int version1 = byteAddress[1] & 0xFF;
|
||||
|
||||
@ -302,29 +302,24 @@ public final class AltCoinAddressValidator extends InputValidator {
|
||||
if (version0 == 0x16 && version1 == 0x9A) {
|
||||
// Address starts with "zc"
|
||||
return new ValidationResult(false, Res.get("validation.altcoin.zAddressesNotSupported"));
|
||||
}
|
||||
else if (version0 == 0x1C && (version1 == 0xB8 || version1 == 0xBD)) {
|
||||
} else if (version0 == 0x1C && (version1 == 0xB8 || version1 == 0xBD)) {
|
||||
// "t1" or "t3" address
|
||||
return new ValidationResult(true);
|
||||
}
|
||||
else if (version0 == 0x20 && (version1 == 0x89 || version1 == 0x96)) {
|
||||
} else if (version0 == 0x20 && (version1 == 0x89 || version1 == 0x96)) {
|
||||
// "zn" or "zs" address
|
||||
return new ValidationResult(true);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
// Unknown Type
|
||||
return new ValidationResult(false);
|
||||
}
|
||||
}
|
||||
catch (AddressFormatException e) {
|
||||
} catch (AddressFormatException e) {
|
||||
// Unhandled Exception (probably a checksum error)
|
||||
return new ValidationResult(false);
|
||||
}
|
||||
case "WAC":
|
||||
try {
|
||||
Address.fromBase58(WACoinsParams.get(), input);
|
||||
}
|
||||
catch (AddressFormatException e) {
|
||||
} catch (AddressFormatException e) {
|
||||
return new ValidationResult(false, getErrorMessage(e));
|
||||
}
|
||||
return new ValidationResult(true);
|
||||
@ -344,8 +339,7 @@ public final class AltCoinAddressValidator extends InputValidator {
|
||||
case "TRC":
|
||||
try {
|
||||
Address.fromBase58(TerracoinParams.get(), input);
|
||||
}
|
||||
catch (AddressFormatException e) {
|
||||
} catch (AddressFormatException e) {
|
||||
return new ValidationResult(false, getErrorMessage(e));
|
||||
}
|
||||
return new ValidationResult(true);
|
||||
|
@ -31,9 +31,9 @@ public class BSFormatterTest {
|
||||
BSFormatter formatter = new BSFormatter();
|
||||
Res.setBaseCurrencyCode("BTC");
|
||||
Res.setBaseCurrencyName("Bitcoin");
|
||||
assertEquals("0 days",formatter.formatAccountAge(TimeUnit.HOURS.toMillis(23)));
|
||||
assertEquals("0 days",formatter.formatAccountAge(0));
|
||||
assertEquals("0 days",formatter.formatAccountAge(-1));
|
||||
assertEquals("0 days", formatter.formatAccountAge(TimeUnit.HOURS.toMillis(23)));
|
||||
assertEquals("0 days", formatter.formatAccountAge(0));
|
||||
assertEquals("0 days", formatter.formatAccountAge(-1));
|
||||
assertEquals("1 day", formatter.formatAccountAge(TimeUnit.DAYS.toMillis(1)));
|
||||
assertEquals("2 days", formatter.formatAccountAge(TimeUnit.DAYS.toMillis(2)));
|
||||
assertEquals("30 days", formatter.formatAccountAge(TimeUnit.DAYS.toMillis(30)));
|
||||
|
@ -33,7 +33,7 @@ public class NetworkNodeProvider implements Provider<NetworkNode> {
|
||||
private final NetworkNode networkNode;
|
||||
|
||||
@Inject
|
||||
public NetworkNodeProvider( NetworkProtoResolver networkProtoResolver,
|
||||
public NetworkNodeProvider(NetworkProtoResolver networkProtoResolver,
|
||||
@Named(NetworkOptionKeys.USE_LOCALHOST_FOR_P2P) boolean useLocalhostForP2P,
|
||||
@Named(NetworkOptionKeys.PORT_KEY) int port,
|
||||
@Named(NetworkOptionKeys.TOR_DIR) File torDir) {
|
||||
|
@ -99,7 +99,7 @@ public class P2PService implements SetupListener, MessageListener, ConnectionLis
|
||||
SeedNodesRepository seedNodesRepository,
|
||||
Socks5ProxyProvider socks5ProxyProvider,
|
||||
EncryptionService encryptionService,
|
||||
KeyRing keyRing ) {
|
||||
KeyRing keyRing) {
|
||||
this.networkNode = networkNode;
|
||||
this.peerManager = peerManager;
|
||||
this.p2PDataStorage = p2PDataStorage;
|
||||
|
@ -135,7 +135,7 @@ public class TestUtils {
|
||||
Thread.sleep(2000);
|
||||
return p2PService;
|
||||
}
|
||||
*/
|
||||
*/
|
||||
public static NetworkProtoResolver getNetworkProtoResolver() {
|
||||
return new NetworkProtoResolver() {
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user