From 3e07d43834bf5085c7955b15144d5a1942065803 Mon Sep 17 00:00:00 2001
From: Andreas Schildbach
Date: Thu, 29 Aug 2024 21:18:16 +0200
Subject: [PATCH] SegwitAddress, LegacyAddress, package-info.java: don't link
to classes outside base in JavaDoc
---
core/src/main/java/org/bitcoinj/base/Address.java | 2 +-
.../src/main/java/org/bitcoinj/base/LegacyAddress.java | 8 ++++----
.../src/main/java/org/bitcoinj/base/SegwitAddress.java | 10 +++++-----
core/src/main/java/org/bitcoinj/base/package-info.java | 2 +-
4 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/core/src/main/java/org/bitcoinj/base/Address.java b/core/src/main/java/org/bitcoinj/base/Address.java
index 62a53cedc32..57b62ace3a7 100644
--- a/core/src/main/java/org/bitcoinj/base/Address.java
+++ b/core/src/main/java/org/bitcoinj/base/Address.java
@@ -28,7 +28,7 @@
*/
public interface Address extends Comparable {
/**
- * Construct an {@link Address} that represents the public part of the given {@link ECKey}.
+ * Construct an {@link Address} that represents the public part of the given {@code ECKey}.
*
* @param params
* network this address is valid for
diff --git a/core/src/main/java/org/bitcoinj/base/LegacyAddress.java b/core/src/main/java/org/bitcoinj/base/LegacyAddress.java
index 2a2b0e8f4d4..934bab9af8c 100644
--- a/core/src/main/java/org/bitcoinj/base/LegacyAddress.java
+++ b/core/src/main/java/org/bitcoinj/base/LegacyAddress.java
@@ -55,7 +55,7 @@ public class LegacyAddress implements Address {
/**
* Private constructor. Use {@link #fromBase58(String, Network)},
* {@link #fromPubKeyHash(Network, byte[])}, {@link #fromScriptHash(Network, byte[])} or
- * {@link ECKey#toAddress(ScriptType, Network)}.
+ * {@code ECKey#toAddress(ScriptType, Network)}.
*
* @param network
* network this address is valid for
@@ -113,7 +113,7 @@ public static LegacyAddress fromPubKeyHash(Network network, byte[] hash160) thro
}
/**
- * Construct a {@link LegacyAddress} that represents the public part of the given {@link ECKey}. Note that an address is
+ * Construct a {@link LegacyAddress} that represents the public part of the given {@code ECKey}. Note that an address is
* derived from a hash of the public key and is not the public key itself.
*
* @param params
@@ -121,7 +121,7 @@ public static LegacyAddress fromPubKeyHash(Network network, byte[] hash160) thro
* @param key
* only the public part is used
* @return constructed address
- * @deprecated Use {@link ECKey#toAddress(ScriptType, Network)}
+ * @deprecated Use {@code ECKey#toAddress(ScriptType, Network)}
*/
@Deprecated
public static LegacyAddress fromKey(NetworkParameters params, ECKey key) {
@@ -175,7 +175,7 @@ else if (version == network.legacyP2SHHeader())
}
/**
- * Get the network this address works on. Use of {@link BitcoinNetwork} is preferred to use of {@link NetworkParameters}
+ * Get the network this address works on. Use of {@link BitcoinNetwork} is preferred to use of {@code NetworkParameters}
* when you need to know what network an address is for.
* @return the Network.
*/
diff --git a/core/src/main/java/org/bitcoinj/base/SegwitAddress.java b/core/src/main/java/org/bitcoinj/base/SegwitAddress.java
index 3447e69aab7..a2b4ef24b67 100644
--- a/core/src/main/java/org/bitcoinj/base/SegwitAddress.java
+++ b/core/src/main/java/org/bitcoinj/base/SegwitAddress.java
@@ -43,7 +43,7 @@
* BIP173 for details.
*
* However, you don't need to care about the internals. Use {@link #fromBech32(String, Network)},
- * {@link #fromHash(org.bitcoinj.base.Network, byte[])} or {@link ECKey#toAddress(ScriptType, Network)}
+ * {@link #fromHash(org.bitcoinj.base.Network, byte[])} or {@code ECKey#toAddress(ScriptType, Network)}
* to construct a native segwit address.
*/
public class SegwitAddress implements Address {
@@ -133,7 +133,7 @@ private static Network normalizeNetwork(Network network) {
/**
* Private constructor. Use {@link #fromBech32(String, Network)},
- * {@link #fromHash(Network, byte[])} or {@link ECKey#toAddress(ScriptType, Network)}.
+ * {@link #fromHash(Network, byte[])} or {@code ECKey#toAddress(ScriptType, Network)}.
*
* @param network
* network this address is valid for
@@ -320,7 +320,7 @@ public static SegwitAddress fromProgram(Network network, int witnessVersion, byt
}
/**
- * Construct a {@link SegwitAddress} that represents the public part of the given {@link ECKey}. Note that an
+ * Construct a {@link SegwitAddress} that represents the public part of the given {@code ECKey}. Note that an
* address is derived from a hash of the public key and is not the public key itself.
*
* @param params
@@ -328,7 +328,7 @@ public static SegwitAddress fromProgram(Network network, int witnessVersion, byt
* @param key
* only the public part is used
* @return constructed address
- * @deprecated Use {@link ECKey#toAddress(ScriptType, org.bitcoinj.base.Network)}
+ * @deprecated Use {@code ECKey#toAddress(ScriptType, org.bitcoinj.base.Network)}
*/
@Deprecated
public static SegwitAddress fromKey(NetworkParameters params, ECKey key) {
@@ -336,7 +336,7 @@ public static SegwitAddress fromKey(NetworkParameters params, ECKey key) {
}
/**
- * Get the network this address works on. Use of {@link BitcoinNetwork} is preferred to use of {@link NetworkParameters}
+ * Get the network this address works on. Use of {@link BitcoinNetwork} is preferred to use of {@code NetworkParameters}
* when you need to know what network an address is for.
* @return the Network.
*/
diff --git a/core/src/main/java/org/bitcoinj/base/package-info.java b/core/src/main/java/org/bitcoinj/base/package-info.java
index b4d15b6c94b..bf87e01eed5 100644
--- a/core/src/main/java/org/bitcoinj/base/package-info.java
+++ b/core/src/main/java/org/bitcoinj/base/package-info.java
@@ -23,7 +23,7 @@
*
*
* Temporary exception: In the 0.17 release, we are allowing some dependencies on other packages, e.g. to
- * {@link org.bitcoinj.core.NetworkParameters} or to Guava provided that those references are in deprecated methods.
+ * {@code org.bitcoinj.core.NetworkParameters} or to Guava provided that those references are in deprecated methods.
* This smooths migration by allowing users to, for example, replace {@code import org.bitcoinj.core.Address} with
* {@code import org.bitcoinj.base.Address} as first step of conversion and then remove usages of the deprecated methods
* of {@code Address} in a second step.