Skip to content

Commit 7c5400a

Browse files
committed
Add javadoc version attributes for changes since v3.0
1 parent 754af4f commit 7c5400a

8 files changed

Lines changed: 58 additions & 9 deletions

File tree

src/main/java/org/xbill/DNS/ExtendedResolver.java

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ public String toString() {
131131
}
132132
}
133133

134+
/** @since 3.2 */
134135
public static final Duration DEFAULT_TIMEOUT = Duration.ofSeconds(5);
135136

136137
private List<ResolverEntry> resolvers = new CopyOnWriteArrayList<>();
@@ -288,7 +289,11 @@ public void deleteResolver(Resolver r) {
288289
resolvers.removeIf(re -> re.resolver == r);
289290
}
290291

291-
/** Gets whether the servers receive queries load balanced. */
292+
/**
293+
* Gets whether the servers receive queries load balanced.
294+
*
295+
* @since 3.2
296+
*/
292297
public boolean getLoadBalance() {
293298
return loadBalance;
294299
}
@@ -303,7 +308,11 @@ public void setLoadBalance(boolean flag) {
303308
loadBalance = flag;
304309
}
305310

306-
/** Gets the number of retries sent to each server per query */
311+
/**
312+
* Gets the number of retries sent to each server per query.
313+
*
314+
* @since 3.2
315+
*/
307316
public int getRetries() {
308317
return retries;
309318
}

src/main/java/org/xbill/DNS/Mnemonic.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ public void add(int val, String str) {
104104
* Removes both the numeric value and its text representation, including all aliases.
105105
*
106106
* @param val The numeric value
107+
* @since 3.1
107108
*/
108109
public void remove(int val) {
109110
values.remove(val);
@@ -127,6 +128,7 @@ public void addAlias(int val, String str) {
127128
* Removes an additional text representation of a numeric value.
128129
*
129130
* @param str The text string
131+
* @since 3.1
130132
*/
131133
public void removeAlias(String str) {
132134
str = sanitize(str);

src/main/java/org/xbill/DNS/Record.java

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ public abstract class Record implements Cloneable, Comparable<Record> {
2828

2929
protected Record() {}
3030

31+
/** @since 3.1 */
3132
protected Record(Name name, int type, int dclass, long ttl) {
3233
if (!name.isAbsolute()) {
3334
throw new RelativeNameException(name);
@@ -60,7 +61,11 @@ private static Record getEmptyRecord(Name name, int type, int dclass, long ttl,
6061
return rec;
6162
}
6263

63-
/** Converts the type-specific RR to wire format - must be overridden */
64+
/**
65+
* Converts the type-specific RR to wire format - must be overridden
66+
*
67+
* @since 3.1
68+
*/
6469
protected abstract void rrFromWire(DNSInput in) throws IOException;
6570

6671
private static Record newRecord(
@@ -261,7 +266,11 @@ public byte[] rdataToWireCanonical() {
261266
return out.toByteArray();
262267
}
263268

264-
/** Converts the type-specific RR to text format - must be overriden */
269+
/**
270+
* Converts the type-specific RR to text format - must be overriden.
271+
*
272+
* @since 3.1
273+
*/
265274
protected abstract String rrToString();
266275

267276
/** Converts the rdata portion of a Record into a String representation */
@@ -300,7 +309,11 @@ public String toString() {
300309
return sb.toString();
301310
}
302311

303-
/** Converts the text format of an RR to the internal format - must be overriden */
312+
/**
313+
* Converts the text format of an RR to the internal format - must be overriden
314+
*
315+
* @since 3.1
316+
*/
304317
protected abstract void rdataFromString(Tokenizer st, Name origin) throws IOException;
305318

306319
/** Converts a String into a byte array. */
@@ -503,7 +516,11 @@ public long getTTL() {
503516
return ttl;
504517
}
505518

506-
/** Converts the type-specific RR to wire format - must be overriden */
519+
/**
520+
* Converts the type-specific RR to wire format - must be overriden
521+
*
522+
* @since 3.1
523+
*/
507524
protected abstract void rrToWire(DNSOutput out, Compression c, boolean canonical);
508525

509526
/**

src/main/java/org/xbill/DNS/ResolverConfig.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
*/
4444
@Slf4j
4545
public final class ResolverConfig {
46+
/** @since 3.2 */
4647
public static final String CONFIGPROVIDER_SKIP_INIT = "dnsjava.configprovider.skipinit";
4748

4849
private final List<InetSocketAddress> servers = new ArrayList<>(2);

src/main/java/org/xbill/DNS/ReverseMap.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ public static Name fromAddress(String addr) throws UnknownHostException {
132132
* @param name The string from which to build an address.
133133
* @return The address corresponding to the reverse map string.
134134
* @throws UnknownHostException the passed name is not a valid reverse map.
135+
* @since 3.1
135136
*/
136137
public static InetAddress fromName(String name) throws UnknownHostException, TextParseException {
137138
return fromName(Name.fromString(name));
@@ -143,6 +144,7 @@ public static InetAddress fromName(String name) throws UnknownHostException, Tex
143144
* @param name The name from which to build an address.
144145
* @return The address corresponding to the reverse map name.
145146
* @throws UnknownHostException the passed name is not a valid reverse map.
147+
* @since 3.1
146148
*/
147149
public static InetAddress fromName(Name name) throws UnknownHostException {
148150
if (name.labels() <= 3) {

src/main/java/org/xbill/DNS/SimpleResolver.java

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,11 @@ public static void setDefaultResolver(String hostname) {
110110
defaultResolver = new InetSocketAddress(hostname, DEFAULT_PORT);
111111
}
112112

113-
/** Gets the port to communicate with on the server */
113+
/**
114+
* Gets the port to communicate with on the server
115+
*
116+
* @since 3.2
117+
*/
114118
public int getPort() {
115119
return address.getPort();
116120
}
@@ -156,7 +160,11 @@ public void setLocalAddress(InetAddress addr) {
156160
localAddress = new InetSocketAddress(addr, 0);
157161
}
158162

159-
/** Gets whether TCP connections will be used by default */
163+
/**
164+
* Gets whether TCP connections will be used by default
165+
*
166+
* @since 3.2
167+
*/
160168
public boolean getTCP() {
161169
return useTCP;
162170
}
@@ -166,7 +174,11 @@ public void setTCP(boolean flag) {
166174
this.useTCP = flag;
167175
}
168176

169-
/** Gets whether truncated responses will be ignored. */
177+
/**
178+
* Gets whether truncated responses will be ignored.
179+
*
180+
* @since 3.2
181+
*/
170182
public boolean getIgnoreTruncation() {
171183
return ignoreTruncation;
172184
}
@@ -180,6 +192,7 @@ public void setIgnoreTruncation(boolean flag) {
180192
* Gets the EDNS information on outgoing messages.
181193
*
182194
* @return The current {@link OPTRecord} for EDNS or {@code null} if EDNS is disabled.
195+
* @since 3.2
183196
*/
184197
public OPTRecord getEDNS() {
185198
return queryOPT;
@@ -190,6 +203,7 @@ public OPTRecord getEDNS() {
190203
*
191204
* @param optRecord the {@link OPTRecord} for EDNS options or null to disable EDNS.
192205
* @see #setEDNS(int, int, int, List)
206+
* @since 3.2
193207
*/
194208
public void setEDNS(OPTRecord optRecord) {
195209
queryOPT = optRecord;
@@ -218,6 +232,7 @@ public void setEDNS(int version, int payloadSize, int flags, List<EDNSOption> op
218232
* Get the TSIG key that messages will be signed with.
219233
*
220234
* @return the TSIG signature for outgoing messages or {@code null} if not specified.
235+
* @since 3.2
221236
*/
222237
public TSIG getTSIGKey() {
223238
return tsig;

src/main/java/org/xbill/DNS/Type.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,7 @@ public static void check(int val) {
457457
* @param str the textual representation of the record type
458458
* @param factory the factory; {@code null} may be used if there is no implementation available.
459459
* In this case, records of the type will be represented by the {@link UNKRecord} class
460+
* @since 3.1
460461
*/
461462
public static void register(int val, String str, Supplier<Record> factory) {
462463
types.replace(val, str, factory);

src/main/java/org/xbill/DNS/config/BaseResolverConfigProvider.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
/**
1515
* Base class for resolver config providers that provides a default implementation for the lists and
1616
* utility methods to prevent duplicates.
17+
*
18+
* @since 3.2
1719
*/
1820
public abstract class BaseResolverConfigProvider implements ResolverConfigProvider {
1921
final Logger log = LoggerFactory.getLogger(getClass());

0 commit comments

Comments
 (0)