commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prick...@apache.org
Subject cvs commit: jakarta-commons-sandbox/periodicity/src/java/org/apache/commons/periodicity/util FieldEdits.java
Date Thu, 14 Feb 2002 04:07:19 GMT
prickett    02/02/13 20:07:19

  Modified:    periodicity/src/java/org/apache/commons/periodicity/util
                        FieldEdits.java
  Log:
  Added code to test to see if a URI is valid.
  
  Revision  Changes    Path
  1.2       +10 -0     jakarta-commons-sandbox/periodicity/src/java/org/apache/commons/periodicity/util/FieldEdits.java
  
  Index: FieldEdits.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/periodicity/src/java/org/apache/commons/periodicity/util/FieldEdits.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FieldEdits.java	12 Feb 2002 23:03:54 -0000	1.1
  +++ FieldEdits.java	14 Feb 2002 04:07:19 -0000	1.2
  @@ -54,6 +54,8 @@
   
   package org.apache.commons.periodicity.util;
   
  +import org.apache.xerces.utils.URI;
  +
   public class FieldEdits
   {
       /** The first characters of an x-name rule */
  @@ -68,6 +70,14 @@
        */
       public static boolean isURI(String newval)
       {
  +        try
  +        {
  +            URI uri = new URI(newval);
  +        }
  +        catch(Exception exc)
  +        {
  +            return false;
  +        }
           return true;
       }
   
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message