We're updating the issue view to help you get more done. 

Javadoc of URL constraint is really misleading

Description

The implementation of the URL validator is really odd because it basically relies on the constructor of java.net.URL. This has been discussed here before (HV-406, HV-513) and I understand and accept there's no perfect solution.

However, I'd expect that this be clearly stated in the Javadoc of the @URL constraint. IMO despite this is still not the case. I see 2 obvious issues:

  1. Type Javadoc claims that "Per default the constraint verifies that the annotated value conforms to RFC2396". Doesn't prove that statement wrong? If RFC2396 were really supported wouldn't the validator have to accept URLs such as ldap://... or sip://...?

  2. The annotation attribute Javadoc contradicts the type Javadoc. Because of 1. a statement like "Per default any protocol is allowed" (port attribute) is not correct.

Environment

None

Status

Assignee

Hardy Ferentschik

Reporter

Marcel Stör

Labels

None

Worked in

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Community Help Wanted

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

backportReEvaluate

None

Time tracking

30m

Components

Fix versions

Affects versions

5.1.0.Final

Priority

Major