Permalink
Browse files

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

…caputo for the patch
  • Loading branch information...
1 parent 9476830 commit c8dfbca093737228d4e122dd069bfa0074b7dded @chkal chkal committed Jan 4, 2012
@@ -54,7 +54,7 @@ public URL buildURL(final UrlMapping mapping)
{
FacesContext context = FacesContext.getCurrentInstance();
- URLPatternParser parser = new URLPatternParser(mapping.getPattern());
+ URLPatternParser parser = mapping.getPatternParser();
List<PathParameter> parameters = parser.getPathParameters();
List<String> parameterValues = new ArrayList<String>();
for (PathParameter injection : parameters)
@@ -185,7 +185,7 @@ public String build(final UrlMapping urlMapping, final boolean encodeUrl, final
String result = "";
if (urlMapping != null)
{
- URLPatternParser parser = new URLPatternParser(urlMapping.getPattern());
+ URLPatternParser parser = urlMapping.getPatternParser();
List<String> pathParams = new ArrayList<String>();
List<QueryParameter> queryParams = new ArrayList<QueryParameter>();

0 comments on commit c8dfbca

Please sign in to comment.