forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgard...@apache.org
Subject svn commit: r479029 - in /forrest/trunk/whiteboard/forrest2/core: ivy.xml src/core/org/apache/forrest/core/plugin/BaseOutputPlugin.java tools/ivy/repository/apache/regexp/
Date Fri, 24 Nov 2006 22:37:58 GMT
Author: rgardler
Date: Fri Nov 24 14:37:57 2006
New Revision: 479029

URL: http://svn.apache.org/viewvc?view=rev&rev=479029
Log:
Use java regex classes in order to remove dependency on Apache Regexp
(FOR-945)

Removed:
    forrest/trunk/whiteboard/forrest2/core/tools/ivy/repository/apache/regexp/
Modified:
    forrest/trunk/whiteboard/forrest2/core/ivy.xml
    forrest/trunk/whiteboard/forrest2/core/src/core/org/apache/forrest/core/plugin/BaseOutputPlugin.java

Modified: forrest/trunk/whiteboard/forrest2/core/ivy.xml
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/forrest2/core/ivy.xml?view=diff&rev=479029&r1=479028&r2=479029
==============================================================================
--- forrest/trunk/whiteboard/forrest2/core/ivy.xml (original)
+++ forrest/trunk/whiteboard/forrest2/core/ivy.xml Fri Nov 24 14:37:57 2006
@@ -31,7 +31,6 @@
 	    <dependency org="apache" name="commons-httpclient" rev="latest.milestone" />
 	    <dependency org="apache" name="commons-codec" rev="1.3" />
 	    <dependency org="apache" name="commons-logging" rev="1.1"/>
-	    <dependency org="apache" name="regexp" rev="latest.milestone" />
 	    <dependency org="apache" name="xerces" rev="latest.release"/>
 	    <dependency org="jtidy" name="jtidy" rev="4aug2000r7-dev"/>
 	    <dependency org="junit" name="junit" rev="4.1"/>

Modified: forrest/trunk/whiteboard/forrest2/core/src/core/org/apache/forrest/core/plugin/BaseOutputPlugin.java
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/forrest2/core/src/core/org/apache/forrest/core/plugin/BaseOutputPlugin.java?view=diff&rev=479029&r1=479028&r2=479029
==============================================================================
--- forrest/trunk/whiteboard/forrest2/core/src/core/org/apache/forrest/core/plugin/BaseOutputPlugin.java
(original)
+++ forrest/trunk/whiteboard/forrest2/core/src/core/org/apache/forrest/core/plugin/BaseOutputPlugin.java
Fri Nov 24 14:37:57 2006
@@ -18,10 +18,11 @@
 
 import java.io.IOException;
 import java.net.URI;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
 
 import org.apache.forrest.core.document.DefaultOutputDocument;
 import org.apache.forrest.core.document.IDocument;
-import org.apache.regexp.RE;
 
 /**
  * A base output plugin from which all other output plugins should be etended.
@@ -59,8 +60,11 @@
 	 * @fixme implement proper matching
 	 */
 	public boolean isMatch(final URI requestURI) {
-		final RE r = new RE(this.getPattern());
-		return r.match(requestURI.getPath());
+		final Pattern pattern = 
+            Pattern.compile(this.getPattern());
+		Matcher matcher = 
+            pattern.matcher(requestURI.getPath());
+		return matcher.find();
 	}
 
 	public IDocument process(final IDocument doc) throws IOException {



Mime
View raw message