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-06 09:34:53 PDT
Message 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

--------------------​--------------------​--------------------​---------
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-06 09:34:53 PDT
Messages per page: