Skip to content

Commit

Permalink
[#890] All array types to be used as parameters
Browse files Browse the repository at this point in the history
Signed-off-by: Andy McCright <[email protected]>
  • Loading branch information
andymc12 committed Aug 3, 2020
1 parent 9fcdde1 commit 9b39a7a
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 17 deletions.
6 changes: 3 additions & 3 deletions jaxrs-api/src/main/java/jakarta/ws/rs/CookieParam.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2019 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -35,8 +35,8 @@
* example, {@link Integer#valueOf(String)})</li>
* <li>Have a registered implementation of {@link jakarta.ws.rs.ext.ParamConverterProvider} JAX-RS extension SPI that
* returns a {@link jakarta.ws.rs.ext.ParamConverter} instance capable of a "from string" conversion for the type.</li>
* <li>Be {@code List<T>}, {@code Set<T>} or {@code SortedSet<T>}, where {@code T} satisfies 2, 3, 4 or 5 above. The
* resulting collection is read-only.</li>
* <li>Be {@code List<T>}, {@code Set<T>}, {@code SortedSet<T>} or {@code T[]} array, where {@code T} satisfies 2, 3, 4
* or 5 above. The resulting collection is read-only.</li>
* </ol>
*
* <p>
Expand Down
6 changes: 3 additions & 3 deletions jaxrs-api/src/main/java/jakarta/ws/rs/FormParam.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2019 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -36,8 +36,8 @@
* (see, for example, {@link Integer#valueOf(String)})</li>
* <li>Have a registered implementation of {@link jakarta.ws.rs.ext.ParamConverterProvider} JAX-RS extension SPI that
* returns a {@link jakarta.ws.rs.ext.ParamConverter} instance capable of a "from string" conversion for the type.</li>
* <li>Be {@code List<T>}, {@code Set<T>} or {@code SortedSet<T>}, where {@code T} satisfies 2, 3 or 4 above. The
* resulting collection is read-only.</li>
* <li>Be {@code List<T>}, {@code Set<T>}, {@code SortedSet<T>} or {@code T[]} array, where {@code T} satisfies 2, 3 or
* 4 above. The resulting collection is read-only.</li>
* </ol>
*
* <p>
Expand Down
6 changes: 3 additions & 3 deletions jaxrs-api/src/main/java/jakarta/ws/rs/HeaderParam.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2019 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -34,8 +34,8 @@
* (see, for example, {@link Integer#valueOf(String)})</li>
* <li>Have a registered implementation of {@link jakarta.ws.rs.ext.ParamConverterProvider} JAX-RS extension SPI that
* returns a {@link jakarta.ws.rs.ext.ParamConverter} instance capable of a "from string" conversion for the type.</li>
* <li>Be {@code List<T>}, {@code Set<T>} or {@code SortedSet<T>}, where {@code T} satisfies 2, 3 or 4 above. The
* resulting collection is read-only.</li>
* <li>Be {@code List<T>}, {@code Set<T>}, {@code SortedSet<T>} or {@code T[]} array, where {@code T} satisfies 2, 3 or
* 4 above. The resulting collection is read-only.</li>
* </ol>
*
* <p>
Expand Down
6 changes: 3 additions & 3 deletions jaxrs-api/src/main/java/jakarta/ws/rs/MatrixParam.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2019 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -41,8 +41,8 @@
* (see, for example, {@link Integer#valueOf(String)})</li>
* <li>Have a registered implementation of {@link jakarta.ws.rs.ext.ParamConverterProvider} JAX-RS extension SPI that
* returns a {@link jakarta.ws.rs.ext.ParamConverter} instance capable of a "from string" conversion for the type.</li>
* <li>Be {@code List<T>}, {@code Set<T>} or {@code SortedSet<T>}, where {@code T} satisfies 2, 3 or 4 above. The
* resulting collection is read-only.</li>
* <li>Be {@code List<T>}, {@code Set<T>}, {@code SortedSet<T>} or {@code T[]} array, where {@code T} satisfies 2, 3 or
* 4 above. The resulting collection is read-only.</li>
* </ol>
*
* <p>
Expand Down
6 changes: 3 additions & 3 deletions jaxrs-api/src/main/java/jakarta/ws/rs/QueryParam.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2019 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -35,8 +35,8 @@
* (see, for example, {@link Integer#valueOf(String)})</li>
* <li>Have a registered implementation of {@link jakarta.ws.rs.ext.ParamConverterProvider} JAX-RS extension SPI that
* returns a {@link jakarta.ws.rs.ext.ParamConverter} instance capable of a "from string" conversion for the type.</li>
* <li>Be {@code List<T>}, {@code Set<T>} or {@code SortedSet<T>}, where {@code T} satisfies 2, 3 or 4 above. The
* resulting collection is read-only.</li>
* <li>Be {@code List<T>}, {@code Set<T>}, {@code SortedSet<T>} or {@code T[]} array, where {@code T} satisfies 2, 3 or
* 4 above. The resulting collection is read-only.</li>
* </ol>
*
* <p>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
////
*******************************************************************
* Copyright (c) 2020 Eclipse Foundation
*
* This specification document is made available under the terms
* of the Eclipse Foundation Specification License v1.0, which is
* available at https://www.eclipse.org/legal/efsl.php.
*******************************************************************
////

[[changes-since-3.0-release]]
=== Changes Since 3.0 Release

* <<exceptionmapper>>: Added requirement that JAX-RS implementations have
default exception mappers.
* <<resource_field>>: Array types may be specified for `@CookieParam`,
`@FormParam`, `@HeaderParam`, `@MatrixParam` and `@QueryParam` parameters.
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ to limitations of the built-in `valueOf` method that is part of all Java
enumerations, a `fromString` method is often defined by the enum
writers. Consequently, the `fromString` method is preferred when
available.].
5. `List<T>`, `Set<T>`, or `SortedSet<T>`, where `T` satisfies
1,3 or 4 above.
5. `List<T>`, `Set<T>`, `SortedSet<T>` or an array (i.e. `T[]`), where
`T` satisfies 1, 3 or 4 above.

The `DefaultValue` annotation may be used to supply a default value for
some of the above, see the Javadoc for `DefaultValue` for usage details
Expand Down

0 comments on commit 9b39a7a

Please sign in to comment.