Login | Register
My pages Projects Community openCollabNet

Discussions > cvs > CVS update: joist/java/org/joist/util CurrencyString.java EscapedString.java TagValidator.java URL.java UnderlineSpaces.java

Project highlights: Architectural Overview

joist
Discussion topic

Hide all messages in topic

All messages in topic

CVS update: joist/java/org/joist/util CurrencyString.java EscapedString.java TagValidator.java URL.java UnderlineSpaces.java

Author ms
Full name zxcv
Date 2000-10-24 16:59:09 PDT
Message User: ms
  Date: 00/10/24 16:59:09

  Modified: java/org/joist/admin Broadcast.java SiteStatus.java
                        TestURL.java TimingProfile.java
               java/org/joist/util CurrencyString.java EscapedString.java
                        TagValidator.java URL.java UnderlineSpaces.java
  Log:
  Changed dependancy from old com.oroinc regex package to new jakarta-oro 2.0.
  Other changes that are implied from this are the wrapper.classpath change in jserv.properties.
  Submitted by: Michael Salmon
  
  Revision Changes Path
  1.7 +2 -2 joist/java/org/joist​/admin/Broadcast.jav​a
  
  Index: Broadcast.java
  ====================​====================​====================​=======
  RCS file: /cvs/joist/java/org/​joist/admin/Broadcas​t.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Broadcast.java 2000/07/05 21:29:26 1.6
  +++ Broadcast.java 2000/10/24 23:59:08 1.7
  @@ -57,13 +57,13 @@
   import org.webmacro.util.*;
   import org.webmacro.servlet.*;
   
  -import cj.util.Trace;
  +import org.joist.util.Trace;
   
   /**
     * Allows an administrator to enter a message to be broadcast to all users.
     *
     * @author David C. Pellegrini <A HREF="mailto:davidp@​dataweb-systems.com"​>davidp@dataweb-s​ystems.com</A>​,
  - * @version $Revision: 1.6 $
  + * @version $Revision: 1.7 $
     *
     * Copyright (c) 1999 dataweb systems, inc.
    * Copyright (c) 1999, 2000 Collab.Net, Inc.
  
  
  
  1.6 +2 -2 joist/java/org/joist​/admin/SiteStatus.ja​va
  
  Index: SiteStatus.java
  ====================​====================​====================​=======
  RCS file: /cvs/joist/java/org/​joist/admin/SiteStat​us.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- SiteStatus.java 2000/07/05 21:29:26 1.5
  +++ SiteStatus.java 2000/10/24 23:59:08 1.6
  @@ -59,13 +59,13 @@
   //
   // import org.joist.util.*;
   
  -import cj.util.Trace;
  +import org.joist.util.Trace;
   
   /**
     * Displays current timing profiles
     *
     * @author David C. Pellegrini <A HREF="mailto:davidp@​dataweb-systems.com"​>davidp@dataweb-s​ystems.com</A>​,
  - * @version $Revision: 1.5 $
  + * @version $Revision: 1.6 $
     *
     * Copyright (c) 1999 dataweb systems, inc.
     * Copyright (c) 1999, 2000 Collab.Net, Inc.
  
  
  
  1.6 +2 -2 joist/java/org/joist​/admin/TestURL.java
  
  Index: TestURL.java
  ====================​====================​====================​=======
  RCS file: /cvs/joist/java/org/​joist/admin/TestURL.​java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- TestURL.java 2000/07/05 21:29:26 1.5
  +++ TestURL.java 2000/10/24 23:59:08 1.6
  @@ -59,13 +59,13 @@
   //
   // import org.joist.util.*;
   
  -import cj.util.Trace;
  +import org.joist.util.Trace;
   
   /**
     * Displays current timing profiles
     *
     * @author David C. Pellegrini <A HREF="mailto:davidp@​dataweb-systems.com"​>davidp@dataweb-s​ystems.com</A>​,
  - * @version $Revision: 1.5 $
  + * @version $Revision: 1.6 $
     *
     * Copyright (c) 1999 dataweb systems, inc.
     * Copyright (c) 1999, 2000 Collab.Net, Inc.
  
  
  
  1.6 +2 -2 joist/java/org/joist​/admin/TimingProfile​.java
  
  Index: TimingProfile.java
  ====================​====================​====================​=======
  RCS file: /cvs/joist/java/org/​joist/admin/TimingPr​ofile.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- TimingProfile.java 2000/07/05 21:29:26 1.5
  +++ TimingProfile.java 2000/10/24 23:59:08 1.6
  @@ -59,13 +59,13 @@
   //
   // import org.joist.util.*;
   
  -import cj.util.Trace;
  +import org.joist.util.Trace;
   
   /**
     * Displays current timing profiles
     *
     * @author David C. Pellegrini <A HREF="mailto:davidp@​dataweb-systems.com"​>davidp@dataweb-s​ystems.com</A>​,
  - * @version $Revision: 1.5 $
  + * @version $Revision: 1.6 $
     *
     * Copyright (c) 1999 dataweb systems, inc.
     * Copyright (c) 1999, 2000 Collab.Net, Inc.
  
  
  
  1.5 +4 -6 joist/java/org/joist​/util/CurrencyString​.java
  
  Index: CurrencyString.java
  ====================​====================​====================​=======
  RCS file: /cvs/joist/java/org/​joist/util/CurrencyS​tring.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- CurrencyString.java 2000/07/05 21:29:29 1.4
  +++ CurrencyString.java 2000/10/24 23:59:08 1.5
  @@ -47,16 +47,16 @@
   package org.joist.util;
   
   import java.util.*;
  -import com.oroinc.text.regex.*;
  +import org.apache.oro.text.regex.*;
   
   /**
     * Creates a string with the dollar sign and commas removed.
     *
     * @author David C. Pellegrini <A HREF="mailto:davidp@​dataweb-systems.com"​>davidp@dataweb-s​ystems.com</A>​
  - * @version $Revision: 1.4 $
  + * @version $Revision: 1.5 $
     *
     * Copyright (c) 1999 dataweb systems, inc.
  - * Copyright (c) 1999, 2000 Collab.Net, Inc.
  + * Copyright (c) 1999, 2000 Collab.Net, Inc.
     */
   
   public class CurrencyString extends Object
  @@ -67,7 +67,6 @@
       static final private String targetRegEx = "[$,]";
       static final private String substitution = "";
       static final private int limit = Util.SUBSTITUTE_ALL;
  - static final private int nointerp = Util.INTERPOLATE_NONE;
   
   
       /**
  @@ -104,8 +103,7 @@
               } catch (MalformedPatternException ignored){};
           }
   
  - return Util.substitute(matcher, pattern, substitution, input, limit,
  - nointerp);
  + return Util.substitute(matcher, pattern, new StringSubstitution(s​ubstitution), input, limit);
       }
   }
   
  
  
  
  1.10 +5 -5 joist/java/org/joist​/util/EscapedString.​java
  
  Index: EscapedString.java
  ====================​====================​====================​=======
  RCS file: /cvs/joist/java/org/​joist/util/EscapedSt​ring.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- EscapedString.java 2000/10/21 18:08:01 1.9
  +++ EscapedString.java 2000/10/24 23:59:08 1.10
  @@ -47,7 +47,7 @@
   package org.joist.util;
   
   import java.util.*;
  -import com.oroinc.text.regex.*;
  +import org.apache.oro.text.regex.*;
   
   /**
     * Creates a string with escape characters escaped so that the resulting
  @@ -57,7 +57,7 @@
     *
     * @author David C. Pellegrini <A HREF="mailto:davidp@​dataweb-systems.com"​>davidp@dataweb-s​ystems.com</A>​
     * @author <a href="mailto:dlr@col​lab.net">Daniel Rall</a>
  - * @version $Revision: 1.9 $
  + * @version $Revision: 1.10 $
     *
     * Copyright (c) 1999 dataweb systems, inc.
     * Copyright (c) 1999, 2000 CollabNet, Inc.
  @@ -69,7 +69,7 @@
       private static final String BACKSLASH_RE = "\\\\";
       private static final String BACKSLASH_DOUBLED = "\\\\";
       private static final int LIMIT = Util.SUBSTITUTE_ALL;
  - private static final int NO_INTERP = Util.INTERPOLATE_NONE;
  +// private static final int NO_INTERP = Util.INTERPOLATE_NONE;
   
       static
       {
  @@ -110,7 +110,7 @@
        */
       public static final String from (String input)
       {
  - return Util.substitute(new Perl5Matcher(), pattern, BACKSLASH_DOUBLED,
  - input, LIMIT, NO_INTERP);
  + return Util.substitute(new Perl5Matcher(), pattern, new StringSubstitution(B​ACKSLASH_DOUBLED),
  + input, LIMIT);
       }
   }
  
  
  
  1.5 +4 -13 joist/java/org/joist​/util/TagValidator.j​ava
  
  Index: TagValidator.java
  ====================​====================​====================​=======
  RCS file: /cvs/joist/java/org/​joist/util/TagValida​tor.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TagValidator.java 2000/08/29 19:15:27 1.4
  +++ TagValidator.java 2000/10/24 23:59:08 1.5
  @@ -2,7 +2,7 @@
   
   import java.util.*;
   import java.sql.*;
  -import com.oroinc.text.regex.*;
  +import org.apache.oro.text.regex.*;
   
   /**
     * Checks that Content contains only tags from an accepted set.
  @@ -19,7 +19,7 @@
     *
     * @author David C. Pellegrini <A HREF="mailto:davidp@​dataweb-systems.com"​>davidp@dataweb-s​ystems.com</A>​
     * @author Jon S. Stevens <A HREF="mailto:jon@lat​chkey.com">jon@la​tchkey.com</A>​
  - * @version $Revision: 1.4 $
  + * @version $Revision: 1.5 $
     */
   public class TagValidator
   {
  @@ -51,7 +51,6 @@
       static private Pattern substPattern = null;
       static final private String substitution = "";
       static final private int limit = Util.SUBSTITUTE_ALL;
  - static final private int nointerp = Util.INTERPOLATE_NONE;
   
       // For matching ...
       static final private PatternCompiler matchCompiler = new Perl5Compiler();
  @@ -74,15 +73,7 @@
   
               
           databaseTest();
  -
  -/* StringBuffer errorMsg = new StringBuffer();
  -
  - System.out.println("original: " + input);
  - if (validate(input, errorMsg))
  - System.out.println("A-OK!");
  - else
  - System.out.println("not allowed: " + errorMsg);
  - */
  +
       }
   
       public static final void databaseTest()
  @@ -272,7 +263,7 @@
   
           // First, strip out all occurrences of valid HTML tags.
           String strippedCopy = Util.substitute(substMatcher, substPattern,
  - substitution, inputString, limit, nointerp);
  + new StringSubstitution(s​ubstitution), inputString, limit);
   
           // What remains is either clean, or contains tags that are not allowed.
           PatternMatcherInput input = new PatternMatcherInput(​strippedCopy);
  
  
  
  1.8 +2 -2 joist/java/org/joist​/util/URL.java
  
  Index: URL.java
  ====================​====================​====================​=======
  RCS file: /cvs/joist/java/org/​joist/util/URL.java,​v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- URL.java 2000/10/17 01:02:59 1.7
  +++ URL.java 2000/10/24 23:59:08 1.8
  @@ -56,13 +56,13 @@
   
   import org.joist.security.*;
   
  -import cj.util.Trace;
  +import org.joist.util.Trace;
   
   /**
    * Parses and builds URLs
    *
    * @author David C. Pellegrini <A HREF="mailto:davidp@​dataweb-systems.com"​>davidp@dataweb-s​ystems.com</A>​
  - * @version $Revision: 1.7 $
  + * @version $Revision: 1.8 $
    *
    * Copyright (c) 1999 dataweb systems, inc.
    * Copyright (c) 1999, 2000 Collab.Net, Inc.
  
  
  
  1.4 +3 -5 joist/java/org/joist​/util/UnderlineSpace​s.java
  
  Index: UnderlineSpaces.java
  ====================​====================​====================​=======
  RCS file: /cvs/joist/java/org/​joist/util/Underline​Spaces.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- UnderlineSpaces.java 2000/07/05 21:29:29 1.3
  +++ UnderlineSpaces.java 2000/10/24 23:59:08 1.4
  @@ -1,13 +1,13 @@
   package org.joist.util;
   
   import java.util.*;
  -import com.oroinc.text.regex.*;
  +import org.apache.oro.text.regex.*;
   
   /**
     * Creates a string with the spaces converted to underscores.
     *
     * @author David C. Pellegrini <A HREF="mailto:davidp@​dataweb-systems.com"​>davidp@dataweb-s​ystems.com</A>​
  - * @version $Revision: 1.3 $
  + * @version $Revision: 1.4 $
     *
     * Copyright (c) 1999 dataweb systems, inc.
     */
  @@ -20,7 +20,6 @@
       static final private String targetRegEx = "\\s+";
       static final private String substitution = "_";
       static final private int limit = Util.SUBSTITUTE_ALL;
  - static final private int nointerp = Util.INTERPOLATE_NONE;
   
   
       /**
  @@ -57,8 +56,7 @@
               } catch (MalformedPatternException ignored){};
           }
   
  - return Util.substitute(matcher, pattern, substitution, input, limit,
  - nointerp);
  + return Util.substitute(matcher, pattern, new StringSubstitution(s​ubstitution), input, limit);
       }
   }
Messages per page: