Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Use cached URLPatternParser instead of creating new one - thanks to f…

…caputo for the patch
  • Loading branch information...
commit c8dfbca093737228d4e122dd069bfa0074b7dded 1 parent 9476830
Christian Kaltepoth authored January 04, 2012
2  core/src/main/java/com/ocpsoft/pretty/faces/beans/ExtractedValuesURLBuilder.java
@@ -54,7 +54,7 @@ public URL buildURL(final UrlMapping mapping)
54 54
       {
55 55
          FacesContext context = FacesContext.getCurrentInstance();
56 56
 
57  
-         URLPatternParser parser = new URLPatternParser(mapping.getPattern());
  57
+         URLPatternParser parser = mapping.getPatternParser();
58 58
          List<PathParameter> parameters = parser.getPathParameters();
59 59
          List<String> parameterValues = new ArrayList<String>();
60 60
          for (PathParameter injection : parameters)
2  core/src/main/java/com/ocpsoft/pretty/faces/util/PrettyURLBuilder.java
@@ -185,7 +185,7 @@ public String build(final UrlMapping urlMapping, final boolean encodeUrl, final
185 185
       String result = "";
186 186
       if (urlMapping != null)
187 187
       {
188  
-         URLPatternParser parser = new URLPatternParser(urlMapping.getPattern());
  188
+         URLPatternParser parser = urlMapping.getPatternParser();
189 189
          List<String> pathParams = new ArrayList<String>();
190 190
          List<QueryParameter> queryParams = new ArrayList<QueryParameter>();
191 191
 

0 notes on commit c8dfbca

Please sign in to comment.
Something went wrong with that request. Please try again.