public final class

UrlValidator

extends Object
java.lang.Object
   ↳ com.atlassian.jira.util.UrlValidator

Class Overview

Performs URL validation. Only accepts HTTP or HTTPS URLS.

Summary

Public Constructors
UrlValidator()
Public Methods
static boolean isValid(String url)
Validates a URL.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public UrlValidator ()

Public Methods

public static boolean isValid (String url)

Validates a URL. Handles internationalized domain names (IDNs) by converting them to ASCII, strips query strings and fragments, returns false if url is null.

Parameters
url The URL to validate.
Returns
  • true if url is valid; false otherwise.