Login | Register
My pages Projects Community openCollabNet

Discussions > dev > Re: CVS update: MODIFIED: util ...

Project highlights: Architectural Overview

joist
Discussion topic

Back to topic list

Re: CVS update: MODIFIED: util ...

Author dlr
Full name Daniel Rall
Date 2001-06-07 08:21:53 PDT
Message You do only one method call (either isEmpty or isValid, depending on
which behavior you want....isValid corresponds to what you have
already). And Joist is already compiled against Turbine.

Actually, if you want to start moving Joist code into Turbine and
Helm, that will save me a lot of work. TagValidator could probably go
into the org.apache.turbine.util package. Send either me or the
turbine-dev at jakarta dot apache dot org list your Turbine patches (depending on
whether they affect existing behavior or not). Higher level
functionality, or Tigris-specific functionality can go into Helm.

Michael Salmon <ms at collab dot net> writes:

> so rather then doing the two checks i compile joist against turbine and
> do two method calls that do the same two checks?
> how about we just sometime soon get rid of joist and put turbine and
> helm in place for it? ;-)
>
> On Wed, Jun 06, 2001 at 09:34:53AM -0700, Daniel Rall wrote:
> > The org.apache.turbine.u​til.StringUtils class has two class methods
> > which encapsulate this text validation: isValid() and isEmpty().
> >
> > http://finemaltcodin​g.com/~dlr/turbine_a​pi/org/apache/turbin​e/util/StringUtils.h​tml
> >
> > ms at tigris dot org writes:
> >
> > > User: ms
> > > Date: 01/06/06 00:30:25
> > >
> > > Modified: java/org/joist/util TagValidator.java
> > > Log:
> > > dont bother checking empty or null strings. also fixed intenting problem
> > >
> > > Revision Changes Path
> > > 1.12 +21 -20 joist/java/org/joist​/util/TagValidator.j​ava
> > >
> > > http://joist.tigris.​org/source/browse/jo​ist/java/org/joist/u​til/TagValidator.jav​a.diff?r1=1.11&r​2=1.12
> > >
> > > (In the diff below, changes in quantity of whitespace are not shown.)
> > >
> > > Index: TagValidator.java
> > > ====================​====================​====================​=======
> > > RCS file: /usr/local/tigris/da​ta/helm/cvs/reposito​ry/joist/java/org/jo​ist/util/TagValidato​r.java,v
> > > retrieving revision 1.11
> > > retrieving revision 1.12
> > > diff -u -b -r1.11 -r1.12
> > > --- TagValidator.java 2001/05/11 02:30:18 1.11
> > > +++ TagValidator.java 2001/06/06 07:30:25 1.12
> > > @@ -67,7 +67,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>​
> > > * @author Michael Salmon <a href="mailto:ms@coll​ab.net">ms@collab​.net</a>
> > > - * @version $Revision: 1.11 $
> > > + * @version $Revision: 1.12 $
> > > */
> > > public class TagValidator
> > > {
> > > @@ -269,12 +269,13 @@
> > > public static boolean containsHTML (String inputString)
> > > {
> > > boolean foundHTML = false;
> > > + if (inputString != null && !inputString.equals(""))
> > > + {
> > > try
> > > {
> > > - matchPattern = matchCompiler.compil​e(matchRegExp,
> > > - Perl5Compiler.CASE_I​NSENSITIVE_MASK);
> > > + matchPattern = matchCompiler.compile
> > > + (matchRegExp, Perl5Compiler.CASE_I​NSENSITIVE_MASK);
> > > // First, strip out all occurrences of valid HTML tags.
> > > -
> > > PatternMatcherInput input = new PatternMatcherInput(​inputString);
> > >
> > > MatchResult result = null;
> > > @@ -282,10 +283,10 @@
> > > {
> > > foundHTML = true;
> > > }
> > > -
> > > }
> > > catch (MalformedPatternException ignored)
> > > {}
> > > + }
> > > return foundHTML;
> > > }
> > >
> > >
> > >
> > >
> > >
> > > --------------------​--------------------​--------------------​---------
> > > To unsubscribe, e-mail: cvs-unsubscribe@jois​t.tigris.org
> > > For additional commands, e-mail: cvs-help at joist dot tigris dot org
>
> ms-

--------------------​--------------------​--------------------​---------
To unsubscribe, e-mail: dev-unsubscribe@jois​t.tigris.org
For additional commands, e-mail: dev-help at joist dot tigris dot org

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

Re: CVS update: MODIFIED: util ... dlr Daniel Rall 2001-06-07 08:21:53 PDT
Messages per page: