Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

…caputo for the patch
  • Loading branch information...
commit c8dfbca093737228d4e122dd069bfa0074b7dded 1 parent 9476830
@chkal chkal authored
View
2  core/src/main/java/com/ocpsoft/pretty/faces/beans/ExtractedValuesURLBuilder.java
@@ -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)
View
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
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>();
Please sign in to comment.
Something went wrong with that request. Please try again.