Fix issue caused by varargs and autoboxing in build methods
svn path=/trunk/; revision=431
diff --git a/src/jsr311-api/src/javax/ws/rs/core/UriBuilder.java b/src/jsr311-api/src/javax/ws/rs/core/UriBuilder.java
index 06ad718..5738989 100644
--- a/src/jsr311-api/src/javax/ws/rs/core/UriBuilder.java
+++ b/src/jsr311-api/src/javax/ws/rs/core/UriBuilder.java
@@ -389,57 +389,13 @@
throws IllegalArgumentException, UriBuilderException;
/**
- * Build a URI, equivalent to {@code buildFromMap(true, values)}.
- * Any URI template parameters will be replaced by the value in
- * the supplied map. Values are converted to <code>String</code> using
- * their <code>toString</code> method and are then encoded to match the
- * rules of the URI component to which they pertain. The state of the
- * builder is unaffected; this method may be called multiple times on the
- * same builder instance.
- * @param values a map of URI template parameter names and values
- * @return the URI built from the UriBuilder
- * @throws IllegalArgumentException if there are any URI template parameters
- * without a supplied value, or if a template parameter value is null.
- * @throws UriBuilderException if a URI cannot be constructed based on the
- * current state of the builder.
- */
- public abstract URI buildFromMap(Map<String, ? extends Object> values)
- throws IllegalArgumentException, UriBuilderException;
-
- /**
* Build a URI, using the supplied values in order to replace any URI
* template parameters. Values are converted to <code>String</code> using
* their <code>toString</code> method and are then encoded to match the
- * rules of the URI component to which they pertain. The state of the
- * builder is unaffected; this method may be called multiple times on the
- * same builder instance.
- * <p>All instances of the same template parameter
- * will be replaced by the same value that corresponds to the position of the
- * first instance of the template parameter. e.g. the template "{a}/{b}/{a}"
- * with values {"x", "y", "z"} will result in the the URI "x/y/x", <i>not</i>
- * "x/y/z".
- * @param isEncoded specifies if the supplied values contain percent
- * encoded characters. If false then all '%' characters will be encoded, if
- * true then only % characters that are not followed by two hexadecimal
- * numbers will be encoded.
- * @param values a list of URI template parameter values
- * @return the URI built from the UriBuilder
- * @throws IllegalArgumentException if there are any URI template parameters
- * without a supplied value, or if a value is null.
- * @throws UriBuilderException if a URI cannot be constructed based on the
- * current state of the builder.
- */
- public abstract URI build(boolean isEncoded, Object... values)
- throws IllegalArgumentException, UriBuilderException;
-
- /**
- * Build a URI, equivalent to {@code build(true, values)}.
- * Any URI templates parameters will be replaced with the supplied values in
- * oreder. Values are converted to <code>String</code> using
- * their <code>toString</code> method and are then encoded to match the
- * rules of the URI component to which they pertain. The state of the
- * builder is unaffected; this method may be called multiple times on the
- * same builder instance.
+ * rules of the URI component to which they pertain. All '%' characters
+ * in the stringified values will be encoded.
+ * The state of the builder is unaffected; this method may be called
+ * multiple times on the same builder instance.
* <p>All instances of the same template parameter
* will be replaced by the same value that corresponds to the position of the
* first instance of the template parameter. e.g. the template "{a}/{b}/{a}"
@@ -454,4 +410,29 @@
*/
public abstract URI build(Object... values)
throws IllegalArgumentException, UriBuilderException;
+
+ /**
+ * Build a URI.
+ * Any URI templates parameters will be replaced with the supplied values in
+ * order. Values are converted to <code>String</code> using
+ * their <code>toString</code> method and are then encoded to match the
+ * rules of the URI component to which they pertain. All % characters in
+ * the stringified values that are not followed by two hexadecimal numbers
+ * will be encoded.
+ * The state of the builder is unaffected; this method may be called
+ * multiple times on the same builder instance.
+ * <p>All instances of the same template parameter
+ * will be replaced by the same value that corresponds to the position of the
+ * first instance of the template parameter. e.g. the template "{a}/{b}/{a}"
+ * with values {"x", "y", "z"} will result in the the URI "x/y/x", <i>not</i>
+ * "x/y/z".
+ * @param values a list of URI template parameter values
+ * @return the URI built from the UriBuilder
+ * @throws IllegalArgumentException if there are any URI template parameters
+ * without a supplied value, or if a value is null.
+ * @throws UriBuilderException if a URI cannot be constructed based on the
+ * current state of the builder.
+ */
+ public abstract URI buildFromEncoded(Object... values)
+ throws IllegalArgumentException, UriBuilderException;
}