diff --git a/assets/src/main/java/bisq/asset/DefaultAddressValidator.java b/assets/src/main/java/bisq/asset/DefaultAddressValidator.java deleted file mode 100644 index 17131035764..00000000000 --- a/assets/src/main/java/bisq/asset/DefaultAddressValidator.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * This file is part of Bisq. - * - * Bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * Bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with Bisq. If not, see . - */ - -package bisq.asset; - -/** - * {@link AddressValidator} for use when no more specific address validation function is - * available. This implementation only checks that a given address is non-null and - * non-empty; it exists for legacy purposes and is deprecated to indicate that new - * {@link Asset} implementations should NOT use it, but should rather provide their own - * {@link AddressValidator} implementation. - * - * @author Chris Beams - * @author Bernard Labno - * @since 0.7.0 - */ -@Deprecated -public class DefaultAddressValidator implements AddressValidator { - - @Override - public AddressValidationResult validate(String address) { - if (address == null || address.length() == 0) - return AddressValidationResult.invalidAddress("Address may not be empty"); - - return AddressValidationResult.validAddress(); - } -} diff --git a/assets/src/test/java/bisq/asset/AbstractAssetWithDefaultValidatorTest.java b/assets/src/test/java/bisq/asset/AbstractAssetWithDefaultValidatorTest.java deleted file mode 100644 index 9522298d1b1..00000000000 --- a/assets/src/test/java/bisq/asset/AbstractAssetWithDefaultValidatorTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * This file is part of Bisq. - * - * Bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * Bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with Bisq. If not, see . - */ - -package bisq.asset; - -import org.junit.Test; - -/** - * Convenient abstract base class for {@link Asset} implementations still using the - * deprecated {@link DefaultAddressValidator}. - * - * @author Bernard Labno - * @since 0.7.0 - * @see DefaultAddressValidator - */ -@Deprecated -public abstract class AbstractAssetWithDefaultValidatorTest extends AbstractAssetTest { - - public AbstractAssetWithDefaultValidatorTest(Asset asset) { - super(asset); - } - - @Test - public void testValidAddresses() { - assertValidAddress(" "); - assertValidAddress("1"); - assertValidAddress("AQJTNtWcP7opxuR52Lf5vmoQTC8EHQ6GxV"); - assertValidAddress("ALEK7jttmqtx2ZhXHg69Zr426qKBnzYA9E"); - assertValidAddress("AP1egWUthPoYvZL57aBk4RPqUgjG1fJGn6"); - assertValidAddress("AST3zfvPdZ35npxAVC8ABgVCxxDLwTmAHU"); - } - - @Test - public void testInvalidAddresses() { - testBlank(); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/NoirTest.java b/assets/src/test/java/bisq/asset/coins/NoirTest.java index 41ac9a081db..78bc7e3c67d 100644 --- a/assets/src/test/java/bisq/asset/coins/NoirTest.java +++ b/assets/src/test/java/bisq/asset/coins/NoirTest.java @@ -17,11 +17,11 @@ package bisq.asset.coins; -import bisq.asset.AbstractAssetWithDefaultValidatorTest; +import bisq.asset.AbstractAssetTest; import org.junit.Test; -public class NoirTest extends AbstractAssetWithDefaultValidatorTest { +public class NoirTest extends AbstractAssetTest { public NoirTest() { super(new Noir());