From 5859649af7180d63f000b42c75a5b557063dca2e Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Thu, 31 Jul 2014 17:08:08 -0400 Subject: [PATCH] Update UriTemplate Javadoc Issue: SPR-10497 --- .../java/org/springframework/web/util/UriTemplate.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/spring-web/src/main/java/org/springframework/web/util/UriTemplate.java b/spring-web/src/main/java/org/springframework/web/util/UriTemplate.java index b4f9461991..c0b109b83c 100644 --- a/spring-web/src/main/java/org/springframework/web/util/UriTemplate.java +++ b/spring-web/src/main/java/org/springframework/web/util/UriTemplate.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2013 the original author or authors. + * Copyright 2002-2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -86,10 +86,10 @@ public class UriTemplate implements Serializable { * UriTemplate template = new UriTemplate("http://example.com/hotels/{hotel}/bookings/{booking}"); * Map<String, String> uriVariables = new HashMap<String, String>(); * uriVariables.put("booking", "42"); - * uriVariables.put("hotel", "1"); + * uriVariables.put("hotel", "Rest & Relax"); * System.out.println(template.expand(uriVariables)); * - * will print:
{@code http://example.com/hotels/1/bookings/42}
+ * will print:
{@code http://example.com/hotels/Rest%20%26%20Relax/bookings/42}
* @param uriVariables the map of URI variables * @return the expanded URI * @throws IllegalArgumentException if {@code uriVariables} is {@code null}; @@ -107,9 +107,9 @@ public class UriTemplate implements Serializable { *

Example: *

      * UriTemplate template = new UriTemplate("http://example.com/hotels/{hotel}/bookings/{booking}");
-     * System.out.println(template.expand("1", "42));
+     * System.out.println(template.expand("Rest & Relax", "42));
      * 
- * will print:
{@code http://example.com/hotels/1/bookings/42}
+ * will print:
{@code http://example.com/hotels/Rest%20%26%20Relax/bookings/42}
* @param uriVariableValues the array of URI variables * @return the expanded URI * @throws IllegalArgumentException if {@code uriVariables} is {@code null}