Emmanuel Lecharny created FC-28:
-----------------------------------

             Summary: The safeText method is probably not useful, and can be 
faster
                 Key: FC-28
                 URL: https://issues.apache.org/jira/browse/FC-28
             Project: FORTRESS-CORE
          Issue Type: Improvement
    Affects Versions: 1.0-RC35
            Reporter: Emmanuel Lecharny
             Fix For: 1.0.0




When we want to validate an entity before injecting it in the server, we call 
the RegExUtil.safeText() method.

It's checking something the server will already check (each value injected in 
the server will be controlled). Of course, we can set limits like the max 
length, but this can be done when defining the AttributeType (using the
{NNN}

notation).

Otherwise, the way the regexp is evaluated is costly : we compile the gexep 
every time, when it could be done only once.

Pattern safeTextPattern = Pattern.compile(safeTextPatternStr);

can be done globally.




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to