[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [metrics-web/master] Replace several <code>...</code> with {@code}.
commit 603a64bd1afecae4aa3d94df5351329de0dcf5c8
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date: Wed Nov 20 15:13:30 2019 +0100
Replace several <code>...</code> with {@code}.
---
.../org/torproject/metrics/stats/advbwdist/Main.java | 2 +-
.../stats/bwhist/RelayDescriptorDatabaseImporter.java | 18 +++++++++---------
.../org/torproject/metrics/stats/clients/Database.java | 8 ++++----
.../org/torproject/metrics/stats/onionperf/Main.java | 14 +++++++-------
.../org/torproject/metrics/stats/servers/Database.java | 8 ++++----
.../torproject/metrics/stats/totalcw/OutputLine.java | 2 +-
.../org/torproject/metrics/stats/totalcw/Parser.java | 4 ++--
.../stats/totalcw/TotalcwRelayNetworkStatus.java | 4 ++--
8 files changed, 30 insertions(+), 30 deletions(-)
diff --git a/src/main/java/org/torproject/metrics/stats/advbwdist/Main.java b/src/main/java/org/torproject/metrics/stats/advbwdist/Main.java
index 3afcb80..d6bf4db 100644
--- a/src/main/java/org/torproject/metrics/stats/advbwdist/Main.java
+++ b/src/main/java/org/torproject/metrics/stats/advbwdist/Main.java
@@ -211,7 +211,7 @@ public class Main {
return computedPercentiles;
}
- /** Return the median for the given list of values, or <code>Double.NaN</code>
+ /** Return the median for the given list of values, or {@code Double.NaN}
* if the given list is empty. */
static double computeMedian(List<Long> valueList) {
Median median = new Median()
diff --git a/src/main/java/org/torproject/metrics/stats/bwhist/RelayDescriptorDatabaseImporter.java b/src/main/java/org/torproject/metrics/stats/bwhist/RelayDescriptorDatabaseImporter.java
index 9f9ecff..457517f 100644
--- a/src/main/java/org/torproject/metrics/stats/bwhist/RelayDescriptorDatabaseImporter.java
+++ b/src/main/java/org/torproject/metrics/stats/bwhist/RelayDescriptorDatabaseImporter.java
@@ -645,11 +645,11 @@ public final class RelayDescriptorDatabaseImporter {
return statistics;
}
- /** Retrieve the <code>boolean</code> value of the designated column in the
- * current row of the given <code>ResultSet</code> object and format it as a
- * <code>String</code> object with <code>"t"</code> for <code>true</code> and
- * <code>"f"</code> for <code>false</code>, or return <code>null</code> if the
- * retrieved value was <code>NULL</code>. */
+ /** Retrieve the {@code boolean} value of the designated column in the
+ * current row of the given {@code ResultSet} object and format it as a
+ * {@code String} object with {@code "t"} for {@code true} and
+ * {@code "f"} for {@code false}, or return {@code null} if the
+ * retrieved value was {@code NULL}. */
private static String getBooleanFromResultSet(ResultSet rs,
String columnLabel) throws SQLException {
boolean result = rs.getBoolean(columnLabel);
@@ -660,10 +660,10 @@ public final class RelayDescriptorDatabaseImporter {
}
}
- /** Retrieve the <code>long</code> value of the designated column in the
- * current row of the given <code>ResultSet</code> object and format it as a
- * <code>String</code> object, or return <code>null</code> if the retrieved
- * value was <code>NULL</code>. */
+ /** Retrieve the {@code long} value of the designated column in the
+ * current row of the given {@code ResultSet} object and format it as a
+ * {@code String} object, or return {@code null} if the retrieved
+ * value was {@code NULL}. */
private static String getLongFromResultSet(ResultSet rs, String columnLabel)
throws SQLException {
long result = rs.getLong(columnLabel);
diff --git a/src/main/java/org/torproject/metrics/stats/clients/Database.java b/src/main/java/org/torproject/metrics/stats/clients/Database.java
index f8bca92..abe363c 100644
--- a/src/main/java/org/torproject/metrics/stats/clients/Database.java
+++ b/src/main/java/org/torproject/metrics/stats/clients/Database.java
@@ -140,10 +140,10 @@ class Database implements AutoCloseable {
return statistics;
}
- /** Retrieve the <code>int</code> value of the designated column in the
- * current row of the given <code>ResultSet</code> object and format it as a
- * <code>String</code> object, or return <code>null</code> if the retrieved
- * value was <code>NULL</code>. */
+ /** Retrieve the {@code int} value of the designated column in the
+ * current row of the given {@code ResultSet} object and format it as a
+ * {@code String} object, or return {@code null} if the retrieved
+ * value was {@code NULL}. */
private static String getIntFromResultSet(ResultSet rs, String columnLabel)
throws SQLException {
int result = rs.getInt(columnLabel);
diff --git a/src/main/java/org/torproject/metrics/stats/onionperf/Main.java b/src/main/java/org/torproject/metrics/stats/onionperf/Main.java
index 8fb762d..454e3b2 100644
--- a/src/main/java/org/torproject/metrics/stats/onionperf/Main.java
+++ b/src/main/java/org/torproject/metrics/stats/onionperf/Main.java
@@ -351,19 +351,19 @@ public class Main {
return statistics;
}
- /** Retrieves the <code>String</code> value of the designated column in the
- * current row of the given <code>ResultSet</code> object, or returns the
- * empty string if the retrieved value was <code>NULL</code>. */
+ /** Retrieves the {@code String} value of the designated column in the
+ * current row of the given {@code ResultSet} object, or returns the
+ * empty string if the retrieved value was {@code NULL}. */
private static String getStringFromResultSet(ResultSet rs, String columnLabel)
throws SQLException {
String result = rs.getString(columnLabel);
return null == result ? "" : result;
}
- /** Retrieves the <code>double</code> value of the designated column in the
- * current row of the given <code>ResultSet</code> object as a
- * <code>Double</code> object, or <code>null</code> if the retrieved value was
- * <code>NULL</code>. */
+ /** Retrieves the {@code double} value of the designated column in the
+ * current row of the given {@code ResultSet} object as a
+ * {@code Double} object, or {@code null} if the retrieved value was
+ * {@code NULL}. */
private static Double getDoubleFromResultSet(ResultSet rs, String columnLabel)
throws SQLException {
double result = rs.getDouble(columnLabel);
diff --git a/src/main/java/org/torproject/metrics/stats/servers/Database.java b/src/main/java/org/torproject/metrics/stats/servers/Database.java
index f7f1f0f..562ae34 100644
--- a/src/main/java/org/torproject/metrics/stats/servers/Database.java
+++ b/src/main/java/org/torproject/metrics/stats/servers/Database.java
@@ -543,10 +543,10 @@ class Database implements AutoCloseable {
return statistics;
}
- /** Retrieve the <code>long</code> value of the designated column in the
- * current row of the given <code>ResultSet</code> object and format it as a
- * <code>String</code> object, or return <code>null</code> if the retrieved
- * value was <code>NULL</code>. */
+ /** Retrieve the {@code long} value of the designated column in the
+ * current row of the given {@code ResultSet} object and format it as a
+ * {@code String} object, or return {@code null} if the retrieved
+ * value was {@code NULL}. */
private static String getLongFromResultSet(ResultSet rs, String columnLabel)
throws SQLException {
long result = rs.getLong(columnLabel);
diff --git a/src/main/java/org/torproject/metrics/stats/totalcw/OutputLine.java b/src/main/java/org/torproject/metrics/stats/totalcw/OutputLine.java
index 3534e2a..60d03a5 100644
--- a/src/main/java/org/torproject/metrics/stats/totalcw/OutputLine.java
+++ b/src/main/java/org/torproject/metrics/stats/totalcw/OutputLine.java
@@ -26,7 +26,7 @@ class OutputLine {
/** Date. */
LocalDate validAfterDate;
- /** Nickname of the authority generating votes, or <code>null</code> in case
+ /** Nickname of the authority generating votes, or {@code null} in case
* of consensuses. */
String nickname;
diff --git a/src/main/java/org/torproject/metrics/stats/totalcw/Parser.java b/src/main/java/org/torproject/metrics/stats/totalcw/Parser.java
index 7d7e095..72a9aad 100644
--- a/src/main/java/org/torproject/metrics/stats/totalcw/Parser.java
+++ b/src/main/java/org/torproject/metrics/stats/totalcw/Parser.java
@@ -14,7 +14,7 @@ import java.time.ZoneId;
* data objects for them. */
class Parser {
- /** Parse and return a consensus, but return <code>null</code> if the
+ /** Parse and return a consensus, but return {@code null} if the
* consensus did not contain any bandwidth values. */
TotalcwRelayNetworkStatus parseRelayNetworkStatusConsensus(
RelayNetworkStatusConsensus consensus) {
@@ -45,7 +45,7 @@ class Parser {
return parsedStatus;
}
- /** Parse and return a vote, but return <code>null</code> if the vote did not
+ /** Parse and return a vote, but return {@code null} if the vote did not
* contain any bandwidth measurements. */
TotalcwRelayNetworkStatus parseRelayNetworkStatusVote(
RelayNetworkStatusVote vote) {
diff --git a/src/main/java/org/torproject/metrics/stats/totalcw/TotalcwRelayNetworkStatus.java b/src/main/java/org/torproject/metrics/stats/totalcw/TotalcwRelayNetworkStatus.java
index f9b6610..3f8822d 100644
--- a/src/main/java/org/torproject/metrics/stats/totalcw/TotalcwRelayNetworkStatus.java
+++ b/src/main/java/org/torproject/metrics/stats/totalcw/TotalcwRelayNetworkStatus.java
@@ -12,11 +12,11 @@ class TotalcwRelayNetworkStatus {
LocalDateTime validAfter;
/** The 1 to 19 character long alphanumeric nickname assigned to the authority
- * by its operator, or <code>null</code> if this is a consensus. */
+ * by its operator, or {@code null} if this is a consensus. */
String nickname;
/** Uppercase hex fingerprint of the authority's (v3 authority) identity
- * key, or <code>null</code> if this is a consensus. */
+ * key, or {@code null} if this is a consensus. */
String identityHex;
/** Sums of bandwidth measurements of all contained status entries with four
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits