ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/util/regexp RegexpFactory.java RegexpMatcherFactory.java
Date Mon, 06 Jan 2003 13:52:00 GMT
bodewig     2003/01/06 05:52:00

  Modified:    docs/manual Tag: ANT_15_BRANCH install.html
               src/main/org/apache/tools/ant/util/regexp Tag: ANT_15_BRANCH
                        RegexpFactory.java RegexpMatcherFactory.java
  Log:
  merge patch for Bug 15377 from HEAD
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.29.2.12 +2 -2      jakarta-ant/docs/manual/install.html
  
  Index: install.html
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/docs/manual/install.html,v
  retrieving revision 1.29.2.11
  retrieving revision 1.29.2.12
  diff -u -r1.29.2.11 -r1.29.2.12
  --- install.html	28 Nov 2002 09:42:42 -0000	1.29.2.11
  +++ install.html	6 Jan 2003 13:51:59 -0000	1.29.2.12
  @@ -288,7 +288,7 @@
       <td><a href="http://jakarta.apache.org/regexp/" target="_top">jakarta.apache.org/regexp/</a></td>
     </tr>
     <tr>
  -    <td>jakarta-oro-2.0.4.jar</td>
  +    <td>jakarta-oro-2.0.6.jar</td>
       <td>regexp type with mappers and the perforce tasks</td>
       <td><a href="http://jakarta.apache.org/oro/" target="_top">jakarta.apache.org/oro/</a></td>
     </tr>
  @@ -384,7 +384,7 @@
   </table>
   <br>
   <hr>
  -<p align="center">Copyright &copy; 2000-2002 Apache Software Foundation. All
rights
  +<p align="center">Copyright &copy; 2000-2003 Apache Software Foundation. All
rights
   Reserved.</p>
   
   </body>
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.8.2.1   +5 -2      jakarta-ant/src/main/org/apache/tools/ant/util/regexp/RegexpFactory.java
  
  Index: RegexpFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/util/regexp/RegexpFactory.java,v
  retrieving revision 1.8
  retrieving revision 1.8.2.1
  diff -u -r1.8 -r1.8.2.1
  --- RegexpFactory.java	15 Apr 2002 13:36:22 -0000	1.8
  +++ RegexpFactory.java	6 Jan 2003 13:52:00 -0000	1.8.2.1
  @@ -1,7 +1,7 @@
   /*
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 2001-2002 The Apache Software Foundation.  All rights 
  + * Copyright (c) 2001-2003 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -95,14 +95,17 @@
           }
   
           try {
  +            testAvailability("java.util.regex.Matcher");
               return createRegexpInstance("org.apache.tools.ant.util.regexp.Jdk14RegexpRegexp");
           } catch (BuildException be) {}
           
           try {
  +            testAvailability("org.apache.oro.text.regex.Pattern");
               return createRegexpInstance("org.apache.tools.ant.util.regexp.JakartaOroRegexp");
           } catch (BuildException be) {}
           
           try {
  +            testAvailability("org.apache.regexp.RE");
               return createRegexpInstance("org.apache.tools.ant.util.regexp.JakartaRegexpRegexp");
           } catch (BuildException be) {}
   
  
  
  
  1.7.2.1   +12 -1     jakarta-ant/src/main/org/apache/tools/ant/util/regexp/RegexpMatcherFactory.java
  
  Index: RegexpMatcherFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/util/regexp/RegexpMatcherFactory.java,v
  retrieving revision 1.7
  retrieving revision 1.7.2.1
  diff -u -r1.7 -r1.7.2.1
  --- RegexpMatcherFactory.java	12 Apr 2002 13:26:54 -0000	1.7
  +++ RegexpMatcherFactory.java	6 Jan 2003 13:52:00 -0000	1.7.2.1
  @@ -1,7 +1,7 @@
   /*
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 2000-2002 The Apache Software Foundation.  All rights 
  + * Copyright (c) 2000-2003 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -100,14 +100,17 @@
           }
   
           try {
  +            testAvailability("java.util.regex.Matcher");
               return createInstance("org.apache.tools.ant.util.regexp.Jdk14RegexpMatcher");
           } catch (BuildException be) {}
           
           try {
  +            testAvailability("org.apache.oro.text.regex.Pattern");
               return createInstance("org.apache.tools.ant.util.regexp.JakartaOroMatcher");
           } catch (BuildException be) {}
           
           try {
  +            testAvailability("org.apache.regexp.RE");
               return createInstance("org.apache.tools.ant.util.regexp.JakartaRegexpMatcher");
           } catch (BuildException be) {}
   
  @@ -119,6 +122,14 @@
           try {
               Class implClass = Class.forName(className);
               return (RegexpMatcher) implClass.newInstance();
  +        } catch (Throwable t) {
  +            throw new BuildException(t);
  +        }
  +    }
  +    
  +    protected void testAvailability(String className) throws BuildException {
  +        try {
  +            Class implClass = Class.forName(className);
           } catch (Throwable t) {
               throw new BuildException(t);
           }
  
  
  

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


Mime
View raw message