Author: hardy.ferentschik
Date: 2010-02-15 14:24:58 -0500 (Mon, 15 Feb 2010)
New Revision: 18807
Removed:
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/UrlValidator.java
Log:
Removed
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/UrlValidator.java
Deleted:
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/UrlValidator.java
===================================================================
---
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/UrlValidator.java 2010-02-15
19:23:35 UTC (rev 18806)
+++
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/UrlValidator.java 2010-02-15
19:24:58 UTC (rev 18807)
@@ -1,47 +0,0 @@
-// $Id: LengthValidator.java 17521 2009-09-16 12:50:41Z hardy.ferentschik $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validator.constraints.impl;
-
-import java.net.MalformedURLException;
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-
-import org.hibernate.validator.constraints.URL;
-
-/**
- * Validate that the string is a valid URL.
- *
- * @author Hardy Ferentschik
- */
-public class URLValidator implements ConstraintValidator<URL, String> {
- public void initialize(URL url) {
- }
-
- public boolean isValid(String value, ConstraintValidatorContext
constraintValidatorContext) {
- if ( value == null ) {
- return true;
- }
- try {
- new java.net.URL( value );
- return true;
- }
- catch ( MalformedURLException e ) {
- return false;
- }
- }
-}
\ No newline at end of file