Skip to content

Commit

Permalink
Replace "JAX-RS" in javadocs with "Jakarta REST"
Browse files Browse the repository at this point in the history
Closes #1136
  • Loading branch information
sleberknight committed May 29, 2024
1 parent ef5f18a commit 6efe9d9
Show file tree
Hide file tree
Showing 13 changed files with 24 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -290,11 +290,11 @@ private synchronized String getNextDomain() {
}

/**
* Converts the URI returned by {@link #getURI()} into a JAX-RS {@link UriBuilder}.
* Converts the URI returned by {@link #getURI()} into a Jakarta REST {@link UriBuilder}.
* <p>
* Note that JAX-RS must be in the classpath when calling this method.
* Note that Jakarta REST must be in the classpath when calling this method.
*
* @return a JAX-RS {@link UriBuilder} instance
* @return a new {@link UriBuilder} instance
*/
public UriBuilder toUriBuilder() {
return UriBuilder.fromUri(getURI());
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/kiwiproject/jaxrs/KiwiResources.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
import java.util.Optional;

/**
* Static utilities for use in JAX-RS resource classes. Contains utilities for verifying entities (e.g. obtained from
* a service or data access class), factories for creating new responses, and for validating query parameters.
* Static utilities for use in Jakarta REST resource classes. Contains utilities for verifying entities (e.g. obtained
* from a service or data access class), factories for creating new responses, and for validating query parameters.
*
* @apiNote Some methods in this class accept {@link Optional} arguments, which we know is considered a code smell
* by various people and analysis tools such as IntelliJ's inspections, Sonar, etc. However, we also like to return
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/kiwiproject/jaxrs/KiwiResponses.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
import java.util.function.Function;

/**
* Static utilities related to evaluating and acting upon JAX-RS responses. For example, this class contains utilities
* to determine whether responses are successful or not, whether they are a specific type of response, and to perform
* actions (or throw exceptions) based on success or failure.
* Static utilities related to evaluating and acting upon Jakarta REST responses. For example, this class contains
* utilities to determine whether responses are successful or not, whether they are a specific type of response, and to
* perform actions (or throw exceptions) based on success or failure.
* <p>
* These utilities are intended mainly to be used in classes that make HTTP requests and need to evaluate and/or take
* action with the HTTP responses.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
import java.util.Optional;

/**
* A set of "standard" JAX-RS responses for various HTTP methods. The "standard" is simply Kiwi's view of
* A set of "standard" Jakarta REST responses for various HTTP methods. The "standard" is simply Kiwi's view of
* what should be in responses for common HTTP methods in a REST-based interface using JSON as the primary
* data format.
* <p>
* These utilities are intended for use within JAX-RS resource classes.
* These utilities are intended for use within Jakarta REST resource classes.
* <p>
* One specific thing to note is that the content type is always set to {@link MediaType#APPLICATION_JSON}, since
* the primary use case of this class assumes JSON-based REST interfaces. You can change the content type by
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import java.time.Duration;

/**
* Static utilities related to <em>Jersey</em> {@link Client} instances. If these methods are used with a JAX-RS
* Static utilities related to <em>Jersey</em> {@link Client} instances. If these methods are used with a Jakarta REST
* implementation other than Jersey, you should not expect anything to work. Some might fail silently, others could
* throw unexpected exceptions, etc.
* <p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import java.net.URI;

/**
* Use with JAX-RS {@link Client} instances to provide additional functionality via {@link WebTargetHelper}. Each
* Use with Jakarta REST {@link Client} instances to provide additional functionality via {@link WebTargetHelper}. Each
* of the {@code target} methods returns a {@link WebTargetHelper} to allow method chaining. Please see the
* documentation in {@link WebTargetHelper} for more explanation.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import java.util.stream.Stream;

/**
* Use with JAX-RS {@link WebTarget} instances to provide convenient functionality when adding query parameters.
* Use with Jakarta REST {@link WebTarget} instances to provide convenient functionality when adding query parameters.
* Most of this functionality is intended for cases when you only want to add parameters when they are not null (or not
* blank in the case of Strings). If you want a query parameter to be added regardless of whether a value is present
* or not, use the regular {@link WebTarget#queryParam(String, Object...) queryParam} method in {@code WebTarget}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import java.util.Map;

/**
* An error message that kiwi uses in JAX-RS related utilities. This is effectively a replacement for the
* An error message that kiwi uses in Jakarta REST related utilities. This is effectively a replacement for the
* Dropwizard class of the same name.
* <p>
* Each instance contains the HTTP status (error) code; the error message; an optional identifier to identify the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import java.util.Set;

/**
* Represents a JAX-RS exception that uses the Kiwi {@link ErrorMessage} to describe
* Represents a Jakarta REST exception that uses the Kiwi {@link ErrorMessage} to describe
* the errors causing this exception.
* <p>
* This class is concrete but also can be subclassed to represent specific HTTP status error codes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ public class KiwiRetryerPredicates {
ex instanceof NoRouteToHostException || getRootCause(ex) instanceof NoRouteToHostException;

/**
* Check if a given JAX-RS {@link Response} is a client error (4xx).
* Check if a given Jakarta REST {@link Response} is a client error (4xx).
*/
public static final Predicate<Response> IS_HTTP_400s = response ->
nonNull(response) && Response.Status.Family.CLIENT_ERROR == response.getStatusInfo().getFamily();

/**
* Check if a given JAX-RS {@link Response} is a server error (5xx).
* Check if a given Jakarta REST {@link Response} is a server error (5xx).
*/
public static final Predicate<Response> IS_HTTP_500s = response ->
nonNull(response) && Response.Status.Family.SERVER_ERROR == response.getStatusInfo().getFamily();
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/kiwiproject/search/KiwiSearching.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ public void checkPageNumber(int pageNumber) {

/**
* The rather opinionated value for default page size as a String, in order to support web framework annotations
* like JAX-RS's {@code javax.ws.rs.DefaultValue} that require a String.
* like Jakarta REST's {@code jakarta.ws.rs.DefaultValue} that require a String.
*
* @implNote This <em>must</em> be a constant not an expression, otherwise trying to use it in an annotation like
* the JAX-RS {@code DefaultValue} will result in a compilation error due to the vagaries of Java annotations.
* the Jakarta REST {@code DefaultValue} will result in a compilation error due to the vagaries of Java annotations.
* For example, trying to do this:
* {@code DEFAULT_PAGE_SIZE_AS_STRING = String.valueOf(DEFAULT_PAGE_SIZE)}
* and then using in an annotation like this:
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/kiwiproject/spring/data/PagingRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
import org.springframework.data.domain.Sort;

/**
* JAX-RS based implementation of {@link PagingParams}.
* Jakarta REST based implementation of {@link PagingParams}.
* <p>
* Intended to be used in JAX-RS resource classes with HTTP {@link jakarta.ws.rs.GET} endpoint methods having an
* Intended to be used in Jakarta REST resource classes with HTTP {@link jakarta.ws.rs.GET} endpoint methods having an
* argument annotated with {@link jakarta.ws.rs.BeanParam}.
* <p>
* Example:
Expand All @@ -25,7 +25,7 @@
* }
* </pre>
*
* @implNote Requires Spring Data Commons and the JAX-RS API to be available at runtime.
* @implNote Requires Spring Data Commons and the Jakarta REST API to be available at runtime.
*/
@Getter
@Setter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
import org.springframework.data.domain.Sort;

/**
* @implNote This test uses Dropwizard's (JAX-RS) test support classes to enable testing of
* the JAX-RS annotations in {@link PagingRequest}.
* @implNote This test uses Dropwizard's (Jakarta REST) test support classes to enable testing of
* the Jakarta REST annotations in {@link PagingRequest}.
*/
@DisplayName("PagingRequest")
@ExtendWith({DropwizardExtensionsSupport.class, SoftAssertionsExtension.class})
Expand Down

0 comments on commit 6efe9d9

Please sign in to comment.