Skip to content

Commit

Permalink
Normalize inline comments
Browse files Browse the repository at this point in the history
  • Loading branch information
garydgregory committed Jan 31, 2024
1 parent dd2206c commit c282516
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2024,10 +2024,9 @@ public static synchronized void updateTLDOverride(final ArrayType table, final S
/** Whether to allow local overrides. */
private final boolean allowLocal;

// ---------------------------------------------
// ----- TLDs defined by IANA
// ----- Authoritative and comprehensive list at:
// ----- https://data.iana.org/TLD/tlds-alpha-by-domain.txt
// TLDs defined by IANA
// Authoritative and comprehensive list at:
// https://data.iana.org/TLD/tlds-alpha-by-domain.txt

// Note that the above list is in UPPER case.
// The code currently converts strings to lower case (as per the tables below)
Expand Down
3 changes: 1 addition & 2 deletions src/test/java/org/apache/commons/validator/UrlTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ public static void main(final String[] argv) {

private final boolean printIndex = false;// print index that indicates current scheme,host,port,path, query test were using.

// -------------------- Test data for creating a composite URL
/**
* The data given below approximates the 4 parts of a URL <scheme>://<authority><path>?<query> except that the port number is broken out of authority to
* increase the number of permutations. A complete URL is composed of a scheme+authority+port+path+query, all of which must be individually valid for the
Expand Down Expand Up @@ -105,7 +104,7 @@ public static void main(final String[] argv) {
Object[] testUrlPartsOptions = { testUrlScheme, testUrlAuthority, testUrlPort, testUrlPathOptions, testUrlQuery };

int[] testPartsIndex = { 0, 0, 0, 0, 0 };
// ---------------- Test data for individual url parts ----------------
// Test data for individual url parts
ResultPair[] testScheme = { new ResultPair("http", true), new ResultPair("ftp", false), new ResultPair("httpd", false), new ResultPair("telnet", false) };

@BeforeEach
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,13 +157,13 @@ public void testMissingRegex() {
@Test
public void testMultipleInsensitive() {

// ------------ Set up In-sensitive Validators
// Set up In-sensitive Validators
final RegexValidator multiple = new RegexValidator(MULTIPLE_REGEX, false);
final RegexValidator single1 = new RegexValidator(REGEX_1, false);
final RegexValidator single2 = new RegexValidator(REGEX_2, false);
final RegexValidator single3 = new RegexValidator(REGEX_3, false);

// ------------ Set up test values
// Set up test values
String value = "AAC FDE 321";
final String expect = "AACFDE321";
final String[] array = { "AAC", "FDE", "321" };
Expand Down Expand Up @@ -199,13 +199,13 @@ public void testMultipleInsensitive() {
@Test
public void testMultipleSensitive() {

// ------------ Set up Sensitive Validators
// Set up Sensitive Validators
final RegexValidator multiple = new RegexValidator(MULTIPLE_REGEX);
final RegexValidator single1 = new RegexValidator(REGEX_1);
final RegexValidator single2 = new RegexValidator(REGEX_2);
final RegexValidator single3 = new RegexValidator(REGEX_3);

// ------------ Set up test values
// Set up test values
String value = "aac FDE 321";
final String expect = "aacFDE321";
final String[] array = { "aac", "FDE", "321" };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ public static void main(final String[] args) {

private final boolean printIndex = false;// print index that indicates current scheme,host,port,path, query test were using.

// -------------------- Test data for creating a composite URL
/**
* The data given below approximates the 4 parts of a URL <scheme>://<authority><path>?<query> except that the port number is broken out of authority to
* increase the number of permutations. A complete URL is composed of a scheme+authority+port+path+query, all of which must be individually valid for the
Expand Down

0 comments on commit c282516

Please sign in to comment.